Click here to Skip to main content
15,914,419 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Study materials for C++/MFC Pin
Hamid_RT21-Oct-07 21:59
Hamid_RT21-Oct-07 21:59 
GeneralRe: Study materials for C++/MFC Pin
CodingLover21-Oct-07 22:28
CodingLover21-Oct-07 22:28 
GeneralRe: Study materials for C++/MFC Pin
Hamid_RT21-Oct-07 22:34
Hamid_RT21-Oct-07 22:34 
GeneralRe: Study materials for C++/MFC Pin
CodingLover21-Oct-07 22:43
CodingLover21-Oct-07 22:43 
GeneralRe: Study materials for C++/MFC Pin
Hamid_RT22-Oct-07 2:46
Hamid_RT22-Oct-07 2:46 
GeneralRe: Study materials for C++/MFC Pin
CodingLover22-Oct-07 18:23
CodingLover22-Oct-07 18:23 
GeneralRe: Study materials for C++/MFC Pin
Hamid_RT22-Oct-07 19:25
Hamid_RT22-Oct-07 19:25 
GeneralRe: Study materials for C++/MFC Pin
CodingLover22-Oct-07 20:37
CodingLover22-Oct-07 20:37 
AnswerRe: Study materials for C++/MFC Pin
Hamid_RT21-Oct-07 19:29
Hamid_RT21-Oct-07 19:29 
GeneralRe: Study materials for C++/MFC Pin
CodingLover21-Oct-07 22:26
CodingLover21-Oct-07 22:26 
GeneralRe: Study materials for C++/MFC Pin
Hamid_RT21-Oct-07 22:28
Hamid_RT21-Oct-07 22:28 
GeneralRe: Study materials for C++/MFC Pin
CodingLover21-Oct-07 22:30
CodingLover21-Oct-07 22:30 
AnswerRe: Study materials for C++/MFC Pin
QuickDeveloper21-Oct-07 20:06
QuickDeveloper21-Oct-07 20:06 
GeneralRe: Study materials for C++/MFC Pin
CodingLover21-Oct-07 22:58
CodingLover21-Oct-07 22:58 
GeneralRe: Study materials for C++/MFC Pin
Nelek22-Oct-07 2:56
protectorNelek22-Oct-07 2:56 
GeneralRe: Study materials for C++/MFC Pin
QuickDeveloper22-Oct-07 4:52
QuickDeveloper22-Oct-07 4:52 
AnswerRe: Study materials for C++/MFC Pin
chandu00421-Oct-07 20:27
chandu00421-Oct-07 20:27 
GeneralRe: Study materials for C++/MFC Pin
CodingLover21-Oct-07 22:33
CodingLover21-Oct-07 22:33 
GeneralRe: Study materials for C++/MFC Pin
Ash2021-Oct-07 22:49
Ash2021-Oct-07 22:49 
GeneralRe: Study materials for C++/MFC Pin
CodingLover21-Oct-07 22:56
CodingLover21-Oct-07 22:56 
GeneralRe: Study materials for C++/MFC Pin
pavanbhuma122-Oct-14 0:02
pavanbhuma122-Oct-14 0:02 
QuestionI need to get the unicode properties of an attachment file, help please Pin
monsieur_jj21-Oct-07 16:50
monsieur_jj21-Oct-07 16:50 
Hi all,

Does anybody know or have a code to get the unicode properties of an attachment file?

here is my code:
string MapiAttachment::GetPropUNICODE(LONG PropertyID, UINT codePage = 0)
{
	string pRetVal;
	if ((PROP_TYPE_MASK & PropertyID) != PT_UNICODE)
	{
		return 0;
	}	
	wstring pTemp;
	HRESULT hrProperty;	
	
	LPSPropValue lpPropValue = NULL;

	hrProperty = HrGetOneProp((LPMAPIPROP)m_Attachment, PropertyID, &lpPropValue);
	if (hrProperty == S_OK)
	{			
		//see how many bytes is needed
		int len = WideCharToMultiByte(codePage , 0, (const wchar_t *)lpPropValue[0].Value.lpszW, -1,0, 0, NULL, NULL );		
		
		LPSTR pTemp;		
		MAPIAllocateBuffer(len,(LPVOID *)&pTemp);		
		WideCharToMultiByte(codePage , 0, (const wchar_t *)lpPropValue[0].Value.lpszW, -1,pTemp, len, NULL, NULL );		
		
		pRetVal = pTemp;
		MAPIFreeBuffer(pTemp);
		return (pRetVal);

	}	
	else 
	{
		pRetVal = ("");
		return (pRetVal);
	}	
}


I need to change something at the HrGetOneProp part because it fails there? I hope someone can help me or give me an idea where to get the unicode properties.

Thanks,
Jj
Question[Solved] Close Application from OnTimer problem [modified] Pin
Llasus21-Oct-07 15:36
Llasus21-Oct-07 15:36 
AnswerRe: Close Application from OnTimer problem Pin
Nibu babu thomas21-Oct-07 18:57
Nibu babu thomas21-Oct-07 18:57 
GeneralRe: Close Application from OnTimer problem Pin
Llasus21-Oct-07 19:45
Llasus21-Oct-07 19:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.