packager: Use wide-char string literals.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
8bfdc84a19
commit
cc8adf7db1
|
@ -181,8 +181,7 @@ static HRESULT WINAPI OleObject_GetClipboardData(IOleObject *iface, DWORD dwRese
|
|||
|
||||
static HRESULT do_activate_object(struct Package *This, HWND parent)
|
||||
{
|
||||
static const WCHAR openW[] = {'o','p','e','n',0};
|
||||
ShellExecuteW(parent, openW, This->filename, NULL, NULL, SW_SHOW);
|
||||
ShellExecuteW(parent, L"open", This->filename, NULL, NULL, SW_SHOW);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -396,11 +395,9 @@ static HRESULT WINAPI PersistStorage_Load(IPersistStorage* iface,
|
|||
WCHAR *stream_filename;
|
||||
WCHAR *base_end, extension[MAX_PATH];
|
||||
|
||||
static const WCHAR ole10nativeW[] = {0x0001,'O','l','e','1','0','N','a','t','i','v','e',0};
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, pStg);
|
||||
|
||||
hr = IStorage_OpenStream(pStg, ole10nativeW, NULL,
|
||||
hr = IStorage_OpenStream(pStg, L"\1Ole10Native", NULL,
|
||||
STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stream);
|
||||
if(FAILED(hr)){
|
||||
TRACE("OpenStream gave: %08x\n", hr);
|
||||
|
@ -489,8 +486,6 @@ static HRESULT WINAPI PersistStorage_Load(IPersistStorage* iface,
|
|||
file = CreateFileW(This->filename, GENERIC_WRITE, FILE_SHARE_READ, NULL,
|
||||
CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
while(file == INVALID_HANDLE_VALUE){
|
||||
static const WCHAR fmtW[] = {' ','(','%','u',')',0};
|
||||
|
||||
if(GetLastError() != ERROR_FILE_EXISTS){
|
||||
WARN("CreateFile failed: %u\n", GetLastError());
|
||||
hr = E_FAIL;
|
||||
|
@ -499,7 +494,7 @@ static HRESULT WINAPI PersistStorage_Load(IPersistStorage* iface,
|
|||
|
||||
/* file exists, so increment file name and try again */
|
||||
++i;
|
||||
wsprintfW(base_end, fmtW, i);
|
||||
wsprintfW(base_end, L" (%u)", i);
|
||||
lstrcatW(base_end, extension);
|
||||
|
||||
file = CreateFileW(This->filename, GENERIC_WRITE, FILE_SHARE_READ, NULL,
|
||||
|
|
|
@ -210,9 +210,7 @@ static HRESULT WINAPI stg_CreateStream(IStorage* This, LPCOLESTR pwcsName,
|
|||
static HRESULT WINAPI stg_OpenStream(IStorage* This, LPCOLESTR pwcsName,
|
||||
void *reserved1, DWORD grfMode, DWORD reserved2, IStream **ppstm)
|
||||
{
|
||||
static const WCHAR ole10NativeW[] = {1,'O','l','e','1','0','N','a','t','i','v','e',0};
|
||||
|
||||
if(lstrcmpW(pwcsName, ole10NativeW))
|
||||
if(lstrcmpW(pwcsName, L"\1Ole10Native"))
|
||||
return STG_E_FILENOTFOUND;
|
||||
|
||||
*ppstm = &ole10native_stream;
|
||||
|
@ -417,8 +415,6 @@ static void test_packager(void)
|
|||
char contents[11];
|
||||
BOOL br, extended = FALSE;
|
||||
|
||||
static const WCHAR filename3W[] = {'f','i','l','e','n','a','m','e','3','.','t','x','t',0};
|
||||
|
||||
hr = CoCreateInstance(&CLSID_Package, NULL, CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER,
|
||||
&IID_IOleObject, (void**)&oleobj);
|
||||
ok(hr == S_OK ||
|
||||
|
@ -458,7 +454,7 @@ static void test_packager(void)
|
|||
|
||||
if(extended){
|
||||
len = GetTempPathW(ARRAY_SIZE(filename), filename);
|
||||
lstrcpyW(filename + len, filename3W);
|
||||
lstrcpyW(filename + len, L"filename3.txt");
|
||||
|
||||
file = CreateFileW(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING,
|
||||
FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
|
|
Loading…
Reference in New Issue