i have problem in creating profile using ConfiguringMsgService( ) in C++ MAPIs

  • Thread starter Sanjay_S via OfficeKB.com
  • Start date
S

Sanjay_S via OfficeKB.com

Hi,
i was just trying to create a profile programatically using MAPIs of C++
by using IMsgServiceAdmin and IProfAdmin interface apis. as given below

if(FAILED(hRes = HrQueryAllRows(lpMsgSvcTable,
(LPSPropTagArray)&Columns,/*NULL*/&sres,
NULL,
0,&lpSvcRows)))
{
if(hRes ==MAPI_E_NOT_FOUND)

MessageBox("notfound",NULL,MB_OK);
else

MessageBox("notfound",NULL,MB_OK);
// MessageBox("Error querying table for new message service.",
"HrQueryAllRows",MB_OK);

}

ZeroMemory(&rgval[1], sizeof(SPropValue));
rgval[1].ulPropTag = PR_PROFILE_UNRESOLVED_SERVER;
rgval[1].Value.lpszA = szServer; // this where i am giving the server
name

ZeroMemory(&rgval[0],sizeof(SPropValue));
rgval[0].ulPropTag = PR_PROFILE_UNRESOLVED_NAME;
rgval[0].Value.lpszA = szMailbox; // this where i am giving the mailbox
name
lpSvcAdmin->ConfigureMsgService(
(LPMAPIUID)lpSvcRows->aRow->lpProps[iSvcUID].Value.bin.lpb,
0, /*ulFlags*//*0*/SERVICE_UI_ALWAYS, 2, rgval)

when the ConfigureMsgService( ) API gets executes it should create a profile
automatically when "rgval" parameter is not null.
when the ConfigureMsgService( ) API gets executes it should create a profile
by displaying a propertysheet when "rgval" parameter is null.

But even when my "rgval " parameter is not null it is showing me
propertysheet.
if any one of you had faced this problem can u pls help me out in solving
this problem i would be thankful to you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top