rendered paste body
HRESULT
PamiMapiConf::MessageStoreConfigure (LPMAPIUID provider_uid, LPMAPIPROP props, bool *save)
{
HRESULT hres;
DTPAGE pages[1];
DTCTL controls[1];
unsigned char label_notify[20] = {PAMI_PROVIDER_UID, 0x00, 0x00, 0x00, 0x00};
LPDTCTL control = &controls [0];
control->ulCtlType = DTCT_LABEL;
control->lpbNotif = (LPBYTE) &label_notify;
control->cbNotif = sizeof (label_notify);
control->lpszFilter = NULL;
control->ulItemID = 1;
control->ctl.lplabel->ulbLpszLabelName = RES_LABEL_TEXT;
LPDTPAGE page = &pages [0];
page->cctl = 1;
page->lpszResourceName = RES_CONF_DIALOG;
page->ulItemID = 0;
page->lpctl = (LPDTCTL) &controls;
LPMAPITABLE display_table;
hres = BuildDisplayTable (MAPIAllocateBuffer, MAPIAllocateMore, MAPIFreeBuffer, NULL,
dllInstance, 1, (LPDTPAGE) &pages, 0, &display_table, NULL);
if (!SUCCEEDED (hres)) {
pami_critical ("couldn't build display table %x", hres);
return hres;
}
hres = support->DoConfigPropsheet (ui_param, 0, "Property sheet title",
display_table, props, 0);
if (!SUCCEEDED (hres)) {
pami_critical ("DoConfigPropsheet failed %x", hres);
return hres;
}
return S_OK;
}