Created
July 20, 2015 21:30
-
-
Save kumatti1/6cee5c950b83ebfbdcff to your computer and use it in GitHub Desktop.
インラインアセンブラ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
void WINAPI hoge(); | |
FARPROC func = (FARPROC)&hoge; | |
int CALLBACK WinMain( | |
_In_ HINSTANCE hInstance, | |
_In_ HINSTANCE hPrevInstance, | |
_In_ LPSTR lpCmdLine, | |
_In_ int nCmdShow | |
) | |
{ | |
__asm{ | |
push func | |
ret | |
} | |
return 0; | |
} | |
void WINAPI hoge() | |
{ | |
MessageBoxA(0,"","", MB_OK); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment