Cagliostro
Programmer
I have the following code. Sometimes it works fine, but sometimes not, in dependence of how many times I compile.
Can anyone explain what is the matter?
#define _WIN32_WINNT 0x0500
#include<windows.h>
char* y = "\xFF\x15\xAC\xA2\x42\x00\xC3";
int WINAPI WinMain(HINSTANCE,HINSTANCE,LPSTR,int)
{
void (*ptr)();
ptr=(void (__cdecl *)())y;
ptr();
return 0;
}
John Fill
ivfmd@mail.md
Can anyone explain what is the matter?
#define _WIN32_WINNT 0x0500
#include<windows.h>
char* y = "\xFF\x15\xAC\xA2\x42\x00\xC3";
int WINAPI WinMain(HINSTANCE,HINSTANCE,LPSTR,int)
{
void (*ptr)();
ptr=(void (__cdecl *)())y;
ptr();
return 0;
}
John Fill
ivfmd@mail.md