#include #include "xvneng.h" #ifdef _WIN32 #include "windows.h" #define symLoad GetProcAddress #else #include "dlfcn.h" #define symLoad dlsym #endif using namespace std; int main ( int argc, char* argv[] ) { #ifdef _WIN32 HINSTANCE handle = LoadLibrary(L"C:\\XvirusSDK\\bin\\Windows\\XvirusSDK.dll"); // changed this to the path of the dll #else void* handle = dlopen("C:\\XvirusSDK\\bin\\Linux\\XvirusSDK.so", RTLD_LAZY); // changed this to the path of the so #endif VersionFn version = (VersionFn) symLoad(handle, VersionFnKey); wstring info = wstring(version()); if ( info.length() ) { wcout << info.c_str() << endl; } else { wcout << L"N/A" << endl; } (void) getchar(); return EXIT_SUCCESS; }