Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int _tmain(int argc, _TCHAR* argv[])
- {
- GFXDllCreateObject = NULL;
- GFXDllReleaseObject = NULL;
- dwEax_setup = 0;
- dwEbx_setup = 0;
- dwEcx_setup = 0;
- dwEdx_setup = 0;
- bInit = false;
- bLoaded = false;
- pGFXAccess = NULL;
- hDLL = NULL;
- memset(loadPk2Filename, 0, MAX_PATH + 1);
- if(Initialize() == 0)
- {
- bool bOpened = Open("d:\\Documents\\seeroad\\SilkRoad_TestIn\\Media.pk2", "169841", 6);
- if(bOpened)
- {
- // test the gefilesize function with index -1
- __asm pushad
- // first we need a dword pointer
- DWORD dwHigh = 0;
- LPDWORD pdwHigh = &dwHigh;
- // next we need the index
- DWORD index = 1;
- DWORD fsize = 0;
- FARPROC gfxgetfilesize = pGFXAccess->vtable->functions[35];
- LPVOID ptr1 = pGFXAccess;
- __asm
- {
- push pdwHigh
- push index
- push ptr1
- call gfxgetfilesize
- mov fsize, eax
- }
- cout << "GfxGetFileSize returned " << fsize << "." << endl;
- cout << "GfxGetFileSize high order" << dwHigh << "." << endl;
- __asm popad
- }
- }
- Deinitialize();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement