|
|
Subject:
SetClipboard crashing upon 2nd call with XP
Category: Computers > Programming Asked by: lokesh_chandra-ga List Price: $50.00 |
Posted:
08 Nov 2004 10:02 PST
Expires: 11 Nov 2004 06:49 PST Question ID: 426154 |
Hello, My application is crashing in SetClipboard call only with XP. It works fine with Win-NT and Win-2000. Here's the code snippet: void CTelstudioView::SaveToClipboard() { USES_CONVERSION ; UINT cFormat ; if( m_vecSelectedDO.size() > 0 ) { //register our private clipboard format, and cache the data if(0 != (cFormat = RegisterClipboardFormat(XML_CLIPFORMAT))) { CXMLOleDataSource* pSource = new CXMLOleDataSource(this); if( pSource ) { //save the selected DrawObjects to xml text char *lpszTempName = tmpnam( NULL ) ; if( NULL == lpszTempName ) return ; CFile fileNew ; if( !fileNew.Open( A2CT( lpszTempName ), CFile::modeCreate | CFile::modeWrite ) ) return ; HGLOBAL hGlobal = NULL ; if( !RenderSelectedPACsToXML( &hGlobal ) ) return ; STGMEDIUM stg ; stg.tymed = TYMED_HGLOBAL ; stg.hGlobal = hGlobal ; pSource->CacheData( cFormat, &stg ); pSource->SetClipboard() ; } } } } Any ideas? Thanks -Lokesh |
|
There is no answer at this time. |
|
Subject:
Re: SetClipboard crashing upon 2nd call with XP
From: 12345a-ga on 08 Nov 2004 12:00 PST |
My guess is that Xp breaks the way this call and code works if it worked before in other ms Os's. Ask microsoft about it. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |