#define QMPLUGIN_API extern "C" __declspec(dllexport)
typedef int (*QMPLUGIN_HANDLER)(char *lpszParamList, char *lpszRetVal);
typedef struct {
char *m_lpszCommandName;
char *m_lpszCommandDescription;
QMPLUGIN_HANDLER m_pHandlerFunction;
UINT m_nParamNumber;
} QMPLUGIN_CMD_INFO;
typedef QMPLUGIN_CMD_INFO* (*CommandFunc)(int iCommandNum);
HINSTANCE thDll;
thDll = LoadLibrary("xxxxxplugin.dll");
if (thDll != NULL)
{
CommandFunc someFunc = (CommandFunc)GetProcAddress(thDll, "GetCommand");
if (someFunc != NULL)
{
QMPLUGIN_CMD_INFO* abc = someFunc(0);
printf("the function description is %s\n", abc->m_lpszCommandDescription);
}else
{
printf("Load Function Error\n");
}
FreeLibrary(thDll);
}else{
printf("Load DLL Error\n");
}
这是别人做过的源码,但是我想知道有了这个源码以后如何调用????
比如在按键精灵里后台模拟按键是Call Plugin.Bkgnd.KeyPress(Hwnd, 53),那么在VC里这个源码后面该怎么写???
求大神帮助
typedef int (*QMPLUGIN_HANDLER)(char *lpszParamList, char *lpszRetVal);
typedef struct {
char *m_lpszCommandName;
char *m_lpszCommandDescription;
QMPLUGIN_HANDLER m_pHandlerFunction;
UINT m_nParamNumber;
} QMPLUGIN_CMD_INFO;
typedef QMPLUGIN_CMD_INFO* (*CommandFunc)(int iCommandNum);
HINSTANCE thDll;
thDll = LoadLibrary("xxxxxplugin.dll");
if (thDll != NULL)
{
CommandFunc someFunc = (CommandFunc)GetProcAddress(thDll, "GetCommand");
if (someFunc != NULL)
{
QMPLUGIN_CMD_INFO* abc = someFunc(0);
printf("the function description is %s\n", abc->m_lpszCommandDescription);
}else
{
printf("Load Function Error\n");
}
FreeLibrary(thDll);
}else{
printf("Load DLL Error\n");
}
这是别人做过的源码,但是我想知道有了这个源码以后如何调用????
比如在按键精灵里后台模拟按键是Call Plugin.Bkgnd.KeyPress(Hwnd, 53),那么在VC里这个源码后面该怎么写???
求大神帮助
