Join Date: Aug 2007
Posts: 8643
User-Rating:
|
ich benutze bei meiner Engine Klasse nicht das SDK, weil mir da zuviel drin ist, was ich nicht brauche.
CPP Code: typedef void* (*CreateInterfaceFn)(const char *name, int *returnCode); CreateInterfaceFn CaptureFactory(char *FactoryModuleName) { CreateInterfaceFn ret = NULL; while (!ret) { HMODULE FactoryModule = GetModuleHandleA(FactoryModuleName); if (FactoryModule) ret = reinterpret_cast<CreateInterfaceFn>(GetProcAddress(FactoryModule, "CreateInterface")); Sleep(10); } return ret; } //--------------------------------------------------------------------------- void *CaptureInterface(CreateInterfaceFn Fn, char *InterfaceName) { unsigned long *ret = NULL; while (!ret) { ret = reinterpret_cast<unsigned long*>(Fn(InterfaceName, NULL)); Sleep(10); } return ret; } ... Engine *engine; CreateInterfaceFn engineInterface = CaptureFactory("engine.dll"); engine = (cEngine*)CaptureInterface(engineInterface, "VEngineClient013"); ... float *WorldToScreen = engine->WorldToScreenMatrix();
greetz KN4CK3R
|