You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
737 B

3 years ago
#include <iostream>
#include "xvneng.h"
2 years ago
#ifdef _WIN32
#include "windows.h"
#define symLoad GetProcAddress
#else
#include "dlfcn.h"
#define symLoad dlsym
#endif
3 years ago
using namespace std;
int main (
int argc,
char* argv[]
)
{
2 years ago
#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
3 years ago
2 years ago
VersionFn version = (VersionFn) symLoad(handle, VersionFnKey);
wstring info = wstring(version());
3 years ago
2 years ago
if ( info.length() )
3 years ago
{
2 years ago
wcout << info.c_str() << endl;
3 years ago
}
else
{
2 years ago
wcout << L"N/A" << endl;
3 years ago
}
2 years ago
(void) getchar();
3 years ago
return EXIT_SUCCESS;
}