Kaydet (Commit) d0844b9e authored tarafından Rüdiger Timm's avatar Rüdiger Timm

INTEGRATION: CWS hro02 (1.5.34); FILE MERGED

2006/02/06 15:12:19 hro 1.5.34.1: #122828# #122884# #124842# Initialize OLE/COM in every STA thread
üst 63d68d9d
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: getfilenamewrapper.cxx,v $ * $RCSfile: getfilenamewrapper.cxx,v $
* *
* $Revision: 1.5 $ * $Revision: 1.6 $
* *
* last change: $Author: rt $ $Date: 2005-09-08 23:46:05 $ * last change: $Author: rt $ $Date: 2006-02-09 17:03:26 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -80,6 +80,8 @@ namespace /* private */ ...@@ -80,6 +80,8 @@ namespace /* private */
GetFileNameParam* lpgfnp = GetFileNameParam* lpgfnp =
reinterpret_cast<GetFileNameParam*>(pParam); reinterpret_cast<GetFileNameParam*>(pParam);
HRESULT hr = OleInitialize( NULL );
if (lpgfnp->m_bOpen) if (lpgfnp->m_bOpen)
lpgfnp->m_bRet = GetOpenFileName(lpgfnp->m_lpofn); lpgfnp->m_bRet = GetOpenFileName(lpgfnp->m_lpofn);
else else
...@@ -87,6 +89,9 @@ namespace /* private */ ...@@ -87,6 +89,9 @@ namespace /* private */
lpgfnp->m_ExtErr = CommDlgExtendedError(); lpgfnp->m_ExtErr = CommDlgExtendedError();
if ( SUCCEEDED( hr ) )
OleUninitialize();
return 0; return 0;
} }
...@@ -161,8 +166,13 @@ bool CGetFileNameWrapper::getOpenFileName(LPOPENFILENAME lpofn) ...@@ -161,8 +166,13 @@ bool CGetFileNameWrapper::getOpenFileName(LPOPENFILENAME lpofn)
} }
else else
{ {
HRESULT hr = OleInitialize( NULL );
bRet = GetOpenFileName(lpofn); bRet = GetOpenFileName(lpofn);
m_ExtendedDialogError = CommDlgExtendedError(); m_ExtendedDialogError = CommDlgExtendedError();
if ( SUCCEEDED( hr ) )
OleUninitialize();
} }
return bRet; return bRet;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment