MAPIStubLibrary icon indicating copy to clipboard operation
MAPIStubLibrary copied to clipboard

OpenStreamOnFile has incorrect declaration

Open amtopel opened this issue 2 years ago • 0 comments

The current declaration of OpenStreamOnFile in MAPIUtil.h is as follows:

STDMETHODIMP OpenStreamOnFile(
	LPALLOCATEBUFFER	lpAllocateBuffer,
	LPFREEBUFFER		lpFreeBuffer,
	ULONG				ulFlags,
	__in LPCTSTR		lpszFileName,
	__in_opt LPCTSTR	lpszPrefix,
	LPSTREAM FAR *		lppStream);

But evidently that function expects the file name to be in multibyte only, so the file name's type should be __in LPCSTR. Alternatively, if you could get the API to actually accept a WCHAR file name, that would be even better.

amtopel avatar Mar 24 '22 21:03 amtopel