#include "stdio.h"
#include "stdlib.h"
#include "dlfcn.h"
int main(void)
{
int (*So)(const char* pszTimestamp, const char* pszSDRType, const char* pszCallID,
const char* pszUserNo, const char* pszCallerNo, const char* pszCalledNo,
const char* pszOldNumber, const char* pszLocationID, const char* pszField1,
const char* pszField2, const char* pszField3, const char* pszField4);
const char *errmsg = "";
printf("begin!\n");
void *SoLib = dlopen("/root/RecordDll//Release/libRecordDll.so", RTLD_LAZY);
printf("111");
if (NULL == SoLib)
{
printf("222");
fprintf(stderr, "Failed to load libRecordDll.so:%s\n", dlerror());
return 1;
}
dlerror();
printf("333");
*(void **)(&So) = dlsym(SoLib, "GetInfo");
printf("444");
if (NULL != (errmsg = dlerror()))
{
printf("%s\n", errmsg);
return 1;
}
printf("555");
int ret = So("2011-11-11 11:11:11", "8", "11",
"111", "1111", "11111",
"111111", "1111111", "1~1~1",
"2011-11-11 11:11:11~2012-11-11 11:11:11~0~03", "", "");
printf("%d", ret);
dlclose(SoLib);
return 0;
}
Smart猫小萌
猛跑小猪