-
Notifications
You must be signed in to change notification settings - Fork 0
/
interop.c
43 lines (32 loc) · 1.25 KB
/
interop.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 <string.h>
#include "interoplib.h"
#include "interopstub.h"
#include "simple.h"
/*********************************************************************/
bool Interop_CreateInstance(const char *type_name, char *instance_id, int32_t max_instance_id, void *execute_user_ptr,
Interop_ExecuteCallback execute, Interop_InvokeInstanceCallback *invoke_instance,
Interop_ReleaseInstanceCallback *release_instance,
Interop_ProcessInstanceCallback *process_instance, void **user_ptr) {
if (strcmp(type_name, "SSN.Simple") == 0) {
void *context = Simple_Create();
Simple_GetInstanceId(context, instance_id, max_instance_id);
*invoke_instance = Simple_Invoke;
*release_instance = Simple_Release;
*process_instance = NULL;
// Uncomment this line in if you want the process call
// *process_instance = Simple_Process;
*user_ptr = context;
return true;
}
return false;
}
bool Interop_SetOption(const char *key, void *value) {
return true;
}
bool Interop_Load(void) {
return true;
}
bool Interop_Unload(void) {
return true;
}
/*********************************************************************/