Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: 12 Aug 2005 06:28:57 -0700,    group: microsoft.public.platformsdk.messaging        back       


ConfigureMsgService causes application crash   
Hello,

I have an application that generates PST files.
I use similar code on lines of HrCreatePersonalStore function to create
new PST.

I pass in PR_DISPLAY_NAME, PR_PST_PATH properties, and if a password is
specified, PR_PST_REMEMBER_PW, PR_PST_PW_SZ_NEW, PR_PST_PW_SZ_OLD
additional properties to ConfigureMsgService.

My problem is, on one of our test machines, this function causes the
application to crash. Interestingly, there is no exception shown but
the process dies a silent death. No traces, dialogs at all!

Here's a piece of code I use:

		cValues = 5;

		hr = MAPIAllocateBuffer(cValues * sizeof(SPropValue),
			(LPVOID *)&aPropVals);

		if (FAILED(hr))
			return E_OUTOFMEMORY;

		int lCurrentIndex = 0;

		aPropVals[lCurrentIndex].ulPropTag =	PR_DISPLAY_NAME_A;
		aPropVals[lCurrentIndex].Value.lpszA =	W2A(lpszPSTDisplayName);
		lCurrentIndex++;

		aPropVals[lCurrentIndex].ulPropTag =	PR_PST_PATH;
		aPropVals[lCurrentIndex].Value.lpszA =	W2A(lpszPSTPath);


		if (_tcslen(lpszPSTPassword) > 0)
		{
			//	only set password related properties if one is specified

			lCurrentIndex++;
			aPropVals[lCurrentIndex].ulPropTag = PR_PST_REMEMBER_PW;
			aPropVals[lCurrentIndex].Value.b =	TRUE;
			lCurrentIndex++;

			aPropVals[lCurrentIndex].ulPropTag =	PR_PST_PW_SZ_NEW;
			aPropVals[lCurrentIndex].Value.lpszA =W2A (lpszPSTPassword);
			lCurrentIndex++;

			aPropVals[lCurrentIndex].ulPropTag =	PR_PST_PW_SZ_OLD;
			aPropVals[lCurrentIndex].Value.lpszA =	*lppszProfilePassword;

		}
		hr = g_lpSvcAdmin->ConfigureMsgService(&g_MsgStoreUID,
			0,
			0 ,
			lCurrentIndex + 1,
			aPropVals);


=============

Has anyone experienced something like this before?
Am I missing anything in my code?

Any help would be much appreciated.

Thanks and regards,
-Abhijit.
date: 12 Aug 2005 06:28:57 -0700   author:   unknown

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us