Commit 2c59936f authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

regsvr32: Call OleInitialize before registering a DLL.

parent e0eef69a
......@@ -4,7 +4,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = regsvr32.exe
APPMODE = -mconsole
IMPORTS = kernel32
IMPORTS = ole32 kernel32
C_SRCS = \
regsvr32.c
......
......@@ -53,6 +53,7 @@
#include <stdio.h>
#include <string.h>
#include <windows.h>
#include <ole2.h>
typedef HRESULT (*DLLREGISTER) (void);
typedef HRESULT (*DLLUNREGISTER) (void);
......@@ -184,6 +185,7 @@ int main(int argc, char* argv[])
WCHAR* wsCommandLine = NULL;
WCHAR EmptyLine[1] = {0};
OleInitialize(NULL);
/* Strictly, the Microsoft version processes all the flags before
* the files (e.g. regsvr32 file1 /s file2 is silent even for file1.
......@@ -278,5 +280,7 @@ int main(int argc, char* argv[])
return -1;
}
OleUninitialize();
return 0;
}
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