regsvr32: Call OleInitialize before registering a DLL.

This commit is contained in:
Dmitry Timoshkov 2006-02-09 17:48:12 +01:00 committed by Alexandre Julliard
parent e0eef69a21
commit 2c59936fee
2 changed files with 5 additions and 1 deletions

View file

@ -4,7 +4,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = regsvr32.exe
APPMODE = -mconsole
IMPORTS = kernel32
IMPORTS = ole32 kernel32
C_SRCS = \
regsvr32.c

View file

@ -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;
}