advpack: Only do_ocx_reg (and thus DllRegisterServer) from RegisterOCX when 'N' is passed as a flag. Clarify documentation.
Gerald Pfeifer
gerald at pfeifer.com
Tue May 11 15:24:47 CDT 2010
This is my humble attempt of addressing Alexandre's feeback at
http://www.winehq.org/pipermail/wine-devel/2010-May/083518.html
It does pass testing for me, even on FreeBSD/i386, but I will say I did
not find the MSDN documentation I located too helpful/clear, and may have
been misled.
As a next step we'd need to look into DllInstall. This change, hopefully,
is a move in the right direction, though. If not, some guidance or one of
the pros looking into it will be appreciated.
Gerald
---
dlls/advpack/advpack.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/dlls/advpack/advpack.c b/dlls/advpack/advpack.c
index 112d38a..f040ec6 100644
--- a/dlls/advpack/advpack.c
+++ b/dlls/advpack/advpack.c
@@ -486,8 +486,10 @@ HRESULT do_ocx_reg(HMODULE hocx, BOOL do_reg)
* NOTES
* OCX - Filename of the OCX to register.
* flags - Controls the operation of RegisterOCX.
- * 'I' Call DllRegisterServer and DllInstall.
- * 'N' Only call DllInstall.
+ * 'I' Call DllInstall and, unless 'N' is specified as well,
+ * DllRegisterServer.
+ * 'N' Do not call DllRegisterServer; only valid if 'I' is
+ * specified too.
* param - Command line passed to DllInstall.
*/
HRESULT WINAPI RegisterOCX(HWND hWnd, HINSTANCE hInst, LPCSTR cmdline, INT show)
@@ -519,8 +521,12 @@ HRESULT WINAPI RegisterOCX(HWND hWnd, HINSTANCE hInst, LPCSTR cmdline, INT show)
if (!hm)
goto done;
- hr = do_ocx_reg(hm, TRUE);
-
+ if(strchrW(str_flags,'I'))
+ {
+ if (!strchrW(str_flags,'N'))
+ hr = do_ocx_reg(hm, TRUE);
+ }
+
done:
FreeLibrary(hm);
HeapFree(GetProcessHeap(), 0, cmdline_copy);
--
1.6.6.2
More information about the wine-patches
mailing list