Difference between revisions of "Example 7 Step 1"
Jump to navigation
Jump to search
(New page: <pre> #include <stdio.h> #include <windows.h> void __stdcall DisplayMessage(char *strMessage, int intDurationInSeconds) { int intDisplayUntil = GetTickCount() + (intDurationInSeconds * 1...) |
|||
Line 1: | Line 1: | ||
{{Infobox assembly}} | |||
[[Category: Assembly Examples]] | |||
<pre> | <pre> | ||
#include <stdio.h> | #include <stdio.h> |
Latest revision as of 15:47, 16 March 2007
Assembly Language Tutorial | |
---|---|
Please choose a tutorial page:
|
#include <stdio.h> #include <windows.h> void __stdcall DisplayMessage(char *strMessage, int intDurationInSeconds) { int intDisplayUntil = GetTickCount() + (intDurationInSeconds * 1000); int fcnDisplayMessage = 0x469380; __asm { push 0 push intDisplayUntil mov edx, 0 mov ecx, strMessage call fcnDisplayMessage } } BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { switch(ul_reason_for_call) { case DLL_PROCESS_ATTACH: DisplayMessage("\x03Loading test plugin", 30); break; case DLL_PROCESS_DETACH: DisplayMessage("\x03Unloading test plugin", 30); break; } return TRUE; }