Difference between revisions of "Example 7 Step 1b"

From SkullSecurity
Jump to navigation Jump to search
(New page: #include <stdio.h> #include <windows.h> typedef void (__fastcall *fcnShowMessage) (const char* message, int unk, int intDisplayUntil, int unk0); static const fcnShowMessage ShowMessage =...)
 
m (Reverted edits by 208.109.123.121 (Talk); changed back to last version by Ron)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Infobox assembly}}
[[Category: Assembly Examples]]


You may find this function useful. I won't be using function pointers since they're a little more confusing.
<pre>
#include <stdio.h>
#include <stdio.h>
#include <windows.h>
#include <windows.h>
Line 21: Line 25:
return TRUE;
return TRUE;
}
}
</pre>

Latest revision as of 02:52, 21 October 2007

Assembly Language Tutorial
Please choose a tutorial page:

You may find this function useful. I won't be using function pointers since they're a little more confusing.

#include <stdio.h>
#include <windows.h>

typedef void (__fastcall *fcnShowMessage) (const char* message, int unk, int intDisplayUntil, int unk0);
static const fcnShowMessage ShowMessage = (fcnShowMessage) 0x00469380;

BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
	switch(ul_reason_for_call)
	{
	case DLL_PROCESS_ATTACH:
		ShowMessage("\x03Loading test plugin v2", 0, GetTickCount() + 30000, 0);
		break;

	case DLL_PROCESS_DETACH:
		ShowMessage("\x03Loading test plugin v2", 0, GetTickCount() + 30000, 0);
		break;
	}

	return TRUE;
}