Using mfc – Grandstream GXP2200 GMI Web Service Guide User Manual
Page 39

GXP2200 GMI WEB SERVICE GUIDE V1.0
Page 38 of 38
USING MFC
Include header "GMIService.h" first. Then load the lib file.
• Static load:
#pragma comment(lib,"GMI.lib")
• Dynamic load:
HINSTANCE hInst;
hInst=LoadLibrary("GMI.dll"); //load dll
typedef void (*ADDPROC)( CallBackFun fun);
ADDPROC Add=(ADDPROC)GetProcAddress(hInst,"getAllGrouops");
Add(userFun);
Note:
If callback function userFun is used in the class, it can be declared as static function or global function.