Commit c53d554b authored by Matthew Mastracci's avatar Matthew Mastracci Committed by Alexandre Julliard

Implement RegisterOCX.

Stub for DelNodeRunDLL32.
parent 72a4df94
......@@ -28,10 +28,13 @@
#include "winnls.h"
#include "setupapi.h"
#include "advpub.h"
#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(advpack);
typedef HRESULT (WINAPI *DLLREGISTER) (void);
/***********************************************************************
* DllMain (ADVPACK.@)
......@@ -172,3 +175,55 @@ HRESULT WINAPI GetVersionFromFileEx( LPSTR lpszFilename, LPDWORD pdwMSVer,
return S_OK;
}
/***********************************************************************
* RegisterOCX (ADVPACK.@)
*/
void WINAPI RegisterOCX( HWND hWnd, HINSTANCE hInst, LPCSTR cmdline, INT show )
{
WCHAR wszBuff[MAX_PATH];
WCHAR* pwcComma;
HMODULE hm;
DLLREGISTER pfnRegister;
HRESULT hr;
TRACE("(%s)\n", cmdline);
MultiByteToWideChar(CP_ACP, 0, cmdline, strlen(cmdline), wszBuff, MAX_PATH);
if ((pwcComma = strchrW( wszBuff, ',' ))) *pwcComma = 0;
TRACE("Parsed DLL name (%s)\n", debugstr_w(wszBuff));
hm = LoadLibraryExW(wszBuff, 0, LOAD_WITH_ALTERED_SEARCH_PATH);
if (!hm)
{
ERR("Couldn't load DLL: %s\n", debugstr_w(wszBuff));
return;
}
pfnRegister = (DLLREGISTER)GetProcAddress(hm, "DllRegisterServer");
if (pfnRegister == NULL)
{
ERR("DllRegisterServer entry point not found\n");
}
else
{
hr = pfnRegister();
if (hr != S_OK)
{
ERR("DllRegisterServer entry point returned %08lx\n", hr);
}
}
TRACE("Successfully registered OCX\n");
FreeLibrary(hm);
}
/***********************************************************************
* DelNodeRunDLL32 (ADVPACK.@)
*/
void WINAPI DelNodeRunDLL32( HWND hWnd, HINSTANCE hInst, LPCSTR cmdline, INT show )
{
FIXME("(%s) FIXME: stub\n", cmdline);
}
......@@ -2,7 +2,7 @@
@ stub AdvInstallFile
@ stub CloseINFEngine
@ stub DelNode
@ stub DelNodeRunDLL32
@ stdcall DelNodeRunDLL32(ptr ptr str long)
@ stdcall DllMain(long long ptr)
@ stdcall DoInfInstall(ptr)
@ stub ExecuteCab
......@@ -23,7 +23,7 @@
@ stub RegRestoreAll
@ stub RegSaveRestore
@ stub RegSaveRestoreOnINF
@ stub RegisterOCX
@ stdcall RegisterOCX(ptr ptr str long)
@ stub RunSetupCommand
@ stub SetPerUserSecValues
@ stub TranslateInfString
......
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