Separate the HINSTANCEs used by GetShellOle() and other delay load
functions.
This commit is contained in:
parent
6bbce6cd22
commit
8c1911f65a
|
@ -63,24 +63,25 @@ HRESULT (WINAPI *pOleGetClipboard)(IDataObject** ppDataObj);
|
||||||
*/
|
*/
|
||||||
BOOL GetShellOle(void)
|
BOOL GetShellOle(void)
|
||||||
{
|
{
|
||||||
if(!hShellOle32)
|
static HANDLE hOle32 = NULL;
|
||||||
{
|
if(!hOle32)
|
||||||
hShellOle32 = LoadLibraryA("ole32.dll");
|
{
|
||||||
if(hShellOle32)
|
hOle32 = LoadLibraryA("ole32.dll");
|
||||||
{
|
if(hOle32)
|
||||||
pOleInitialize=(void*)GetProcAddress(hShellOle32,"OleInitialize");
|
{
|
||||||
pOleUninitialize=(void*)GetProcAddress(hShellOle32,"OleUninitialize");
|
pOleInitialize=(void*)GetProcAddress(hOle32,"OleInitialize");
|
||||||
pRegisterDragDrop=(void*)GetProcAddress(hShellOle32,"RegisterDragDrop");
|
pOleUninitialize=(void*)GetProcAddress(hOle32,"OleUninitialize");
|
||||||
pRevokeDragDrop=(void*)GetProcAddress(hShellOle32,"RevokeDragDrop");
|
pRegisterDragDrop=(void*)GetProcAddress(hOle32,"RegisterDragDrop");
|
||||||
pDoDragDrop=(void*)GetProcAddress(hShellOle32,"DoDragDrop");
|
pRevokeDragDrop=(void*)GetProcAddress(hOle32,"RevokeDragDrop");
|
||||||
pReleaseStgMedium=(void*)GetProcAddress(hShellOle32,"ReleaseStgMedium");
|
pDoDragDrop=(void*)GetProcAddress(hOle32,"DoDragDrop");
|
||||||
pOleSetClipboard=(void*)GetProcAddress(hShellOle32,"OleSetClipboard");
|
pReleaseStgMedium=(void*)GetProcAddress(hOle32,"ReleaseStgMedium");
|
||||||
pOleGetClipboard=(void*)GetProcAddress(hShellOle32,"OleGetClipboard");
|
pOleSetClipboard=(void*)GetProcAddress(hOle32,"OleSetClipboard");
|
||||||
|
pOleGetClipboard=(void*)GetProcAddress(hOle32,"OleGetClipboard");
|
||||||
|
|
||||||
pOleInitialize(NULL);
|
pOleInitialize(NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
|
|
Loading…
Reference in New Issue