Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows ShellExecute crash #33

Open
or75 opened this issue Jul 30, 2018 · 0 comments
Open

windows ShellExecute crash #33

or75 opened this issue Jul 30, 2018 · 0 comments

Comments

@or75
Copy link

or75 commented Jul 30, 2018

compiler: https://github.com/pawn-lang/compiler (build in mvs2017)
all build: https://mega.nz/#!sqgSBSjS!C173OJx634UwDaIQpZyoh79KX1-UxAzSYyZmeWZWlQE

use ShellExecute-test.pwn

#include <core>
#include <string>
#include <ShellExecute>

static stock ToCharString(s[], size = sizeof(s))
{
	for (new i = 0; i < size; i++) {
		s[i] = swapchars(s[i]);
	}
}

main()
{
	new File[] = !"notepad.exe";
	new Operation[] = !"open";
	new Parameters[] = !"server.cfg";

	ToCharString(File);
	ToCharString(Operation);
	ToCharString(Parameters);

	new result = ShellExecute(Operation, File, Parameters, SW_SHOW); // crach here
	printf("ShellExecute() returned %d", result);
}

compiler command "pawncc.exe ShellExecute-test.pwn -d3"

x32dbg_2018-07-30_19-45-43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant