Separate the HINSTANCEs used by GetShellOle() and other delay load
functions.
This commit is contained in:
parent
6bbce6cd22
commit
8c1911f65a
|
@ -63,19 +63,20 @@ HRESULT (WINAPI *pOleGetClipboard)(IDataObject** ppDataObj);
|
|||
*/
|
||||
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");
|
||||
pRegisterDragDrop=(void*)GetProcAddress(hShellOle32,"RegisterDragDrop");
|
||||
pRevokeDragDrop=(void*)GetProcAddress(hShellOle32,"RevokeDragDrop");
|
||||
pDoDragDrop=(void*)GetProcAddress(hShellOle32,"DoDragDrop");
|
||||
pReleaseStgMedium=(void*)GetProcAddress(hShellOle32,"ReleaseStgMedium");
|
||||
pOleSetClipboard=(void*)GetProcAddress(hShellOle32,"OleSetClipboard");
|
||||
pOleGetClipboard=(void*)GetProcAddress(hShellOle32,"OleGetClipboard");
|
||||
pOleInitialize=(void*)GetProcAddress(hOle32,"OleInitialize");
|
||||
pOleUninitialize=(void*)GetProcAddress(hOle32,"OleUninitialize");
|
||||
pRegisterDragDrop=(void*)GetProcAddress(hOle32,"RegisterDragDrop");
|
||||
pRevokeDragDrop=(void*)GetProcAddress(hOle32,"RevokeDragDrop");
|
||||
pDoDragDrop=(void*)GetProcAddress(hOle32,"DoDragDrop");
|
||||
pReleaseStgMedium=(void*)GetProcAddress(hOle32,"ReleaseStgMedium");
|
||||
pOleSetClipboard=(void*)GetProcAddress(hOle32,"OleSetClipboard");
|
||||
pOleGetClipboard=(void*)GetProcAddress(hOle32,"OleGetClipboard");
|
||||
|
||||
pOleInitialize(NULL);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue