1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
#include "stdafx.h"
#include "DLLWrapper.h"
#include "VGSLib.h"
VGSLib* pVGSLib;
__declspec(dllexport) DWORD __stdcall Init(char* info[], int amount, int ID1, int ID2){
pVGSLib = new VGSLib();
if ( pVGSLib ){
return pVGSLib->Init(info, amount, ID1, ID2);
}
return -1;
}
__declspec(dllexport) DWORD __stdcall GetValues(SValStruct* vs, DWORD flag){
if ( pVGSLib ){
return pVGSLib->GetValues(vs,flag);
}
return -1;
}
__declspec(dllexport) DWORD __stdcall GetNums(int amount, int* out, DWORD flag){
if ( pVGSLib ){
return pVGSLib->GetNums(amount,out,flag);
}
return -1;
}
__declspec(dllexport) DWORD __stdcall GetWV(SWVStruct* wv, int ID, DWORD amount, DWORD flag){
if ( pVGSLib ){
return pVGSLib->GetWV(wv,ID,amount,flag);
}
return -1;
}
__declspec(dllexport) DWORD __stdcall Confirm(bool *bConfirmed, int ID, DWORD flag){
if ( pVGSLib ){
return pVGSLib->Confirm(bConfirmed,ID,flag);
}
return -1;
}
__declspec(dllexport) bool __stdcall Formatted(){
if ( pVGSLib ){
return pVGSLib->Formatted();
}
return false;
}
__declspec(dllexport) LPWSTR __stdcall GetErrorString(int code){
if ( pVGSLib ){
return pVGSLib->GetErrorString(code);
}
return (LPWSTR)"pVGSLib instance does not exist - did you call Init()?";
}
|