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
65578c03
Commit
65578c03
authored
Jul 20, 2002
by
Juergen Schmied
Committed by
Alexandre Julliard
Jul 20, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Many stubs
- Some ordinals, SHStrDupA and SHStrDupW implemented.
parent
751c4544
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
223 additions
and
102 deletions
+223
-102
ordinal.c
dlls/shlwapi/ordinal.c
+142
-29
reg.c
dlls/shlwapi/reg.c
+14
-62
shlwapi.spec
dlls/shlwapi/shlwapi.spec
+11
-11
string.c
dlls/shlwapi/string.c
+56
-0
No files found.
dlls/shlwapi/ordinal.c
View file @
65578c03
...
...
@@ -1016,7 +1016,22 @@ DWORD WINAPI SHLWAPI_162(LPSTR lpStr, DWORD size)
}
/*************************************************************************
* @ [SHLWAPI.164]
* _IUnknown_QueryStatus [SHLWAPI.163]
*/
DWORD
WINAPI
SHLWAPI_163
(
LPVOID
v
,
LPVOID
w
,
LPVOID
x
,
LPVOID
y
,
LPVOID
z
)
{
TRACE
(
"(%p %p %p %p %p) stub
\n
"
,
v
,
w
,
x
,
y
,
z
);
return
0
;
}
/*************************************************************************
* _IUnknown_Exec [SHLWAPI.164]
*/
DWORD
WINAPI
SHLWAPI_164
(
LPVOID
u
,
...
...
@@ -1046,7 +1061,16 @@ LONG WINAPI SHLWAPI_165(HWND hwnd, INT offset, UINT wFlags, UINT wMask)
}
/*************************************************************************
* @ [SHLWAPI.169]
* _SHSetParentHwnd [SHLWAPI.167]
*/
DWORD
WINAPI
SHLWAPI_167
(
HWND
hWnd
,
LPVOID
y
)
{
FIXME
(
"0x%08x %p
\n
"
,
hWnd
,
y
);
return
0
;
}
/*************************************************************************
* _IUnknown_AtomicRelease [SHLWAPI.169]
*
* Do IUnknown::Release on passed object.
*/
...
...
@@ -1075,26 +1099,36 @@ LPCSTR WINAPI SHLWAPI_170(LPCSTR lpszSrc)
}
/*************************************************************************
* @ [SHLWAPI.172]
* _SHIsSameObject SHLWAPI.171]
*/
BOOL
WINAPI
SHLWAPI_171
(
LPVOID
x
,
LPVOID
y
)
{
FIXME
(
"%p %p
\n
"
,
x
,
y
);
return
0
;
}
/*************************************************************************
* _IUnknown_GetWindow [SHLWAPI.172]
* Get window handle of OLE object
*/
DWORD
WINAPI
SHLWAPI_172
(
IUnknown
*
y
,
/* [in] OLE object interface */
LPHWND
z
)
/* [out] location to put window handle */
IUnknown
*
pUnk
,
/* [in] OLE object interface */
LPHWND
hWnd
)
/* [out] location to put window handle */
{
DWORD
ret
;
I
Unknown
*
pv
;
DWORD
ret
=
E_FAIL
;
I
OleWindow
*
pOleWnd
;
TRACE
(
"(%p %p)
\n
"
,
y
,
z
);
if
(
!
y
)
return
E_FAIL
;
TRACE
(
"(%p %p)
\n
"
,
pUnk
,
hWnd
);
if
((
ret
=
IUnknown_QueryInterface
(
y
,
&
IID_IOleWindow
,(
LPVOID
*
)
&
pv
))
<
0
)
{
/* error */
return
ret
;
if
(
pUnk
)
{
ret
=
IUnknown_QueryInterface
(
pUnk
,
&
IID_IOleWindow
,(
LPVOID
*
)
&
pOleWnd
);
if
(
SUCCEEDED
(
ret
))
{
ret
=
IOleWindow_GetWindow
(
pOleWnd
,
hWnd
);
IOleWindow_Release
(
pOleWnd
);
TRACE
(
"result hwnd=%08x
\n
"
,
*
hWnd
);
}
}
ret
=
IOleWindow_GetWindow
((
IOleWindow
*
)
pv
,
z
);
IUnknown_Release
(
pv
);
TRACE
(
"result hwnd=%08x
\n
"
,
*
z
);
return
ret
;
}
...
...
@@ -1152,7 +1186,7 @@ HRESULT WINAPI SHLWAPI_175 (LPVOID x, LPVOID y)
return
E_FAIL
;
}
/*************************************************************************
*
@
[SHLWAPI.176]
*
_IUnknown_QueryService
[SHLWAPI.176]
*
* Function appears to be interface to IServiceProvider::QueryService
*
...
...
@@ -1165,19 +1199,23 @@ DWORD WINAPI SHLWAPI_176 (
IUnknown
*
unk
,
/* [in] object to give Service Provider */
REFGUID
sid
,
/* [in] Service ID */
REFIID
riid
,
/* [in] Function requested */
LPVOID
*
z
)
/* [out] place to save interface pointer */
{
DWORD
ret
;
LPVOID
aa
;
*
z
=
0
;
if
(
!
unk
)
return
E_FAIL
;
ret
=
IUnknown_QueryInterface
(
unk
,
&
IID_IServiceProvider
,
&
aa
);
TRACE
(
"did IU_QI retval=%08lx, aa=%p
\n
"
,
ret
,
aa
);
if
(
ret
)
return
ret
;
ret
=
IServiceProvider_QueryService
((
IServiceProvider
*
)
aa
,
sid
,
riid
,
(
void
**
)
z
);
TRACE
(
"did ISP_QS retval=%08lx, *z=%p
\n
"
,
ret
,
(
LPVOID
)
*
z
);
IUnknown_Release
((
IUnknown
*
)
aa
);
LPVOID
*
ppv
)
/* [out] place to save interface pointer */
{
HRESULT
ret
=
E_FAIL
;
IServiceProvider
*
pSP
;
*
ppv
=
0
;
TRACE
(
"%p, %s, %s, %p
\n
"
,
unk
,
debugstr_guid
(
sid
),
debugstr_guid
(
riid
),
ppv
);
if
(
unk
)
{
ret
=
IUnknown_QueryInterface
(
unk
,
&
IID_IServiceProvider
,(
LPVOID
*
)
&
pSP
);
TRACE
(
"did IU_QI retval=%08lx, aa=%p
\n
"
,
ret
,
pSP
);
if
(
SUCCEEDED
(
ret
))
{
ret
=
IServiceProvider_QueryService
(
pSP
,
sid
,
riid
,
(
LPVOID
*
)
ppv
);
TRACE
(
"did ISP_QS retval=%08lx, *z=%p
\n
"
,
ret
,
*
ppv
);
IServiceProvider_Release
(
pSP
);
}
}
return
ret
;
}
...
...
@@ -1205,6 +1243,15 @@ DWORD WINAPI SHLWAPI_183(WNDCLASSA *wndclass)
}
/*************************************************************************
* _IUnknown_OnFocusOCS [SHLWAPI.189]
*/
DWORD
WINAPI
SHLWAPI_189
(
LPVOID
x
,
LPVOID
y
)
{
FIXME
(
"%p %p
\n
"
,
x
,
y
);
return
0
;
}
/*************************************************************************
* @ [SHLWAPI.193]
*/
DWORD
WINAPI
SHLWAPI_193
()
...
...
@@ -1721,6 +1768,36 @@ HWND WINAPI SHLWAPI_278 (
}
/*************************************************************************
* _SHPackDispParamsV [SHLWAPI.281]
*/
HRESULT
WINAPI
SHLWAPI_281
(
LPVOID
w
,
LPVOID
x
,
LPVOID
y
,
LPVOID
z
)
{
FIXME
(
"%p %p %p %p
\n
"
,
w
,
x
,
y
,
z
);
return
E_FAIL
;
}
/*************************************************************************
* _IConnectionPoint_SimpleInvoke [SHLWAPI.284]
*/
DWORD
WINAPI
SHLWAPI_284
(
LPVOID
x
,
LPVOID
y
,
LPVOID
z
)
{
TRACE
(
"(%p %p %p) stub
\n
"
,
x
,
y
,
z
);
return
0
;
}
/*************************************************************************
* _IUnknown_CPContainerOnChanged [SHLWAPI.287]
*/
HRESULT
WINAPI
SHLWAPI_287
(
LPVOID
x
,
LPVOID
y
)
{
FIXME
(
"%p %p
\n
"
,
x
,
y
);
return
E_FAIL
;
}
/*************************************************************************
* @ [SHLWAPI.289]
*
* Late bound call to winmm.PlaySoundW
...
...
@@ -2194,6 +2271,42 @@ DWORD WINAPI SHLWAPI_413 (DWORD x)
}
/*************************************************************************
* SHGlobalCounterCreateNamedA [SHLWAPI.422]
*/
HANDLE
WINAPI
SHLWAPI_422
(
LPCSTR
pwName
,
int
nInitialCount
)
{
CHAR
pwCounterName
[
MAX_PATH
];
HANDLE
hSem
;
lstrcpyA
(
pwCounterName
,
"shell."
);
lstrcatA
(
pwCounterName
,
pwName
);
hSem
=
CreateSemaphoreA
(
NULL
/* FIXME */
,
nInitialCount
,
MAXLONG
,
pwCounterName
);
if
(
!
hSem
)
{
OpenSemaphoreA
(
SYNCHRONIZE
|
SEMAPHORE_MODIFY_STATE
,
0
,
pwCounterName
);
}
return
hSem
;
}
/*************************************************************************
* SHGlobalCounterCreateNamedW [SHLWAPI.423]
*/
HANDLE
WINAPI
SHLWAPI_423
(
LPCWSTR
pwName
,
int
nInitialCount
)
{
WCHAR
pwCounterName
[
MAX_PATH
];
WCHAR
pwShell
[
7
]
=
{
's'
,
'h'
,
'e'
,
'l'
,
'l'
,
'.'
,
'\0'
};
HANDLE
hSem
;
lstrcpyW
(
pwCounterName
,
pwShell
);
lstrcatW
(
pwCounterName
,
pwName
);
hSem
=
CreateSemaphoreW
(
NULL
/* FIXME */
,
nInitialCount
,
MAXLONG
,
pwCounterName
);
if
(
!
hSem
)
{
OpenSemaphoreW
(
SYNCHRONIZE
|
SEMAPHORE_MODIFY_STATE
,
0
,
pwCounterName
);
}
return
hSem
;
}
/*************************************************************************
* @ [SHLWAPI.418]
*
* Function seems to do FreeLibrary plus other things.
...
...
dlls/shlwapi/reg.c
View file @
65578c03
...
...
@@ -972,68 +972,6 @@ LONG WINAPI SHQueryInfoKeyW(HKEY hKey, LPDWORD pwSubKeys, LPDWORD pwSubKeyMax,
NULL
,
pwValues
,
pwValueMax
,
NULL
,
NULL
,
NULL
);
}
/*
DWORD dwRet, dwType, dwDataLen;
FIXME("(hkey=0x%08x,%s,%p,%p,%p,%p=%ld)\n", hKey, debugstr_a(lpszValue),
lpReserved, pwType, pvData, pcbData, pcbData ? *pcbData : 0);
if (pcbData) dwDataLen = *pcbData;
dwRet = RegQueryValueExA(hKey, lpszValue, lpReserved, &dwType, pvData, &dwDataLen);
if (!dwRet)
{
if (dwType == REG_EXPAND_SZ)
{
LPSTR szExpand;
LPBYTE pData = pvData;
if (!pData)
{
if (!pcbData || !(pData = (LPBYTE) LocalAlloc(GMEM_ZEROINIT, *pcbData)))
return ERROR_OUTOFMEMORY;
if ((dwRet = RegQueryValueExA (hKey, lpszValue, lpReserved, &dwType, pData, &dwDataLen)))
return dwRet;
}
if (!pcbData && pData != pvData)
{
WARN("Invalid pcbData would crash under Win32!\n");
return ERROR_OUTOFMEMORY;
}
szExpand = (LPBYTE) LocalAlloc(GMEM_ZEROINIT, *pcbData);
if (!szExpand)
{
if ( pData != pvData ) LocalFree((HLOCAL)pData);
return ERROR_OUTOFMEMORY;
}
if ((ExpandEnvironmentStringsA(pvData, szExpand, *pcbData) > 0))
{
dwDataLen = strlen(szExpand) + 1;
strncpy(pvData, szExpand, *pcbData);
}
else
{
if ( pData != pvData ) LocalFree((HLOCAL)pData);
LocalFree((HLOCAL)szExpand);
return GetLastError();
}
if (pData != pvData) LocalFree((HLOCAL)pData);
LocalFree((HLOCAL)szExpand);
dwType = REG_SZ;
}
if (dwType == REG_SZ && pvData && pcbData && dwDataLen >= *pcbData)
{
((LPBYTE) pvData)[*pcbData] = '\0';
}
}
if ( pwType ) *pwType = dwType;
if ( pcbData ) *pcbData = dwDataLen;
return dwRet;
*/
/*************************************************************************
* SHQueryValueExA [SHLWAPI.@]
*
...
...
@@ -1061,6 +999,20 @@ LONG WINAPI SHQueryInfoKeyW(HKEY hKey, LPDWORD pwSubKeys, LPDWORD pwSubKeyMax,
* If the type of the data is REG_EXPAND_SZ, it is expanded to REG_SZ. The
* value returned will be truncated if it is of type REG_SZ and bigger than
* the buffer given to store it.
*
* REG_EXPAND_SZ
* case 1: the unexpanded string is smaller than the expanded one
* subcase 1: the buffer is to small to hold the unexpanded string:
* function fails and returns the size of the unexpanded string.
*
* subcase 2: buffer is to small to hold the expanded string:
* the function return success (!!) and the result is truncated
* *** This is clearly a error in the native implemantation. ***
*
* case 2: the unexpanded string is bigger than the expanded one
* The buffer must have enough space to hold the unexpanded
* string even if the result is smaller.
*
*/
DWORD
WINAPI
SHQueryValueExA
(
HKEY
hKey
,
LPCSTR
lpszValue
,
LPDWORD
lpReserved
,
LPDWORD
pwType
,
...
...
dlls/shlwapi/shlwapi.spec
View file @
65578c03
...
...
@@ -162,15 +162,15 @@ init SHLWAPI_LibMain
160 stub @
161 stub @
162 stdcall @(str long) SHLWAPI_162
163 st
ub @
163 st
dcall @(ptr ptr ptr ptr ptr) SHLWAPI_163
164 stdcall @(ptr ptr ptr ptr ptr ptr) SHLWAPI_164
165 stdcall @(long long long long) SHLWAPI_165
166 stdcall @(ptr) SHLWAPI_166
167 st
ub @
167 st
dcall @(long ptr) SHLWAPI_167
168 stub @
169 stdcall @(long) SHLWAPI_169
170 stdcall @(str) SHLWAPI_170
171 st
ub @
171 st
dcall @(ptr ptr) SHLWAPI_171
172 stdcall @(ptr ptr) SHLWAPI_172
173 stub @
174 stdcall @(ptr ptr) SHLWAPI_174
...
...
@@ -188,7 +188,7 @@ init SHLWAPI_LibMain
186 stub @
187 stub @
188 stub @
189 st
ub @
189 st
dcall @(ptr ptr) SHLWAPI_189
190 stub @
191 stub @
192 stub @
...
...
@@ -280,13 +280,13 @@ init SHLWAPI_LibMain
278 stdcall @(long long long long long long) SHLWAPI_278
279 stub @
280 stub @
281 st
ub @
281 st
dcall @(ptr ptr ptr ptr) SHLWAPI_281
282 stub @
283 stub @
284 st
ub @
284 st
dcall @(ptr ptr ptr) SHLWAPI_284
285 stub @
286 stub @
287 st
ub @
287 st
dcall @(ptr ptr) SHLWAPI_287
288 stub @
289 stdcall @(wstr long long) SHLWAPI_289
290 stub @
...
...
@@ -421,8 +421,8 @@ init SHLWAPI_LibMain
419 stub @
420 stub @
421 stub @
422 st
ub @
423 st
ub @
422 st
dcall @(str long) SHLWAPI_422
423 st
dcall @(wstr long) SHLWAPI_423
424 stub @
425 stub @
426 stub @
...
...
@@ -720,8 +720,8 @@ init SHLWAPI_LibMain
@ stub SHRegisterValidateTemplate
@ stdcall SHSetThreadRef (ptr) SHSetThreadRef
@ stub SHSkipJunction
@ st
ub
SHStrDupA
@ st
ub
SHStrDupW
@ st
dcall SHStrDupA (str ptr)
SHStrDupA
@ st
dcall SHStrDupW (wstr ptr)
SHStrDupW
@ stub StrFormatByteSize64A
@ stub StrFormatKBSizeA
@ stub StrFormatKBSizeW
dlls/shlwapi/string.c
View file @
65578c03
...
...
@@ -634,3 +634,59 @@ BOOL WINAPI StrTrimA(LPSTR pszSource, LPCSTR pszTrimChars)
TRACE
(
"<- '%s'
\n
"
,
pszSource
);
return
trimmed
;
}
/*************************************************************************
* SHStrDupA [SHLWAPI.@]
*
* Duplicates a ASCII string to UNICODE. The destination buffer is allocated.
*/
HRESULT
WINAPI
SHStrDupA
(
LPCSTR
src
,
LPWSTR
*
dest
)
{
HRESULT
hr
;
int
len
=
0
;
if
(
src
)
{
len
=
(
MultiByteToWideChar
(
0
,
0
,
src
,
-
1
,
0
,
0
)
+
1
)
*
sizeof
(
WCHAR
);
*
dest
=
CoTaskMemAlloc
(
len
);
}
else
{
*
dest
=
NULL
;
}
if
(
*
dest
)
{
MultiByteToWideChar
(
0
,
0
,
src
,
-
1
,
*
dest
,
len
);
hr
=
S_OK
;
}
else
{
hr
=
E_OUTOFMEMORY
;
}
TRACE
(
"%s->(%p)
\n
"
,
debugstr_a
(
src
),
*
dest
);
return
hr
;
}
/*************************************************************************
* SHStrDupW [SHLWAPI.@]
*
* Duplicates a UNICODE string. The destination buffer is allocated.
*/
HRESULT
WINAPI
SHStrDupW
(
LPCWSTR
src
,
LPWSTR
*
dest
)
{
HRESULT
hr
;
int
len
=
0
;
if
(
src
)
{
len
=
(
lstrlenW
(
src
)
+
1
)
*
sizeof
(
WCHAR
);
*
dest
=
CoTaskMemAlloc
(
len
);
}
else
{
*
dest
=
NULL
;
}
if
(
*
dest
)
{
memcpy
(
*
dest
,
src
,
len
);
hr
=
S_OK
;
}
else
{
hr
=
E_OUTOFMEMORY
;
}
TRACE
(
"%s->(%p)
\n
"
,
debugstr_w
(
src
),
*
dest
);
return
hr
;
}
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