typedef void (*AtomCmd_t)(int clientNum, int type, const char *text); AtomCmd_t mycmd = (AtomCmd_t)0x48573842;
mycmd(1,mytype,"Text here");
//DLL named david.dll:
extern "C" int DavidIsCool(int x)
{
return x;
}
//other program:
typedef int(__cdecl* fDavidIsCool)(int);
fDavidIsCool DavidIsCool = NULL;
HMODULE dll = LoadLibrary("david.dll");
DavidIsCool = (fDavidIsCool)GetProcAddress(dll,"DavidIsCool");
DavidIsCool(1337);
statements retracted.typedef void (*AtomCmd_t)(int clientNum, int type, const char *text); AtomCmd_t mycmd = (AtomCmd_t)0x48573842;
mycmd(1,mytype,"Text here");