A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

using ConfigureMsgService( ) i have a doubt can any body help me



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 18th 06, 12:03 PM posted to microsoft.public.outlook.program_vba
Sanjay_S via OfficeKB.com
external usenet poster
 
Posts: 8
Default using ConfigureMsgService( ) i have a doubt can any body help me

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.

--
Message posted via http://www.officekb.com

Ads
  #2  
Old October 18th 06, 07:26 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default using ConfigureMsgService( ) i have a doubt can any body help me

Wouldn't you expect that to happen if you pass the SERVICE_UI_ALWAYS flag?
BTW, Extended MAPI questions are better answered in the programmer.messaging
newsgroup.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Sanjay_S via OfficeKB.com" u27530@uwe wrote in message
news:67f16cef7b746@uwe...
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.

--
Message posted via http://www.officekb.com



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Color in the body Alfred Outlook - Using Forms 1 November 30th 06 05:28 PM
MAPI_UNICODE flag in CreateMsgService , ConfigureMsgService methods [email protected] Outlook - General Queries 2 October 18th 06 06:41 AM
hello every body uideal Outlook Express 1 October 9th 06 11:53 PM
Attachements in Body of Mail - Possible? Scooby Jones Outlook - General Queries 3 September 19th 06 06:33 PM
mailto - html in body Giorgio Outlook Express 7 June 21st 06 03:41 PM


All times are GMT +1. The time now is 12:13 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.