-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathRVExtension.c
43 lines (34 loc) · 1.55 KB
/
RVExtension.c
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
#include <stdlib.h>
#include "extensionCallback.h"
extern void goRVExtension(char *output, size_t outputSize, char *input);
extern void goRVExtensionVersion(char *output, size_t outputSize);
extern void goRVExtensionArgs(char* output, size_t outputSize, char* input, char** argv, int argc);
extern void goRVExtensionRegisterCallback(extensionCallback fnc);
#ifdef WIN64
__declspec(dllexport) void RVExtension(char *output, size_t outputSize, char *input) {
goRVExtension(output, outputSize, input);
}
__declspec(dllexport) void RVExtensionVersion(char *output, size_t outputSize) {
goRVExtensionVersion(output, outputSize);
}
__declspec(dllexport) void RVExtensionArgs(char* output, size_t outputSize, char* input, char** argv, int argc) {
goRVExtensionArgs(output, outputSize, input, argv, argc);
}
__declspec(dllexport) void RVExtensionRegisterCallback(extensionCallback fnc) {
goRVExtensionRegisterCallback(fnc);
}
#else
__declspec(dllexport) void __stdcall _RVExtension(char *output, size_t outputSize, char *input) {
goRVExtension(output, outputSize, input);
}
__declspec(dllexport) void __stdcall _RVExtensionVersion(char *output, size_t outputSize) {
goRVExtensionVersion(output, outputSize);
}
__declspec(dllexport) void __stdcall _RVExtensionArgs(char* output, size_t outputSize, char* input, char** argv, int argc) {
goRVExtensionArgs(output, outputSize, input, argv, argc);
}
__declspec(dllexport) void __stdcall _RVExtensionRegisterCallback(extensionCallback fnc) {
goRVExtensionRegisterCallback(fnc);
}
#endif
// do this for all the other exported functions