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.
|
|
|
#include <iostream>
|
|
|
|
#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;
|
|
|
|
}
|