Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
0f47bb66
Commit
0f47bb66
authored
Jun 17, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Build with msvcrt.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7176090a
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
96 additions
and
139 deletions
+96
-139
Makefile.in
dlls/ole32/Makefile.in
+2
-0
bindctx.c
dlls/ole32/bindctx.c
+1
-1
classmoniker.c
dlls/ole32/classmoniker.c
+2
-3
clipboard.c
dlls/ole32/clipboard.c
+1
-1
comcat.c
dlls/ole32/comcat.c
+4
-5
compobj.c
dlls/ole32/compobj.c
+22
-25
compositemoniker.c
dlls/ole32/compositemoniker.c
+1
-2
datacache.c
dlls/ole32/datacache.c
+0
-1
defaulthandler.c
dlls/ole32/defaulthandler.c
+2
-3
errorinfo.c
dlls/ole32/errorinfo.c
+1
-2
filelockbytes.c
dlls/ole32/filelockbytes.c
+2
-3
filemoniker.c
dlls/ole32/filemoniker.c
+24
-25
ftmarshal.c
dlls/ole32/ftmarshal.c
+0
-2
hglobalstream.c
dlls/ole32/hglobalstream.c
+0
-2
ifs.c
dlls/ole32/ifs.c
+0
-2
itemmoniker.c
dlls/ole32/itemmoniker.c
+4
-5
marshal.c
dlls/ole32/marshal.c
+0
-1
memlockbytes.c
dlls/ole32/memlockbytes.c
+0
-2
moniker.c
dlls/ole32/moniker.c
+4
-8
ole2.c
dlls/ole32/ole2.c
+9
-12
ole2stubs.c
dlls/ole32/ole2stubs.c
+0
-2
ole32_main.c
dlls/ole32/ole32_main.c
+0
-3
oleproxy.c
dlls/ole32/oleproxy.c
+0
-2
rpc.c
dlls/ole32/rpc.c
+2
-6
stg_prop.c
dlls/ole32/stg_prop.c
+2
-6
storage32.c
dlls/ole32/storage32.c
+8
-9
usrmarshal.c
dlls/ole32/usrmarshal.c
+5
-6
No files found.
dlls/ole32/Makefile.in
View file @
0f47bb66
...
...
@@ -4,6 +4,8 @@ IMPORTS = uuid advapi32 user32 gdi32 rpcrt4
DELAYIMPORTS
=
oleaut32
EXTRADEFS
=
-D_OLE32_
EXTRADLLFLAGS
=
-mno-cygwin
C_SRCS
=
\
antimoniker.c
\
bindctx.c
\
...
...
dlls/ole32/bindctx.c
View file @
0f47bb66
...
...
@@ -446,7 +446,7 @@ static HRESULT BindCtxImpl_GetObjectIndex(BindCtxImpl* This,
if
(
(
(
This
->
bindCtxTable
[
i
].
pkeyObj
==
NULL
)
&&
(
pszkey
==
NULL
)
)
||
(
(
This
->
bindCtxTable
[
i
].
pkeyObj
!=
NULL
)
&&
(
pszkey
!=
NULL
)
&&
(
lstrcmpW
(
This
->
bindCtxTable
[
i
].
pkeyObj
,
pszkey
)
==
0
)
(
wcscmp
(
This
->
bindCtxTable
[
i
].
pkeyObj
,
pszkey
)
==
0
)
)
)
...
...
dlls/ole32/classmoniker.c
View file @
0f47bb66
...
...
@@ -31,7 +31,6 @@
#include "winuser.h"
#include "wine/debug.h"
#include "ole2.h"
#include "wine/unicode.h"
#include "moniker.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
ole
);
...
...
@@ -402,7 +401,7 @@ static HRESULT WINAPI ClassMoniker_IsEqual(IMoniker* iface,IMoniker* pmkOtherMon
if
(
SUCCEEDED
((
res
=
CreateBindCtx
(
0
,
&
bind
))))
{
if
(
SUCCEEDED
(
IMoniker_GetDisplayName
(
iface
,
bind
,
NULL
,
&
dispName1
)))
{
if
(
SUCCEEDED
(
IMoniker_GetDisplayName
(
pmkOtherMoniker
,
bind
,
NULL
,
&
dispName2
)))
{
if
(
lstrcmpW
(
dispName1
,
dispName2
)
==
0
)
res
=
S_OK
;
if
(
wcscmp
(
dispName1
,
dispName2
)
==
0
)
res
=
S_OK
;
CoTaskMemFree
(
dispName2
);
}
CoTaskMemFree
(
dispName1
);
...
...
@@ -727,7 +726,7 @@ HRESULT ClassMoniker_CreateFromDisplayName(LPBC pbc, LPCOLESTR szDisplayName, LP
IMoniker
**
ppmk
)
{
HRESULT
hr
;
LPCWSTR
s
=
strchrW
(
szDisplayName
,
':'
);
LPCWSTR
s
=
wcschr
(
szDisplayName
,
':'
);
LPCWSTR
end
;
CLSID
clsid
;
BYTE
table
[
256
];
...
...
dlls/ole32/clipboard.c
View file @
0f47bb66
...
...
@@ -1363,7 +1363,7 @@ static inline BOOL string_off_equal(const DVTARGETDEVICE *t1, WORD off1, const D
str1
=
(
const
WCHAR
*
)((
const
char
*
)
t1
+
off1
);
str2
=
(
const
WCHAR
*
)((
const
char
*
)
t2
+
off2
);
return
!
lstrcmpW
(
str1
,
str2
);
return
!
wcscmp
(
str1
,
str2
);
}
static
inline
BOOL
td_equal
(
const
DVTARGETDEVICE
*
t1
,
const
DVTARGETDEVICE
*
t2
)
...
...
dlls/ole32/comcat.c
View file @
0f47bb66
...
...
@@ -33,7 +33,6 @@
#include "comcat.h"
#include "compobj_private.h"
#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
ole
);
...
...
@@ -267,7 +266,7 @@ static HRESULT COMCAT_IsClassOfCategories(
if
(
res
!=
ERROR_SUCCESS
&&
res
!=
ERROR_MORE_DATA
)
break
;
if
(
size
!=
CHARS_IN_GUID
-
1
)
continue
;
/* bogus catid in registry */
for
(
string
=
req_strings
;
*
string
;
string
+=
CHARS_IN_GUID
)
if
(
!
strcmpiW
(
string
,
keyname
))
break
;
if
(
!
wcsicmp
(
string
,
keyname
))
break
;
if
(
!*
string
)
{
RegCloseKey
(
subkey
);
return
S_FALSE
;
...
...
@@ -1279,9 +1278,9 @@ static HRESULT CATIDEnumGUID_Construct(REFCLSID rclsid, LPCWSTR postfix, IEnumGU
This
->
IEnumGUID_iface
.
lpVtbl
=
&
CATIDEnumGUIDVtbl
;
This
->
ref
=
1
;
strcpyW
(
keyname
,
prefixW
);
strcatW
(
keyname
,
clsidW
);
strcatW
(
keyname
,
postfix
);
l
strcpyW
(
keyname
,
prefixW
);
l
strcatW
(
keyname
,
clsidW
);
l
strcatW
(
keyname
,
postfix
);
open_classes_key
(
HKEY_CLASSES_ROOT
,
keyname
,
KEY_READ
,
&
This
->
key
);
...
...
dlls/ole32/compobj.c
View file @
0f47bb66
...
...
@@ -36,8 +36,6 @@
*
*/
#include "config.h"
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
...
...
@@ -65,7 +63,6 @@
#include "compobj_private.h"
#include "moniker.h"
#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
ole
);
...
...
@@ -490,7 +487,7 @@ static OpenDll *COMPOBJ_DllList_Get(LPCWSTR library_name)
EnterCriticalSection
(
&
csOpenDllList
);
LIST_FOR_EACH_ENTRY
(
ptr
,
&
openDllList
,
OpenDll
,
entry
)
{
if
(
!
strcmpiW
(
library_name
,
ptr
->
library_name
)
&&
if
(
!
wcsicmp
(
library_name
,
ptr
->
library_name
)
&&
(
InterlockedIncrement
(
&
ptr
->
refs
)
!=
1
)
/* entry is being destroy if == 1 */
)
{
ret
=
ptr
;
...
...
@@ -548,7 +545,7 @@ static HRESULT COMPOBJ_DllList_Add(LPCWSTR library_name, OpenDll **ret)
}
else
{
len
=
strlenW
(
library_name
);
len
=
l
strlenW
(
library_name
);
entry
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
OpenDll
));
if
(
entry
)
entry
->
library_name
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
len
+
1
)
*
sizeof
(
WCHAR
));
...
...
@@ -1343,7 +1340,7 @@ static HRESULT apartment_getclassobject(struct apartment *apt, LPCWSTR dllpath,
BOOL
found
=
FALSE
;
struct
apartment_loaded_dll
*
apartment_loaded_dll
;
if
(
!
strcmpiW
(
dllpath
,
wszOle32
))
if
(
!
wcsicmp
(
dllpath
,
wszOle32
))
{
/* we don't need to control the lifetime of this dll, so use the local
* implementation of DllGetClassObject directly */
...
...
@@ -1359,7 +1356,7 @@ static HRESULT apartment_getclassobject(struct apartment *apt, LPCWSTR dllpath,
EnterCriticalSection
(
&
apt
->
cs
);
LIST_FOR_EACH_ENTRY
(
apartment_loaded_dll
,
&
apt
->
loaded_dlls
,
struct
apartment_loaded_dll
,
entry
)
if
(
!
strcmpiW
(
dllpath
,
apartment_loaded_dll
->
dll
->
library_name
))
if
(
!
wcsicmp
(
dllpath
,
apartment_loaded_dll
->
dll
->
library_name
))
{
TRACE
(
"found %s already loaded
\n
"
,
debugstr_w
(
dllpath
));
found
=
TRUE
;
...
...
@@ -1422,9 +1419,9 @@ static BOOL get_object_dll_path(const struct class_reg_data *regdata, WCHAR *dst
if
(
dstlen
<=
ExpandEnvironmentStringsW
(
src
,
dst
,
dstlen
))
ret
=
ERROR_MORE_DATA
;
}
else
{
const
WCHAR
*
quote_start
;
quote_start
=
strchrW
(
src
,
'\"'
);
quote_start
=
wcschr
(
src
,
'\"'
);
if
(
quote_start
)
{
const
WCHAR
*
quote_end
=
strchrW
(
quote_start
+
1
,
'\"'
);
const
WCHAR
*
quote_end
=
wcschr
(
quote_start
+
1
,
'\"'
);
if
(
quote_end
)
{
memmove
(
src
,
quote_start
+
1
,
(
quote_end
-
quote_start
-
1
)
*
sizeof
(
WCHAR
));
...
...
@@ -2260,10 +2257,10 @@ static HRESULT clsid_from_string_reg(LPCOLESTR progid, CLSID *clsid)
WCHAR
*
buf
;
memset
(
clsid
,
0
,
sizeof
(
*
clsid
));
buf
=
HeapAlloc
(
GetProcessHeap
(),
0
,(
strlenW
(
progid
)
+
8
)
*
sizeof
(
WCHAR
)
);
buf
=
HeapAlloc
(
GetProcessHeap
(),
0
,(
l
strlenW
(
progid
)
+
8
)
*
sizeof
(
WCHAR
)
);
if
(
!
buf
)
return
E_OUTOFMEMORY
;
strcpyW
(
buf
,
progid
);
strcatW
(
buf
,
clsidW
);
l
strcpyW
(
buf
,
progid
);
l
strcatW
(
buf
,
clsidW
);
if
(
open_classes_key
(
HKEY_CLASSES_ROOT
,
buf
,
MAXIMUM_ALLOWED
,
&
xhkey
))
{
HeapFree
(
GetProcessHeap
(),
0
,
buf
);
...
...
@@ -2346,7 +2343,7 @@ HRESULT WINAPI IIDFromString(LPCOLESTR s, IID *iid)
}
/* length mismatch is a special case */
if
(
strlenW
(
s
)
+
1
!=
CHARS_IN_GUID
)
if
(
l
strlenW
(
s
)
+
1
!=
CHARS_IN_GUID
)
return
E_INVALIDARG
;
if
(
s
[
0
]
!=
'{'
)
...
...
@@ -2402,7 +2399,7 @@ INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax)
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'}'
,
0
};
if
(
!
id
||
cmax
<
CHARS_IN_GUID
)
return
0
;
s
printfW
(
str
,
formatW
,
id
->
Data1
,
id
->
Data2
,
id
->
Data3
,
s
wprintf
(
str
,
CHARS_IN_GUID
,
formatW
,
id
->
Data1
,
id
->
Data2
,
id
->
Data3
,
id
->
Data4
[
0
],
id
->
Data4
[
1
],
id
->
Data4
[
2
],
id
->
Data4
[
3
],
id
->
Data4
[
4
],
id
->
Data4
[
5
],
id
->
Data4
[
6
],
id
->
Data4
[
7
]
);
return
CHARS_IN_GUID
;
...
...
@@ -2416,8 +2413,8 @@ HRESULT COM_OpenKeyForCLSID(REFCLSID clsid, LPCWSTR keyname, REGSAM access, HKEY
LONG
res
;
HKEY
key
;
strcpyW
(
path
,
wszCLSIDSlash
);
StringFromGUID2
(
clsid
,
path
+
strlenW
(
wszCLSIDSlash
),
CHARS_IN_GUID
);
l
strcpyW
(
path
,
wszCLSIDSlash
);
StringFromGUID2
(
clsid
,
path
+
l
strlenW
(
wszCLSIDSlash
),
CHARS_IN_GUID
);
res
=
open_classes_key
(
HKEY_CLASSES_ROOT
,
path
,
keyname
?
KEY_READ
:
access
,
&
key
);
if
(
res
==
ERROR_FILE_NOT_FOUND
)
return
REGDB_E_CLASSNOTREG
;
...
...
@@ -2466,8 +2463,8 @@ HRESULT COM_OpenKeyForAppIdFromCLSID(REFCLSID clsid, REGSAM access, HKEY *subkey
else
if
(
res
!=
ERROR_SUCCESS
||
type
!=
REG_SZ
)
return
REGDB_E_READREGDB
;
strcpyW
(
keyname
,
szAppIdKey
);
strcatW
(
keyname
,
buf
);
l
strcpyW
(
keyname
,
szAppIdKey
);
l
strcatW
(
keyname
,
buf
);
res
=
open_classes_key
(
HKEY_CLASSES_ROOT
,
keyname
,
access
,
subkey
);
if
(
res
==
ERROR_FILE_NOT_FOUND
)
return
REGDB_E_KEYMISSING
;
...
...
@@ -2697,9 +2694,9 @@ HRESULT WINAPI CoGetPSClsid(REFIID riid, CLSID *pclsid)
}
/* Interface\\{string form of riid}\\ProxyStubClsid32 */
strcpyW
(
path
,
wszInterface
);
l
strcpyW
(
path
,
wszInterface
);
StringFromGUID2
(
riid
,
path
+
ARRAY_SIZE
(
wszInterface
)
-
1
,
CHARS_IN_GUID
);
strcpyW
(
path
+
ARRAY_SIZE
(
wszInterface
)
-
1
+
CHARS_IN_GUID
-
1
,
wszPSC
);
l
strcpyW
(
path
+
ARRAY_SIZE
(
wszInterface
)
-
1
+
CHARS_IN_GUID
-
1
,
wszPSC
);
hr
=
get_ps_clsid_from_registry
(
path
,
0
,
pclsid
);
if
(
FAILED
(
hr
)
&&
(
opposite
==
KEY_WOW64_32KEY
||
...
...
@@ -2966,7 +2963,7 @@ static enum comclass_threadingmodel get_threading_model(const struct class_reg_d
static
const
WCHAR
wszApartment
[]
=
{
'A'
,
'p'
,
'a'
,
'r'
,
't'
,
'm'
,
'e'
,
'n'
,
't'
,
0
};
static
const
WCHAR
wszFree
[]
=
{
'F'
,
'r'
,
'e'
,
'e'
,
0
};
static
const
WCHAR
wszBoth
[]
=
{
'B'
,
'o'
,
't'
,
'h'
,
0
};
WCHAR
threading_model
[
10
/* strlenW(L"apartment")+1 */
];
WCHAR
threading_model
[
10
/*
l
strlenW(L"apartment")+1 */
];
DWORD
dwLength
=
sizeof
(
threading_model
);
DWORD
keytype
;
DWORD
ret
;
...
...
@@ -2975,9 +2972,9 @@ static enum comclass_threadingmodel get_threading_model(const struct class_reg_d
if
((
ret
!=
ERROR_SUCCESS
)
||
(
keytype
!=
REG_SZ
))
threading_model
[
0
]
=
'\0'
;
if
(
!
strcmpiW
(
threading_model
,
wszApartment
))
return
ThreadingModel_Apartment
;
if
(
!
strcmpiW
(
threading_model
,
wszFree
))
return
ThreadingModel_Free
;
if
(
!
strcmpiW
(
threading_model
,
wszBoth
))
return
ThreadingModel_Both
;
if
(
!
wcsicmp
(
threading_model
,
wszApartment
))
return
ThreadingModel_Apartment
;
if
(
!
wcsicmp
(
threading_model
,
wszFree
))
return
ThreadingModel_Free
;
if
(
!
wcsicmp
(
threading_model
,
wszBoth
))
return
ThreadingModel_Both
;
/* there's not specific handling for this case */
if
(
threading_model
[
0
])
return
ThreadingModel_Neutral
;
...
...
@@ -5146,7 +5143,7 @@ HRESULT Handler_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
if
(
get_object_dll_path
(
&
regdata
,
dllpath
,
ARRAY_SIZE
(
dllpath
)))
{
static
const
WCHAR
wszOle32
[]
=
{
'o'
,
'l'
,
'e'
,
'3'
,
'2'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
};
if
(
!
strcmpiW
(
dllpath
,
wszOle32
))
if
(
!
wcsicmp
(
dllpath
,
wszOle32
))
{
RegCloseKey
(
hkey
);
return
HandlerCF_Create
(
rclsid
,
riid
,
ppv
);
...
...
dlls/ole32/compositemoniker.c
View file @
0f47bb66
...
...
@@ -29,7 +29,6 @@
#include "winuser.h"
#include "winerror.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "ole2.h"
#include "moniker.h"
...
...
@@ -1141,7 +1140,7 @@ CompositeMonikerImpl_GetDisplayName(IMoniker* iface, IBindCtx* pbc,
if
(
*
ppszDisplayName
==
NULL
)
return
E_OUTOFMEMORY
;
strcatW
(
*
ppszDisplayName
,
tempStr
);
l
strcatW
(
*
ppszDisplayName
,
tempStr
);
CoTaskMemFree
(
tempStr
);
IMoniker_Release
(
tempMk
);
...
...
dlls/ole32/datacache.c
View file @
0f47bb66
...
...
@@ -57,7 +57,6 @@
#include "winerror.h"
#include "ole2.h"
#include "compobj_private.h"
#include "wine/unicode.h"
#include "wine/list.h"
#include "wine/debug.h"
...
...
dlls/ole32/defaulthandler.c
View file @
0f47bb66
...
...
@@ -60,7 +60,6 @@
#include "compobj_private.h"
#include "storage32.h"
#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
ole
);
...
...
@@ -449,14 +448,14 @@ static HRESULT WINAPI DefaultHandler_SetHostNames(
{
if
((
This
->
containerApp
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
lstrlenW
(
szContainerApp
)
+
1
)
*
sizeof
(
WCHAR
)
)))
strcpyW
(
This
->
containerApp
,
szContainerApp
);
l
strcpyW
(
This
->
containerApp
,
szContainerApp
);
}
if
(
szContainerObj
)
{
if
((
This
->
containerObj
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
lstrlenW
(
szContainerObj
)
+
1
)
*
sizeof
(
WCHAR
)
)))
strcpyW
(
This
->
containerObj
,
szContainerObj
);
l
strcpyW
(
This
->
containerObj
,
szContainerObj
);
}
return
S_OK
;
}
...
...
dlls/ole32/errorinfo.c
View file @
0f47bb66
...
...
@@ -34,7 +34,6 @@
#include "oleauto.h"
#include "winerror.h"
#include "wine/unicode.h"
#include "compobj_private.h"
#include "wine/debug.h"
...
...
@@ -48,7 +47,7 @@ static inline WCHAR *heap_strdupW(const WCHAR *str)
if
(
str
)
{
size_t
size
;
size
=
(
strlenW
(
str
)
+
1
)
*
sizeof
(
WCHAR
);
size
=
(
l
strlenW
(
str
)
+
1
)
*
sizeof
(
WCHAR
);
ret
=
heap_alloc
(
size
);
if
(
ret
)
memcpy
(
ret
,
str
,
size
);
...
...
dlls/ole32/filelockbytes.c
View file @
0f47bb66
...
...
@@ -41,7 +41,6 @@
#include "storage32.h"
#include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
storage
);
...
...
@@ -117,7 +116,7 @@ HRESULT FileLockBytesImpl_Construct(HANDLE hFile, DWORD openFlags, LPCWSTR pwcsN
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
E_OUTOFMEMORY
;
}
strcpyW
(
This
->
pwcsName
,
fullpath
);
l
strcpyW
(
This
->
pwcsName
,
fullpath
);
}
else
This
->
pwcsName
=
NULL
;
...
...
@@ -376,7 +375,7 @@ static HRESULT WINAPI FileLockBytesImpl_Stat(ILockBytes* iface,
pstatstg
->
pwcsName
=
CoTaskMemAlloc
((
lstrlenW
(
This
->
pwcsName
)
+
1
)
*
sizeof
(
WCHAR
));
strcpyW
(
pstatstg
->
pwcsName
,
This
->
pwcsName
);
l
strcpyW
(
pstatstg
->
pwcsName
,
This
->
pwcsName
);
}
else
pstatstg
->
pwcsName
=
NULL
;
...
...
dlls/ole32/filemoniker.c
View file @
0f47bb66
...
...
@@ -30,7 +30,6 @@
#include "winbase.h"
#include "winerror.h"
#include "winnls.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "objbase.h"
#include "moniker.h"
...
...
@@ -693,14 +692,14 @@ FileMonikerImpl_ComposeWith(IMoniker* iface, IMoniker* pmkRight,
lastIdx1
=
FileMonikerImpl_DecomposePath
(
str1
,
&
strDec1
)
-
1
;
lastIdx2
=
FileMonikerImpl_DecomposePath
(
str2
,
&
strDec2
)
-
1
;
if
((
lastIdx1
==-
1
&&
lastIdx2
>-
1
)
||
(
lastIdx1
==
1
&&
lstrcmpW
(
strDec1
[
0
],
twoPoint
)
==
0
))
if
((
lastIdx1
==-
1
&&
lastIdx2
>-
1
)
||
(
lastIdx1
==
1
&&
wcscmp
(
strDec1
[
0
],
twoPoint
)
==
0
))
res
=
MK_E_SYNTAX
;
else
{
if
(
lstrcmpW
(
strDec1
[
lastIdx1
],
bkSlash
)
==
0
)
if
(
wcscmp
(
strDec1
[
lastIdx1
],
bkSlash
)
==
0
)
lastIdx1
--
;
/* for each "..\" in the left of str2 remove the right element from str1 */
for
(
i
=
0
;
(
(
lastIdx1
>=
0
)
&&
(
strDec2
[
i
]
!=
NULL
)
&&
(
lstrcmpW
(
strDec2
[
i
],
twoPoint
)
==
0
)
);
i
+=
2
){
for
(
i
=
0
;
(
(
lastIdx1
>=
0
)
&&
(
strDec2
[
i
]
!=
NULL
)
&&
(
wcscmp
(
strDec2
[
i
],
twoPoint
)
==
0
)
);
i
+=
2
){
lastIdx1
-=
2
;
}
...
...
@@ -711,13 +710,13 @@ FileMonikerImpl_ComposeWith(IMoniker* iface, IMoniker* pmkRight,
if
(
newStr
){
/* new path is the concatenation of the rest of str1 and str2 */
for
(
*
newStr
=
0
,
j
=
0
;
j
<=
lastIdx1
;
j
++
)
strcatW
(
newStr
,
strDec1
[
j
]);
l
strcatW
(
newStr
,
strDec1
[
j
]);
if
((
strDec2
[
i
]
==
NULL
&&
lastIdx1
>-
1
&&
lastIdx2
>-
1
)
||
lstrcmpW
(
strDec2
[
i
],
bkSlash
)
!=
0
)
strcatW
(
newStr
,
bkSlash
);
if
((
strDec2
[
i
]
==
NULL
&&
lastIdx1
>-
1
&&
lastIdx2
>-
1
)
||
wcscmp
(
strDec2
[
i
],
bkSlash
)
!=
0
)
l
strcatW
(
newStr
,
bkSlash
);
for
(
j
=
i
;
j
<=
lastIdx2
;
j
++
)
strcatW
(
newStr
,
strDec2
[
j
]);
l
strcatW
(
newStr
,
strDec2
[
j
]);
/* create a new moniker with the new string */
res
=
CreateFileMoniker
(
newStr
,
ppmkComposite
);
...
...
@@ -1003,7 +1002,7 @@ FileMonikerImpl_CommonPrefixWith(IMoniker* iface,IMoniker* pmkOther,IMoniker** p
else
{
for
(
i
=
0
;
i
<
sameIdx
;
i
++
)
strcatW
(
commonPath
,
stringTable1
[
i
]);
l
strcatW
(
commonPath
,
stringTable1
[
i
]);
ret
=
CreateFileMoniker
(
commonPath
,
ppmkPrefix
);
}
...
...
@@ -1057,7 +1056,7 @@ int FileMonikerImpl_DecomposePath(LPCOLESTR str, LPOLESTR** stringTable)
goto
lend
;
}
strcpyW
(
strgtable
[
tabIndex
++
],
bSlash
);
l
strcpyW
(
strgtable
[
tabIndex
++
],
bSlash
);
i
++
;
...
...
@@ -1077,7 +1076,7 @@ int FileMonikerImpl_DecomposePath(LPCOLESTR str, LPOLESTR** stringTable)
goto
lend
;
}
strcpyW
(
strgtable
[
tabIndex
++
],
word
);
l
strcpyW
(
strgtable
[
tabIndex
++
],
word
);
}
}
strgtable
[
tabIndex
]
=
NULL
;
...
...
@@ -1157,11 +1156,11 @@ FileMonikerImpl_RelativePathTo(IMoniker* iface,IMoniker* pmOther, IMoniker** ppm
if
(
len2
>
0
&&
!
(
len1
==
1
&&
len2
==
1
&&
sameIdx
==
0
))
for
(
j
=
sameIdx
;(
tabStr1
[
j
]
!=
NULL
);
j
++
)
if
(
*
tabStr1
[
j
]
!=
'\\'
)
strcatW
(
relPath
,
back
);
l
strcatW
(
relPath
,
back
);
/* add items of the second path (similar items with the first path are not included) to the relativePath */
for
(
j
=
sameIdx
;
tabStr2
[
j
]
!=
NULL
;
j
++
)
strcatW
(
relPath
,
tabStr2
[
j
]);
l
strcatW
(
relPath
,
tabStr2
[
j
]);
res
=
CreateFileMoniker
(
relPath
,
ppmkRelPath
);
...
...
@@ -1199,7 +1198,7 @@ FileMonikerImpl_GetDisplayName(IMoniker* iface, IBindCtx* pbc,
if
(
*
ppszDisplayName
==
NULL
)
return
E_OUTOFMEMORY
;
strcpyW
(
*
ppszDisplayName
,
This
->
filePathName
);
l
strcpyW
(
*
ppszDisplayName
,
This
->
filePathName
);
TRACE
(
"-- %s
\n
"
,
debugstr_w
(
*
ppszDisplayName
));
...
...
@@ -1281,7 +1280,7 @@ FileMonikerROTDataImpl_GetComparisonData(IROTData* iface, BYTE* pbData,
ULONG
cbMax
,
ULONG
*
pcbData
)
{
FileMonikerImpl
*
This
=
impl_from_IROTData
(
iface
);
int
len
=
strlenW
(
This
->
filePathName
)
+
1
;
int
len
=
l
strlenW
(
This
->
filePathName
)
+
1
;
int
i
;
LPWSTR
pszFileName
;
...
...
@@ -1294,7 +1293,7 @@ FileMonikerROTDataImpl_GetComparisonData(IROTData* iface, BYTE* pbData,
memcpy
(
pbData
,
&
CLSID_FileMoniker
,
sizeof
(
CLSID
));
pszFileName
=
(
LPWSTR
)(
pbData
+
sizeof
(
CLSID
));
for
(
i
=
0
;
i
<
len
;
i
++
)
pszFileName
[
i
]
=
to
upperW
(
This
->
filePathName
[
i
]);
pszFileName
[
i
]
=
to
wupper
(
This
->
filePathName
[
i
]);
return
S_OK
;
}
...
...
@@ -1364,25 +1363,25 @@ static HRESULT FileMonikerImpl_Construct(FileMonikerImpl* This, LPCOLESTR lpszPa
if
(
This
->
filePathName
==
NULL
)
return
E_OUTOFMEMORY
;
strcpyW
(
This
->
filePathName
,
lpszPathName
);
l
strcpyW
(
This
->
filePathName
,
lpszPathName
);
nb
=
FileMonikerImpl_DecomposePath
(
This
->
filePathName
,
&
tabStr
);
if
(
nb
>
0
){
addBkSlash
=
TRUE
;
if
(
lstrcmpW
(
tabStr
[
0
],
twoPoint
)
!=
0
)
if
(
wcscmp
(
tabStr
[
0
],
twoPoint
)
!=
0
)
addBkSlash
=
FALSE
;
else
for
(
i
=
0
;
i
<
nb
;
i
++
){
if
(
(
lstrcmpW
(
tabStr
[
i
],
twoPoint
)
!=
0
)
&&
(
lstrcmpW
(
tabStr
[
i
],
bkSlash
)
!=
0
)
){
if
(
(
wcscmp
(
tabStr
[
i
],
twoPoint
)
!=
0
)
&&
(
wcscmp
(
tabStr
[
i
],
bkSlash
)
!=
0
)
){
addBkSlash
=
FALSE
;
break
;
}
else
if
(
lstrcmpW
(
tabStr
[
i
],
bkSlash
)
==
0
&&
i
<
nb
-
1
&&
lstrcmpW
(
tabStr
[
i
+
1
],
bkSlash
)
==
0
){
if
(
wcscmp
(
tabStr
[
i
],
bkSlash
)
==
0
&&
i
<
nb
-
1
&&
wcscmp
(
tabStr
[
i
+
1
],
bkSlash
)
==
0
){
*
tabStr
[
i
]
=
0
;
sizeStr
--
;
addBkSlash
=
FALSE
;
...
...
@@ -1390,7 +1389,7 @@ static HRESULT FileMonikerImpl_Construct(FileMonikerImpl* This, LPCOLESTR lpszPa
}
}
if
(
lstrcmpW
(
tabStr
[
nb
-
1
],
bkSlash
)
==
0
)
if
(
wcscmp
(
tabStr
[
nb
-
1
],
bkSlash
)
==
0
)
addBkSlash
=
FALSE
;
This
->
filePathName
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
This
->
filePathName
,(
sizeStr
+
1
)
*
sizeof
(
WCHAR
));
...
...
@@ -1398,10 +1397,10 @@ static HRESULT FileMonikerImpl_Construct(FileMonikerImpl* This, LPCOLESTR lpszPa
*
This
->
filePathName
=
0
;
for
(
i
=
0
;
tabStr
[
i
]
!=
NULL
;
i
++
)
strcatW
(
This
->
filePathName
,
tabStr
[
i
]);
l
strcatW
(
This
->
filePathName
,
tabStr
[
i
]);
if
(
addBkSlash
)
strcatW
(
This
->
filePathName
,
bkSlash
);
l
strcatW
(
This
->
filePathName
,
bkSlash
);
}
free_stringtable
(
tabStr
);
...
...
@@ -1446,7 +1445,7 @@ HRESULT WINAPI CreateFileMoniker(LPCOLESTR lpszPathName, IMoniker **ppmk)
static
inline
WCHAR
*
memrpbrkW
(
const
WCHAR
*
ptr
,
size_t
n
,
const
WCHAR
*
accept
)
{
const
WCHAR
*
end
,
*
ret
=
NULL
;
for
(
end
=
ptr
+
n
;
ptr
<
end
;
ptr
++
)
if
(
strchrW
(
accept
,
*
ptr
))
ret
=
ptr
;
for
(
end
=
ptr
+
n
;
ptr
<
end
;
ptr
++
)
if
(
wcschr
(
accept
,
*
ptr
))
ret
=
ptr
;
return
(
WCHAR
*
)
ret
;
}
...
...
@@ -1456,7 +1455,7 @@ HRESULT FileMoniker_CreateFromDisplayName(LPBC pbc, LPCOLESTR szDisplayName,
LPCWSTR
end
;
static
const
WCHAR
wszSeparators
[]
=
{
':'
,
'\\'
,
'/'
,
'!'
,
0
};
for
(
end
=
szDisplayName
+
strlenW
(
szDisplayName
);
for
(
end
=
szDisplayName
+
l
strlenW
(
szDisplayName
);
end
&&
(
end
!=
szDisplayName
);
end
=
memrpbrkW
(
szDisplayName
,
end
-
szDisplayName
,
wszSeparators
))
{
...
...
dlls/ole32/ftmarshal.c
View file @
0f47bb66
...
...
@@ -18,8 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
...
...
dlls/ole32/hglobalstream.c
View file @
0f47bb66
...
...
@@ -21,8 +21,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <assert.h>
#include <stdlib.h>
#include <stdarg.h>
...
...
dlls/ole32/ifs.c
View file @
0f47bb66
...
...
@@ -18,8 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <ctype.h>
#include <stdarg.h>
#include <stdlib.h>
...
...
dlls/ole32/itemmoniker.c
View file @
0f47bb66
...
...
@@ -32,7 +32,6 @@
#include "winnls.h"
#include "wine/debug.h"
#include "ole2.h"
#include "wine/unicode.h"
#include "moniker.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
ole
);
...
...
@@ -487,7 +486,7 @@ static HRESULT WINAPI ItemMonikerImpl_IsEqual(IMoniker* iface,IMoniker* pmkOther
if
(
SUCCEEDED
((
res
=
CreateBindCtx
(
0
,
&
bind
))))
{
if
(
SUCCEEDED
(
IMoniker_GetDisplayName
(
iface
,
bind
,
NULL
,
&
dispName1
)))
{
if
(
SUCCEEDED
(
IMoniker_GetDisplayName
(
pmkOtherMoniker
,
bind
,
NULL
,
&
dispName2
)))
{
if
(
lstrcmpW
(
dispName1
,
dispName2
)
==
0
)
res
=
S_OK
;
if
(
wcscmp
(
dispName1
,
dispName2
)
==
0
)
res
=
S_OK
;
CoTaskMemFree
(
dispName2
);
}
CoTaskMemFree
(
dispName1
);
...
...
@@ -514,7 +513,7 @@ static HRESULT WINAPI ItemMonikerImpl_Hash(IMoniker* iface,DWORD* pdwHash)
len
=
lstrlenW
(
val
);
for
(
i
=
len
;
i
>
0
;
i
--
)
h
=
(
h
*
3
)
^
to
upperW
(
val
[
off
++
]);
h
=
(
h
*
3
)
^
to
wupper
(
val
[
off
++
]);
*
pdwHash
=
h
;
...
...
@@ -813,7 +812,7 @@ static HRESULT WINAPI ItemMonikerROTDataImpl_GetComparisonData(IROTData* iface,
ULONG
*
pcbData
)
{
ItemMonikerImpl
*
This
=
impl_from_IROTData
(
iface
);
int
len
=
(
strlenW
(
This
->
itemName
)
+
1
);
int
len
=
(
l
strlenW
(
This
->
itemName
)
+
1
);
int
i
;
LPWSTR
pszItemName
;
LPWSTR
pszItemDelimiter
;
...
...
@@ -832,7 +831,7 @@ static HRESULT WINAPI ItemMonikerROTDataImpl_GetComparisonData(IROTData* iface,
/* write name */
pszItemName
=
pszItemDelimiter
+
1
;
for
(
i
=
0
;
i
<
len
;
i
++
)
pszItemName
[
i
]
=
to
upperW
(
This
->
itemName
[
i
]);
pszItemName
[
i
]
=
to
wupper
(
This
->
itemName
[
i
]);
return
S_OK
;
}
...
...
dlls/ole32/marshal.c
View file @
0f47bb66
...
...
@@ -32,7 +32,6 @@
#include "objbase.h"
#include "ole2.h"
#include "winerror.h"
#include "wine/unicode.h"
#include "compobj_private.h"
...
...
dlls/ole32/memlockbytes.c
View file @
0f47bb66
...
...
@@ -19,8 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <assert.h>
#include <stdarg.h>
#include <string.h>
...
...
dlls/ole32/moniker.c
View file @
0f47bb66
...
...
@@ -21,9 +21,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <string.h>
...
...
@@ -39,7 +36,6 @@
#include "wine/list.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "wine/exception.h"
#include "compobj_private.h"
...
...
@@ -282,7 +278,7 @@ static HRESULT get_moniker_comparison_data(IMoniker *pMoniker, MonikerComparison
return
hr
;
}
len
=
strlenW
(
pszDisplayName
);
len
=
l
strlenW
(
pszDisplayName
);
*
moniker_data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
FIELD_OFFSET
(
MonikerComparisonData
,
abData
[
sizeof
(
CLSID
)
+
(
len
+
1
)
*
sizeof
(
WCHAR
)]));
if
(
!*
moniker_data
)
...
...
@@ -1152,7 +1148,7 @@ HRESULT WINAPI MkParseDisplayName(LPBC pbc, LPCOLESTR szDisplayName,
*
pchEaten
=
0
;
*
ppmk
=
NULL
;
if
(
!
strncmpiW
(
szDisplayName
,
wszClsidColon
,
ARRAY_SIZE
(
wszClsidColon
)))
if
(
!
wcsnicmp
(
szDisplayName
,
wszClsidColon
,
ARRAY_SIZE
(
wszClsidColon
)))
{
hr
=
ClassMoniker_CreateFromDisplayName
(
pbc
,
szDisplayName
,
&
chEaten
,
&
moniker
);
if
(
FAILED
(
hr
)
&&
(
hr
!=
MK_E_SYNTAX
))
...
...
@@ -1269,7 +1265,7 @@ HRESULT WINAPI GetClassFile(LPCOLESTR filePathName,CLSID *pclsid)
absFile
=
pathDec
[
nbElm
-
1
];
/* failed if the path represents a directory and not an absolute file name*/
if
(
!
lstrcmpW
(
absFile
,
bkslashW
))
{
if
(
!
wcscmp
(
absFile
,
bkslashW
))
{
CoTaskMemFree
(
pathDec
);
return
MK_E_INVALIDEXTENSION
;
}
...
...
@@ -1280,7 +1276,7 @@ HRESULT WINAPI GetClassFile(LPCOLESTR filePathName,CLSID *pclsid)
for
(
i
=
length
-
1
;
(
i
>=
0
)
&&
*
(
extension
=
&
absFile
[
i
])
!=
'.'
;
i
--
)
/* nothing */
;
if
(
!
extension
||
!
lstrcmpW
(
extension
,
dotW
))
{
if
(
!
extension
||
!
wcscmp
(
extension
,
dotW
))
{
CoTaskMemFree
(
pathDec
);
return
MK_E_INVALIDEXTENSION
;
}
...
...
dlls/ole32/ole2.c
View file @
0f47bb66
...
...
@@ -23,8 +23,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <assert.h>
#include <stdlib.h>
#include <stdarg.h>
...
...
@@ -44,7 +42,6 @@
#include "ole2.h"
#include "ole2ver.h"
#include "wine/unicode.h"
#include "compobj_private.h"
#include "olestd.h"
#include "wine/list.h"
...
...
@@ -697,7 +694,7 @@ HRESULT WINAPI OleRegGetUserType(REFCLSID clsid, DWORD form, LPOLESTR *usertype)
{
HKEY
auxkey
;
s
printfW
(
auxkeynameW
,
auxusertypeW
,
form
);
s
wprintf
(
auxkeynameW
,
ARRAY_SIZE
(
auxkeynameW
)
,
auxusertypeW
,
form
);
if
(
COM_OpenKeyForCLSID
(
clsid
,
auxkeynameW
,
KEY_READ
,
&
auxkey
)
==
S_OK
)
{
if
(
!
RegQueryValueExW
(
auxkey
,
emptyW
,
NULL
,
&
valuetype
,
NULL
,
&
valuelen
)
&&
valuelen
)
...
...
@@ -883,7 +880,7 @@ HRESULT WINAPI OleRegGetMiscStatus(
/*
* Open the key specific to the requested aspect.
*/
s
printfW
(
keyName
,
dfmtW
,
dwAspect
);
s
wprintf
(
keyName
,
ARRAY_SIZE
(
keyName
)
,
dfmtW
,
dwAspect
);
result
=
open_classes_key
(
miscStatusKey
,
keyName
,
KEY_READ
,
&
aspectKey
);
if
(
result
==
ERROR_SUCCESS
)
...
...
@@ -1002,7 +999,7 @@ static HRESULT WINAPI EnumOLEVERB_Next(
}
TRACE
(
"verb string: %s
\n
"
,
debugstr_w
(
pwszOLEVERB
));
pwszMenuFlags
=
strchrW
(
pwszOLEVERB
,
','
);
pwszMenuFlags
=
wcschr
(
pwszOLEVERB
,
','
);
if
(
!
pwszMenuFlags
)
{
hr
=
OLEOBJ_E_INVALIDVERB
;
...
...
@@ -1012,7 +1009,7 @@ static HRESULT WINAPI EnumOLEVERB_Next(
/* nul terminate the name string and advance to first character */
*
pwszMenuFlags
=
'\0'
;
pwszMenuFlags
++
;
pwszAttribs
=
strchrW
(
pwszMenuFlags
,
','
);
pwszAttribs
=
wcschr
(
pwszMenuFlags
,
','
);
if
(
!
pwszAttribs
)
{
hr
=
OLEOBJ_E_INVALIDVERB
;
...
...
@@ -1024,10 +1021,10 @@ static HRESULT WINAPI EnumOLEVERB_Next(
pwszAttribs
++
;
/* fill out structure for this verb */
rgelt
->
lVerb
=
atolW
(
wszSubKey
);
rgelt
->
lVerb
=
wcstol
(
wszSubKey
,
NULL
,
10
);
rgelt
->
lpszVerbName
=
pwszOLEVERB
;
/* user should free */
rgelt
->
fuFlags
=
atolW
(
pwszMenuFlags
);
rgelt
->
grfAttribs
=
atolW
(
pwszAttribs
);
rgelt
->
fuFlags
=
wcstol
(
pwszMenuFlags
,
NULL
,
10
);
rgelt
->
grfAttribs
=
wcstol
(
pwszAttribs
,
NULL
,
10
);
if
(
pceltFetched
)
(
*
pceltFetched
)
++
;
...
...
@@ -2409,7 +2406,7 @@ static void OLEUTL_ReadRegistryDWORDValue(
case
REG_EXPAND_SZ
:
case
REG_MULTI_SZ
:
case
REG_SZ
:
*
pdwValue
=
(
DWORD
)
strtoulW
(
buffer
,
NULL
,
10
);
*
pdwValue
=
wcstoul
(
buffer
,
NULL
,
10
);
break
;
}
}
...
...
@@ -2601,7 +2598,7 @@ HRESULT WINAPI OleSetAutoConvert(REFCLSID clsidOld, REFCLSID clsidNew)
if
(
FAILED
(
res
))
goto
done
;
StringFromGUID2
(
clsidNew
,
szClsidNew
,
CHARS_IN_GUID
);
if
(
RegSetValueW
(
hkey
,
wszAutoConvertTo
,
REG_SZ
,
szClsidNew
,
(
strlenW
(
szClsidNew
)
+
1
)
*
sizeof
(
WCHAR
)))
if
(
RegSetValueW
(
hkey
,
wszAutoConvertTo
,
REG_SZ
,
szClsidNew
,
(
l
strlenW
(
szClsidNew
)
+
1
)
*
sizeof
(
WCHAR
)))
{
res
=
REGDB_E_WRITEREGDB
;
goto
done
;
...
...
dlls/ole32/ole2stubs.c
View file @
0f47bb66
...
...
@@ -19,8 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#include "windef.h"
...
...
dlls/ole32/ole32_main.c
View file @
0f47bb66
...
...
@@ -18,9 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <stdio.h>
...
...
dlls/ole32/oleproxy.c
View file @
0f47bb66
...
...
@@ -19,8 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
...
...
dlls/ole32/rpc.c
View file @
0f47bb66
...
...
@@ -20,9 +20,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <string.h>
...
...
@@ -39,7 +36,6 @@
#include "winerror.h"
#include "winreg.h"
#include "servprov.h"
#include "wine/unicode.h"
#include "compobj_private.h"
...
...
@@ -1684,7 +1680,7 @@ static HRESULT create_server(REFCLSID rclsid, HANDLE *process)
/* EXE servers are started with the -Embedding switch. */
strcatW
(
command
,
embedding
);
l
strcatW
(
command
,
embedding
);
TRACE
(
"activating local server %s for %s
\n
"
,
debugstr_w
(
command
),
debugstr_guid
(
rclsid
));
...
...
@@ -1800,7 +1796,7 @@ static HRESULT create_local_service(REFCLSID rclsid)
static
void
get_localserver_pipe_name
(
WCHAR
*
pipefn
,
REFCLSID
rclsid
)
{
static
const
WCHAR
wszPipeRef
[]
=
{
'\\'
,
'\\'
,
'.'
,
'\\'
,
'p'
,
'i'
,
'p'
,
'e'
,
'\\'
,
0
};
strcpyW
(
pipefn
,
wszPipeRef
);
l
strcpyW
(
pipefn
,
wszPipeRef
);
StringFromGUID2
(
rclsid
,
pipefn
+
ARRAY_SIZE
(
wszPipeRef
)
-
1
,
CHARS_IN_GUID
);
}
...
...
dlls/ole32/stg_prop.c
View file @
0f47bb66
...
...
@@ -36,9 +36,6 @@
* PropertyStorage_ReadFromStream
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <stdarg.h>
#include <stdio.h>
...
...
@@ -52,7 +49,6 @@
#include "winbase.h"
#include "winnls.h"
#include "winuser.h"
#include "wine/unicode.h"
#include "wine/asm.h"
#include "wine/debug.h"
#include "dictionary.h"
...
...
@@ -372,7 +368,7 @@ static HRESULT PropertyStorage_StringCopy(LPCSTR src, LCID srcCP, LPSTR *dst,
size_t
len
;
if
(
dstCP
==
CP_UNICODE
)
len
=
(
strlenW
((
LPCWSTR
)
src
)
+
1
)
*
sizeof
(
WCHAR
);
len
=
(
l
strlenW
((
LPCWSTR
)
src
)
+
1
)
*
sizeof
(
WCHAR
);
else
len
=
strlen
(
src
)
+
1
;
*
dst
=
CoTaskMemAlloc
(
len
*
sizeof
(
WCHAR
));
...
...
@@ -940,7 +936,7 @@ static int PropertyStorage_PropNameCompare(const void *a, const void *b,
{
TRACE
(
"(%s, %s)
\n
"
,
debugstr_w
(
a
),
debugstr_w
(
b
));
if
(
This
->
grfFlags
&
PROPSETFLAG_CASE_SENSITIVE
)
return
lstrcmpW
(
a
,
b
);
return
wcscmp
(
a
,
b
);
else
return
lstrcmpiW
(
a
,
b
);
}
...
...
dlls/ole32/storage32.c
View file @
0f47bb66
...
...
@@ -43,7 +43,6 @@
#include "winbase.h"
#include "winnls.h"
#include "winuser.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "storage32.h"
...
...
@@ -519,7 +518,7 @@ static LONG entryNameCmp(
/*
* We compare the string themselves only when they are of the same length
*/
diff
=
to
upperW
(
*
name1
++
)
-
toupperW
(
*
name2
++
);
diff
=
to
wupper
(
*
name1
++
)
-
towupper
(
*
name2
++
);
}
return
diff
;
...
...
@@ -1347,7 +1346,7 @@ static HRESULT StorageBaseImpl_CopyChildEntryTo(StorageBaseImpl *This,
while
(
*
snb
!=
NULL
&&
!
skip
)
{
if
(
lstrcmpW
(
data
.
name
,
*
snb
)
==
0
)
if
(
wcscmp
(
data
.
name
,
*
snb
)
==
0
)
skip
=
TRUE
;
++
snb
;
}
...
...
@@ -1891,7 +1890,7 @@ static HRESULT WINAPI StorageBaseImpl_RenameElement(
currentEntryRef
);
/* Change the name of the element */
strcpyW
(
currentEntry
.
name
,
pwcsNewName
);
l
strcpyW
(
currentEntry
.
name
,
pwcsNewName
);
/* Delete any sibling links */
currentEntry
.
leftChild
=
DIRENTRY_NULL
;
...
...
@@ -2013,7 +2012,7 @@ static HRESULT WINAPI StorageBaseImpl_CreateStream(
if
(
newStreamEntry
.
sizeOfNameString
>
DIRENTRY_NAME_BUFFER_LEN
)
return
STG_E_INVALIDNAME
;
strcpyW
(
newStreamEntry
.
name
,
pwcsName
);
l
strcpyW
(
newStreamEntry
.
name
,
pwcsName
);
newStreamEntry
.
stgType
=
STGTY_STREAM
;
newStreamEntry
.
startingBlock
=
BLOCK_END_OF_CHAIN
;
...
...
@@ -2209,7 +2208,7 @@ static HRESULT WINAPI StorageBaseImpl_CreateStorage(
return
STG_E_INVALIDNAME
;
}
strcpyW
(
newEntry
.
name
,
pwcsName
);
l
strcpyW
(
newEntry
.
name
,
pwcsName
);
newEntry
.
stgType
=
STGTY_STORAGE
;
newEntry
.
startingBlock
=
BLOCK_END_OF_CHAIN
;
...
...
@@ -2357,7 +2356,7 @@ static HRESULT WINAPI StorageBaseImpl_CopyTo(
while
(
*
snb
!=
NULL
&&
fail
)
{
if
(
lstrcmpW
(
data
.
name
,
*
snb
)
==
0
)
if
(
wcscmp
(
data
.
name
,
*
snb
)
==
0
)
fail
=
FALSE
;
++
snb
;
}
...
...
@@ -4768,7 +4767,7 @@ static HRESULT StorageImpl_Refresh(StorageImpl *This, BOOL new_object, BOOL crea
* Initialize the directory table
*/
memset
(
&
rootEntry
,
0
,
sizeof
(
rootEntry
));
strcpyW
(
rootEntry
.
name
,
rootentryW
);
l
strcpyW
(
rootEntry
.
name
,
rootentryW
);
rootEntry
.
sizeOfNameString
=
sizeof
(
rootentryW
);
rootEntry
.
stgType
=
STGTY_ROOT
;
rootEntry
.
leftChild
=
DIRENTRY_NULL
;
...
...
@@ -7040,7 +7039,7 @@ void StorageUtl_CopyDirEntryToSTATSTG(
destination
->
pwcsName
=
CoTaskMemAlloc
((
lstrlenW
(
source
->
name
)
+
1
)
*
sizeof
(
WCHAR
));
strcpyW
(
destination
->
pwcsName
,
source
->
name
);
l
strcpyW
(
destination
->
pwcsName
,
source
->
name
);
}
switch
(
source
->
stgType
)
...
...
dlls/ole32/usrmarshal.c
View file @
0f47bb66
...
...
@@ -35,7 +35,6 @@
#include "oleauto.h"
#include "rpcproxy.h"
#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
ole
);
...
...
@@ -1716,7 +1715,7 @@ ULONG __RPC_USER STGMEDIUM_UserSize(ULONG *pFlags, ULONG StartingSize, STGMEDIUM
{
TRACE
(
"file name is %s
\n
"
,
debugstr_w
(
pStgMedium
->
u
.
lpszFileName
));
size
+=
3
*
sizeof
(
DWORD
)
+
(
strlenW
(
pStgMedium
->
u
.
lpszFileName
)
+
1
)
*
sizeof
(
WCHAR
);
(
l
strlenW
(
pStgMedium
->
u
.
lpszFileName
)
+
1
)
*
sizeof
(
WCHAR
);
}
break
;
case
TYMED_ISTREAM
:
...
...
@@ -1814,7 +1813,7 @@ unsigned char * __RPC_USER STGMEDIUM_UserMarshal(ULONG *pFlags, unsigned char *p
if
(
pStgMedium
->
u
.
lpszFileName
)
{
DWORD
len
;
len
=
strlenW
(
pStgMedium
->
u
.
lpszFileName
);
len
=
l
strlenW
(
pStgMedium
->
u
.
lpszFileName
);
/* conformance */
*
(
DWORD
*
)
pBuffer
=
len
+
1
;
pBuffer
+=
sizeof
(
DWORD
);
...
...
@@ -2126,7 +2125,7 @@ ULONG __RPC_USER SNB_UserSize(ULONG *pFlags, ULONG StartingSize, SNB *pSnb)
while
(
*
ptrW
)
{
size
+=
(
strlenW
(
*
ptrW
)
+
1
)
*
sizeof
(
WCHAR
);
size
+=
(
l
strlenW
(
*
ptrW
)
+
1
)
*
sizeof
(
WCHAR
);
ptrW
++
;
}
}
...
...
@@ -2161,7 +2160,7 @@ unsigned char * __RPC_USER SNB_UserMarshal(ULONG *pFlags, unsigned char *pBuffer
while
(
*
ptrW
)
{
ULONG
len
=
strlenW
(
*
ptrW
)
+
1
;
ULONG
len
=
l
strlenW
(
*
ptrW
)
+
1
;
wire
->
strcnt
++
;
wire
->
charcnt
+=
len
;
...
...
@@ -2202,7 +2201,7 @@ unsigned char * __RPC_USER SNB_UserUnmarshal(ULONG *pFlags, unsigned char *pBuff
for
(
i
=
0
;
i
<
wire
->
strcnt
;
i
++
)
{
ULONG
len
=
strlenW
(
src
);
ULONG
len
=
l
strlenW
(
src
);
memcpy
(
dest
,
src
,
(
len
+
1
)
*
sizeof
(
WCHAR
));
*
ptrW
=
dest
;
src
+=
len
+
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment