Click here to Skip to main content
15,910,981 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: where are dialog box saved on disk Pin
David Crow23-Oct-07 3:50
David Crow23-Oct-07 3:50 
QuestionDLL property Pin
George_George22-Oct-07 19:01
George_George22-Oct-07 19:01 
AnswerRe: DLL property Pin
chnuser22-Oct-07 19:07
chnuser22-Oct-07 19:07 
GeneralRe: DLL property Pin
George_George22-Oct-07 20:31
George_George22-Oct-07 20:31 
AnswerRe: DLL property Pin
Naveen22-Oct-07 19:47
Naveen22-Oct-07 19:47 
GeneralRe: DLL property Pin
George_George22-Oct-07 20:49
George_George22-Oct-07 20:49 
Questionwhy CreateView(&ccontext, AFX_IDW_PANE_FIRST) return NULL in win2000? Pin
chnuser22-Oct-07 18:58
chnuser22-Oct-07 18:58 
QuestionAccess violation writing location 0x10161b7c. Pin
monsieur_jj22-Oct-07 17:14
monsieur_jj22-Oct-07 17:14 
Hi all,

I am getting this error when I try to retrieve an attachment property here is my code:

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);

	}	


When it passes the HrGetOneProp I am getting Access violation writing location 0x10161b7c. and it is pointed here:

AutoMapiPtr<SPropValue> m_PropertyCache;
	protected:
		PropertyMap m_Properties;
		Attachment(AutoMapiPtr<SPropValue>& PropertyCache, PropertyMap &Properties) : 
			m_PropertyCache(PropertyCache), m_Properties(Properties)
		{
		}
	public:
		virtual ~Attachment()
		{
		}
		virtual void SaveToFile(const wchar_t* FileName) = 0;

		FoundProperty FindProperty(ULONG PropTag)
		{
			return m_Properties.find(PropTag);
		}

		virtual std::wstring Type() = 0;
	};


at the
virtual ~Attachment()
{
}

I am not sure why as I know the property I search for exists.

Thanks I hope you can help me resolve this issue,

Jj
QuestionDynamic Enums Pin
aplatoon22-Oct-07 15:25
aplatoon22-Oct-07 15:25 
AnswerRe: Dynamic Enums Pin
Michael Dunn22-Oct-07 20:17
sitebuilderMichael Dunn22-Oct-07 20:17 
QuestionPlugin for windows 3.1 \ 3.11 ???? Pin
media90Cj22-Oct-07 14:27
media90Cj22-Oct-07 14:27 
QuestionGDI+ help needed Pin
Kiran Satish22-Oct-07 11:34
Kiran Satish22-Oct-07 11:34 
AnswerRe: GDI+ help needed Pin
Llasus22-Oct-07 13:14
Llasus22-Oct-07 13:14 
GeneralRe: GDI+ help needed Pin
Kiran Satish22-Oct-07 15:50
Kiran Satish22-Oct-07 15:50 
QuestionHow do you send a button click message to parent window Pin
littleGreenDude22-Oct-07 8:07
littleGreenDude22-Oct-07 8:07 
AnswerRe: How do you send a button click message to parent window Pin
David Crow22-Oct-07 8:43
David Crow22-Oct-07 8:43 
GeneralRe: How do you send a button click message to parent window Pin
littleGreenDude22-Oct-07 8:47
littleGreenDude22-Oct-07 8:47 
GeneralRe: How do you send a button click message to parent window Pin
Maximilien22-Oct-07 8:55
Maximilien22-Oct-07 8:55 
GeneralRe: How do you send a button click message to parent window Pin
David Crow22-Oct-07 9:00
David Crow22-Oct-07 9:00 
GeneralRe: How do you send a button click message to parent window Pin
Randor 22-Oct-07 10:37
professional Randor 22-Oct-07 10:37 
AnswerRe: How do you send a button click message to parent window Pin
Paresh Chitte22-Oct-07 19:05
Paresh Chitte22-Oct-07 19:05 
AnswerRe: How do you send a button click message to parent window Pin
Naveen22-Oct-07 19:53
Naveen22-Oct-07 19:53 
AnswerRe: How do you send a button click message to parent window Pin
Mark Salsbery23-Oct-07 8:57
Mark Salsbery23-Oct-07 8:57 
QuestionCTreeCtrl and SetRedraw Pin
bob1697222-Oct-07 5:08
bob1697222-Oct-07 5:08 
QuestionCDialog and Mouse clicks Pin
mcsherry22-Oct-07 4:33
mcsherry22-Oct-07 4:33 

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.