-
Notifications
You must be signed in to change notification settings - Fork 3
/
sap.cpp
61 lines (48 loc) · 1.23 KB
/
sap.cpp
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
#include "sap.h"
extern "C"
{
void xfergocallback(SapXferCallbackInfoWrapper pInfo)
{
goxferhandler(pInfo);
}
void acqgocallback(SapAcqCallbackInfoWrapper pInfo)
{
goacqhandler(pInfo);
}
}
void SapManager_Init() {
_CorW32_EnableKernelEventNotification();
SapManager::SetDisplayStatusMode(SapManager::StatusLog);
}
int SapManager_GetServerCount() {
return SapManager::GetServerCount();
}
const char* SapManager_GetLastStatus() {
return SapManager::GetLastStatus();
}
SapLocationWrapper SapLocation_New(const char* acqServerName, int acqDeviceNumber) {
return new SapLocation(acqServerName, acqDeviceNumber);
}
void SapLocation_Delete(SapLocationWrapper loc) {
delete loc;
}
SapVersionInfoWrapper SapManager_GetVersionInfo() {
SapManVersionInfo* info = new SapManVersionInfo();
SapManager::GetVersionInfo(info);
return info;
}
void SapVersionInfo_Delete(SapVersionInfoWrapper v) {
delete v;
}
int SapVersionInfo_GetMajor(SapVersionInfoWrapper v) {
return v->GetMajor();
}
int SapVersionInfo_GetMinor(SapVersionInfoWrapper v) {
return v->GetMinor();
}
int SapVersionInfo_GetRevision(SapVersionInfoWrapper v) {
return v->GetRevision();
}
int SapVersionInfo_GetBuild(SapVersionInfoWrapper v) {
return v->GetBuild();
}