Commit bfab815a authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

sti: Use wide-char string literals.

parent b3e68482
...@@ -32,14 +32,8 @@ ...@@ -32,14 +32,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(sti); WINE_DEFAULT_DEBUG_CHANNEL(sti);
static const WCHAR registeredAppsLaunchPath[] = { static const WCHAR registeredAppsLaunchPath[] =
'S','O','F','T','W','A','R','E','\\', L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\StillImage\\Registered Applications";
'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
};
typedef struct _stillimage typedef struct _stillimage
{ {
...@@ -134,10 +128,7 @@ static HRESULT WINAPI stillimagew_GetSTILaunchInformation(IStillImageW *iface, L ...@@ -134,10 +128,7 @@ static HRESULT WINAPI stillimagew_GetSTILaunchInformation(IStillImageW *iface, L
static HRESULT WINAPI stillimagew_RegisterLaunchApplication(IStillImageW *iface, LPWSTR pwszAppName, static HRESULT WINAPI stillimagew_RegisterLaunchApplication(IStillImageW *iface, LPWSTR pwszAppName,
LPWSTR pwszCommandLine) LPWSTR pwszCommandLine)
{ {
static const WCHAR format[] = {'%','s',' ','%','s',0}; static const WCHAR commandLineSuffix[] = L"/StiDevice:%1 /StiEvent:%2";
static const WCHAR commandLineSuffix[] = {
'/','S','t','i','D','e','v','i','c','e',':','%','1',' ',
'/','S','t','i','E','v','e','n','t',':','%','2',0};
HKEY registeredAppsKey = NULL; HKEY registeredAppsKey = NULL;
DWORD ret; DWORD ret;
HRESULT hr = S_OK; HRESULT hr = S_OK;
...@@ -152,7 +143,7 @@ static HRESULT WINAPI stillimagew_RegisterLaunchApplication(IStillImageW *iface, ...@@ -152,7 +143,7 @@ static HRESULT WINAPI stillimagew_RegisterLaunchApplication(IStillImageW *iface,
WCHAR *value = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); WCHAR *value = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
if (value) if (value)
{ {
swprintf(value, len, format, pwszCommandLine, commandLineSuffix); swprintf(value, len, L"%s %s", 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)
......
...@@ -230,7 +230,7 @@ static void test_stillimage_aggregation(void) ...@@ -230,7 +230,7 @@ static void test_stillimage_aggregation(void)
static void test_launch_app_registry(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; IStillImageW *pStiW = NULL;
HRESULT hr; HRESULT hr;
......
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