wab有一套专门的api,用以下代码初始一个IWABObject
LPWABOPEN lpfnWABOpen = NULL; // Defined in Wabapi.h.
HINSTANCE hinstWAB = NULL;
// Initialize <tla rid="tla:wab" /> and get an instance
// of IWABObject.
HRESULT InitWAB (LPWABOBJECT *lppWABObject, LPADRBOOK
*lppAdrBook)
{
HRESULT hr = E_FAIL;
hinstWAB = LoadLibrary_WABDll();
{
if (hinstWAB)
{
lpfnWABOpen = (LPWABOPEN) GetProcAddress
(hinstWAB, "WABOpen");
if (lpfnWABOpen)
hr = lpfnWABOpen (lppAdrBook, lppWABObject,
NULL, 0);
}
}
return hr;
}
详情请见:http://msdn.microsoft.com/workshop/messaging/wab/wabentry.asp
给分,嘿嘿