mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-03-21 17:11:30 +00:00
40 lines
1.7 KiB
C++
40 lines
1.7 KiB
C++
|
/*
|
||
|
TSOSimulatorClient.cpp - Copyright (c) 2012 Fatbag <X-Fi6@phppoll.org>
|
||
|
|
||
|
Permission to use, copy, modify, and/or distribute this software for any
|
||
|
purpose with or without fee is hereby granted, provided that the above
|
||
|
copyright notice and this permission notice appear in all copies.
|
||
|
|
||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||
|
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||
|
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||
|
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||
|
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||
|
*/
|
||
|
|
||
|
#include <stdio.h>
|
||
|
#include <windows.h>
|
||
|
|
||
|
int main(){
|
||
|
HMODULE dllmodule = LoadLibrary("TSOSimulatorClientD.dll");
|
||
|
if(dllmodule == NULL){
|
||
|
printf("TSOSimulatorClient: Error: Failed to load DLL \"TSOSimulatorClientD.dll\".");
|
||
|
return -1;
|
||
|
}
|
||
|
|
||
|
void * (__stdcall *GZDllGetGZCOMDirector)(void) = (void * (__stdcall *)(void)) GetProcAddress(dllmodule, "GZDllGetGZCOMDirector");
|
||
|
if(GZDllGetGZCOMDirector == NULL){
|
||
|
printf("TSOSimulatorClient: Error: Failed to find GZDllGetGZCOMDirector() in TSOSimulatorClientD.dll.");
|
||
|
return -1;
|
||
|
}
|
||
|
|
||
|
printf("TSOSimulatorClient: Calling GZDllGetGZCOMDirector() ...\n");
|
||
|
void * value = GZDllGetGZCOMDirector();
|
||
|
printf("TSOSimulatorClient: Finished calling GZDllGetGZCOMDirector().\nThe value returned was: %p.\n", value);
|
||
|
|
||
|
printf("TSOSimulatorClient: Exiting.\n");
|
||
|
FreeLibrary(dllmodule);
|
||
|
return 0;
|
||
|
}
|