sti: Build with msvcrt.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2019-06-21 08:49:15 +02:00
parent bb12daf2b0
commit 007997c4d4
2 changed files with 5 additions and 4 deletions

View File

@ -2,6 +2,8 @@ MODULE = sti.dll
IMPORTLIB = sti IMPORTLIB = sti
IMPORTS = uuid ole32 oleaut32 rpcrt4 advapi32 IMPORTS = uuid ole32 oleaut32 rpcrt4 advapi32
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \ C_SRCS = \
sti.c \ sti.c \
sti_main.c sti_main.c

View File

@ -29,7 +29,6 @@
#include "sti.h" #include "sti.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(sti); WINE_DEFAULT_DEBUG_CHANNEL(sti);
@ -149,11 +148,11 @@ static HRESULT WINAPI stillimagew_RegisterLaunchApplication(IStillImageW *iface,
ret = RegCreateKeyW(HKEY_LOCAL_MACHINE, registeredAppsLaunchPath, &registeredAppsKey); ret = RegCreateKeyW(HKEY_LOCAL_MACHINE, registeredAppsLaunchPath, &registeredAppsKey);
if (ret == ERROR_SUCCESS) if (ret == ERROR_SUCCESS)
{ {
WCHAR *value = HeapAlloc(GetProcessHeap(), 0, size_t len = lstrlenW(pwszCommandLine) + 1 + lstrlenW(commandLineSuffix) + 1;
(lstrlenW(pwszCommandLine) + 1 + lstrlenW(commandLineSuffix) + 1) * sizeof(WCHAR)); WCHAR *value = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
if (value) if (value)
{ {
sprintfW(value, format, pwszCommandLine, commandLineSuffix); swprintf(value, len, format, pwszCommandLine, commandLineSuffix);
ret = RegSetValueExW(registeredAppsKey, pwszAppName, 0, ret = RegSetValueExW(registeredAppsKey, pwszAppName, 0,
REG_SZ, (BYTE*)value, (lstrlenW(value)+1)*sizeof(WCHAR)); REG_SZ, (BYTE*)value, (lstrlenW(value)+1)*sizeof(WCHAR));
if (ret != ERROR_SUCCESS) if (ret != ERROR_SUCCESS)