Commit fdae80d4 authored by Hugh McMaster's avatar Hugh McMaster Committed by Alexandre Julliard

regsvr32: Convert codebase to Unicode.

parent 611b6725
......@@ -11957,7 +11957,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr "فشل فتح '%1'\n"
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -11784,7 +11784,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr ""
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -12047,8 +12047,8 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr "regsvr32: S'ha fallat en obrir el DLL '%1'\n"
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgstr "regsvr32: %1 no està implementat en el DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr "regsvr32: '%1!S!' no està implementat en el DLL '%2'\n"
#: regsvr32.rc:44
msgid "regsvr32: Failed to register DLL '%1'\n"
......
......@@ -11833,7 +11833,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr "Otevření „%1“ se nezdařilo\n"
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -12094,7 +12094,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr "Kunne ikke åbne «%1»\n"
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -12011,8 +12011,8 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr "regsvr32: DLL '%1' konnte nicht geladen werden\n"
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgstr "regsvr32: %1 nicht in DLL '%2' implementiert\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr "regsvr32: '%1!S!' nicht in DLL '%2' implementiert\n"
#: regsvr32.rc:44
msgid "regsvr32: Failed to register DLL '%1'\n"
......
......@@ -11569,7 +11569,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr ""
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -11933,8 +11933,8 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr "regsvr32: Failed to load DLL '%1'\n"
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgstr "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
#: regsvr32.rc:44
msgid "regsvr32: Failed to register DLL '%1'\n"
......
......@@ -11933,8 +11933,8 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr "regsvr32: Failed to load DLL '%1'\n"
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgstr "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
#: regsvr32.rc:44
msgid "regsvr32: Failed to register DLL '%1'\n"
......
......@@ -11459,7 +11459,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr ""
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -12176,7 +12176,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr "No se pudo abrir '%1'\n"
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -11568,7 +11568,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr ""
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -11913,8 +11913,8 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr "regsvr32: DLL:n '%1' lataaminen epäonnistui\n"
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgstr "regsvr32: %1-toteutusta ei ole DLL:ssä '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr "regsvr32: '%1!S!'-toteutusta ei ole DLL:ssä '%2'\n"
#: regsvr32.rc:44
msgid "regsvr32: Failed to register DLL '%1'\n"
......
......@@ -12092,8 +12092,8 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr "regsvr32 : Impossible de charger la DLL « %1 »\n"
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgstr "regsvr32 : %1 non implémentée dans la DLL « %2 »\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr "regsvr32 : « %1!S! » non implémentée dans la DLL « %2 »\n"
#: regsvr32.rc:44
msgid "regsvr32: Failed to register DLL '%1'\n"
......
......@@ -12148,7 +12148,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr "Failed to open '%1'\n"
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -11371,7 +11371,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr ""
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -11648,7 +11648,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr "Neuspjelo otvaranje '%1'\n"
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -12100,7 +12100,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr "'%1' megnyitása sikertelen\n"
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -12176,7 +12176,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr "Impossibile aprire '%1'\n"
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -11936,8 +11936,8 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr "regsvr32: '%1' を読み込めませんでした\n"
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgstr "regsvr32: %1はDLL '%2'内で実装されていません\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr "regsvr32: '%1!S!'はDLL '%2'内で実装されていません\n"
#: regsvr32.rc:44
msgid "regsvr32: Failed to register DLL '%1'\n"
......
......@@ -11981,7 +11981,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr "'%1' 열기 실패\n"
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -11939,8 +11939,8 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr "regsvr32: Nepavyko įkelti DLL bibliotekos „%1“\n"
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgstr "regsvr32: %1 neįgyvendinta DLL bibliotekoje „%2“\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr "regsvr32: „%1!S!“ neįgyvendinta DLL bibliotekoje „%2“\n"
#: regsvr32.rc:44
msgid "regsvr32: Failed to register DLL '%1'\n"
......
......@@ -11371,7 +11371,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr ""
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -11999,7 +11999,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr "Klarte ikke åpne «%1»\n"
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -12142,7 +12142,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr "Openen van '%1' is mislukt\n"
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -11371,7 +11371,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr ""
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -11371,7 +11371,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr ""
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -12005,8 +12005,8 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr "regsvr32: Nieudane wczytywanie biblioteki DLL '%1'\n"
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgstr "regsvr32: %1 nie jest zaimplementowana w bibliotece DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr "regsvr32: '%1!S!' nie jest zaimplementowana w bibliotece DLL '%2'\n"
#: regsvr32.rc:44
msgid "regsvr32: Failed to register DLL '%1'\n"
......
......@@ -12015,8 +12015,8 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr "regsvr32: Falha ao carregar a DLL '%1'\n"
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgstr "regsvr32: %1 não implementado na DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr "regsvr32: '%1!S!' não implementado na DLL '%2'\n"
#: regsvr32.rc:44
msgid "regsvr32: Failed to register DLL '%1'\n"
......
......@@ -11974,7 +11974,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr "Falhou ao abrir '%1'\n"
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -11457,7 +11457,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr ""
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -12182,7 +12182,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr "Deschiderea „%1” a eșuat\n"
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -11939,8 +11939,8 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr "regsvr32: не удалось загрузить DLL «%1»\n"
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgstr "regsvr32: %1 не реализован в DLL «%2»\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr "regsvr32: «%1!S!» не реализован в DLL «%2»\n"
#: regsvr32.rc:44
msgid "regsvr32: Failed to register DLL '%1'\n"
......
......@@ -11614,7 +11614,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr ""
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -12122,7 +12122,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr "Odpiranje '%1' je spodletelo\n"
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -12039,7 +12039,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr "Отварање „%s“ датотеке није успело\n"
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -12186,7 +12186,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr "Otvaranje „%s“ datoteke nije uspelo\n"
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -11889,7 +11889,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr "Misslyckades med att öppna '%1'\n"
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -11371,7 +11371,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr ""
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -11612,7 +11612,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr ""
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -11948,7 +11948,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr "'%1' açılamadı\n"
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -12031,7 +12031,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr "regsvr32: Не вдалося завантажити DLL '%1'\n"
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr "regsvr32: %1 не реалізовано у DLL '%2'\n"
#: regsvr32.rc:44
......
......@@ -11517,7 +11517,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr ""
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -11307,7 +11307,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr ""
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -11473,7 +11473,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr ""
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
......@@ -11866,7 +11866,7 @@ msgid "regsvr32: Failed to load DLL '%1'\n"
msgstr "開啟 %1 失敗\n"
#: regsvr32.rc:43
msgid "regsvr32: %1 not implemented in DLL '%2'\n"
msgid "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
msgstr ""
#: regsvr32.rc:44
......
MODULE = regsvr32.exe
APPMODE = -mconsole
APPMODE = -mconsole -municode
IMPORTS = ole32 user32
C_SRCS = \
......
......@@ -51,11 +51,10 @@
#include "config.h"
#include "wine/port.h"
#include <string.h>
#include <ctype.h>
#include <windows.h>
#include <ole2.h>
#include "regsvr32.h"
#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(regsvr32);
......@@ -68,14 +67,14 @@ static BOOL Silent = FALSE;
static void __cdecl output_write(UINT id, ...)
{
char fmt[1024];
WCHAR fmt[1024];
__ms_va_list va_args;
char *str;
WCHAR *str;
DWORD len, nOut, ret;
if (Silent) return;
if (!LoadStringA(GetModuleHandleA(NULL), id, fmt, sizeof(fmt)/sizeof(fmt[0])))
if (!LoadStringW(GetModuleHandleW(NULL), id, fmt, sizeof(fmt)/sizeof(fmt[0])))
{
WINE_FIXME("LoadString failed with %d\n", GetLastError());
return;
......@@ -83,19 +82,19 @@ static void __cdecl output_write(UINT id, ...)
__ms_va_start(va_args, id);
SetLastError(NO_ERROR);
len = FormatMessageA(FORMAT_MESSAGE_FROM_STRING|FORMAT_MESSAGE_ALLOCATE_BUFFER,
fmt, 0, 0, (LPSTR)&str, 0, &va_args);
len = FormatMessageW(FORMAT_MESSAGE_FROM_STRING|FORMAT_MESSAGE_ALLOCATE_BUFFER,
fmt, 0, 0, (LPWSTR)&str, 0, &va_args);
__ms_va_end(va_args);
if (len == 0 && GetLastError() != NO_ERROR)
{
WINE_FIXME("Could not format string: le=%u, fmt=%s\n", GetLastError(), wine_dbgstr_a(fmt));
WINE_FIXME("Could not format string: le=%u, fmt=%s\n", GetLastError(), wine_dbgstr_w(fmt));
return;
}
ret = WriteConsoleA(GetStdHandle(STD_OUTPUT_HANDLE), str, len, &nOut, NULL);
ret = WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), str, len, &nOut, NULL);
if (!ret)
WINE_WARN("regsvr32: WriteConsoleA() failed.\n");
WINE_WARN("regsvr32: WriteConsoleW() failed.\n");
LocalFree(str);
}
......@@ -108,11 +107,11 @@ static void __cdecl output_write(UINT id, ...)
* procName - name of the procedure to load from dll
* pDllHanlde - output variable receives handle of the loaded dll.
*/
static VOID *LoadProc(const char* strDll, const char* procName, HMODULE* DllHandle)
static VOID *LoadProc(const WCHAR* strDll, const char* procName, HMODULE* DllHandle)
{
VOID* (*proc)(void);
*DllHandle = LoadLibraryExA(strDll, 0, LOAD_WITH_ALTERED_SEARCH_PATH);
*DllHandle = LoadLibraryExW(strDll, 0, LOAD_WITH_ALTERED_SEARCH_PATH);
if(!*DllHandle)
{
output_write(STRING_DLL_LOAD_FAILED, strDll);
......@@ -128,7 +127,7 @@ static VOID *LoadProc(const char* strDll, const char* procName, HMODULE* DllHand
return proc;
}
static int RegisterDll(const char* strDll)
static int RegisterDll(const WCHAR* strDll)
{
HRESULT hr;
DLLREGISTER pfRegister;
......@@ -151,7 +150,7 @@ static int RegisterDll(const char* strDll)
return 0;
}
static int UnregisterDll(char* strDll)
static int UnregisterDll(const WCHAR* strDll)
{
HRESULT hr;
DLLUNREGISTER pfUnregister;
......@@ -174,7 +173,7 @@ static int UnregisterDll(char* strDll)
return 0;
}
static int InstallDll(BOOL install, char *strDll, WCHAR *command_line)
static int InstallDll(BOOL install, const WCHAR *strDll, const WCHAR *command_line)
{
HRESULT hr;
DLLINSTALL pfInstall;
......@@ -203,13 +202,11 @@ static int InstallDll(BOOL install, char *strDll, WCHAR *command_line)
return 0;
}
static WCHAR *parse_command_line(char *command_line)
static WCHAR *parse_command_line(WCHAR *command_line)
{
WCHAR *ret = NULL;
if (command_line[0] == ':' && command_line[1])
{
int len = strlen(command_line);
int len = strlenW(command_line);
command_line++;
len--;
......@@ -225,16 +222,12 @@ static WCHAR *parse_command_line(char *command_line)
}
}
if (command_line[0])
{
len = MultiByteToWideChar(CP_ACP, 0, command_line, -1, NULL, 0);
ret = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
if (ret) MultiByteToWideChar(CP_ACP, 0, command_line, -1, ret, len);
}
return command_line;
}
return ret;
return NULL;
}
int main(int argc, char* argv[])
int wmain(int argc, WCHAR* argv[])
{
int i;
BOOL CallRegister = TRUE;
......@@ -255,7 +248,7 @@ int main(int argc, char* argv[])
{
if ((argv[i][0] == '/' || argv[i][0] == '-') && (!argv[i][2] || argv[i][2] == ':'))
{
switch (tolower(argv[i][1]))
switch (tolowerW(argv[i][1]))
{
case 'u':
Unregister = TRUE;
......@@ -265,7 +258,7 @@ int main(int argc, char* argv[])
break;
case 'i':
CallInstall = TRUE;
wsCommandLine = parse_command_line(argv[i] + strlen("/i"));
wsCommandLine = parse_command_line(argv[i] + 2); /* argv[i] + strlen("/i") */
if (!wsCommandLine)
wsCommandLine = EmptyLine;
break;
......@@ -283,7 +276,7 @@ int main(int argc, char* argv[])
}
else
{
char *DllName = argv[i];
WCHAR *DllName = argv[i];
int res = 0;
DllFound = TRUE;
......
......@@ -39,7 +39,7 @@ Options:\n\
\ [/n] Do not call DllRegisterServer. This option must be used with [/i].\n\n"
STRING_UNRECOGNIZED_SWITCH, "regsvr32: Invalid or unrecognized switch [%1]\n\n"
STRING_DLL_LOAD_FAILED, "regsvr32: Failed to load DLL '%1'\n"
STRING_PROC_NOT_IMPLEMENTED, "regsvr32: %1 not implemented in DLL '%2'\n"
STRING_PROC_NOT_IMPLEMENTED, "regsvr32: '%1!S!' not implemented in DLL '%2'\n"
STRING_REGISTER_FAILED, "regsvr32: Failed to register DLL '%1'\n"
STRING_REGISTER_SUCCESSFUL, "regsvr32: Successfully registered DLL '%1'\n"
STRING_UNREGISTER_FAILED, "regsvr32: Failed to unregister DLL '%1'\n"
......
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