Signed-off-by: Michael Stefaniuc mstefani@winehq.org --- dlls/sti/sti.c | 17 ++++------------- dlls/sti/tests/sti.c | 2 +- 2 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/dlls/sti/sti.c b/dlls/sti/sti.c index 962371f92d2..0bb60382979 100644 --- a/dlls/sti/sti.c +++ b/dlls/sti/sti.c @@ -32,14 +32,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(sti);
-static const WCHAR registeredAppsLaunchPath[] = { - 'S','O','F','T','W','A','R','E','\', - 'M','i','c','r','o','s','o','f','t','\', - 'W','i','n','d','o','w','s','\', - 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\', - 'S','t','i','l','l','I','m','a','g','e','\', - 'R','e','g','i','s','t','e','r','e','d',' ','A','p','p','l','i','c','a','t','i','o','n','s',0 -}; +static const WCHAR registeredAppsLaunchPath[] = + L"SOFTWARE\Microsoft\Windows\CurrentVersion\StillImage\Registered Applications";
typedef struct _stillimage { @@ -134,10 +128,7 @@ static HRESULT WINAPI stillimagew_GetSTILaunchInformation(IStillImageW *iface, L static HRESULT WINAPI stillimagew_RegisterLaunchApplication(IStillImageW *iface, LPWSTR pwszAppName, LPWSTR pwszCommandLine) { - static const WCHAR format[] = {'%','s',' ','%','s',0}; - static const WCHAR commandLineSuffix[] = { - '/','S','t','i','D','e','v','i','c','e',':','%','1',' ', - '/','S','t','i','E','v','e','n','t',':','%','2',0}; + static const WCHAR commandLineSuffix[] = L"/StiDevice:%1 /StiEvent:%2"; HKEY registeredAppsKey = NULL; DWORD ret; HRESULT hr = S_OK; @@ -152,7 +143,7 @@ static HRESULT WINAPI stillimagew_RegisterLaunchApplication(IStillImageW *iface, WCHAR *value = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); if (value) { - swprintf(value, len, format, pwszCommandLine, commandLineSuffix); + swprintf(value, len, L"%s %s", pwszCommandLine, commandLineSuffix); ret = RegSetValueExW(registeredAppsKey, pwszAppName, 0, REG_SZ, (BYTE*)value, (lstrlenW(value)+1)*sizeof(WCHAR)); if (ret != ERROR_SUCCESS) diff --git a/dlls/sti/tests/sti.c b/dlls/sti/tests/sti.c index bd8b7b6b171..a87ab9fe47e 100644 --- a/dlls/sti/tests/sti.c +++ b/dlls/sti/tests/sti.c @@ -230,7 +230,7 @@ static void test_stillimage_aggregation(void)
static void test_launch_app_registry(void) { - static WCHAR appName[] = {'w','i','n','e','s','t','i','t','e','s','t','a','p','p',0}; + static WCHAR appName[] = L"winestitestapp"; IStillImageW *pStiW = NULL; HRESULT hr;