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
516b50f3
Commit
516b50f3
authored
Jan 26, 2004
by
Martin Fuchs
Committed by
Alexandre Julliard
Jan 26, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- don't link directly to NTDLL; use MultiByteToWideChar() instead of
RtlCreateUnicodeStringFromAsciiz() - directly call InitCommonControlsEx()
parent
703676f5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
44 deletions
+38
-44
Makefile.in
dlls/shell32/Makefile.in
+1
-1
pidl.c
dlls/shell32/pidl.c
+14
-9
shell32_main.c
dlls/shell32/shell32_main.c
+23
-29
shell32_main.h
dlls/shell32/shell32_main.h
+0
-5
No files found.
dlls/shell32/Makefile.in
View file @
516b50f3
...
...
@@ -5,7 +5,7 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
MODULE
=
shell32.dll
# fixme: avoid ole32.dll import
IMPORTS
=
ole32 shlwapi comctl32 user32 gdi32 advapi32 kernel32
ntdll
IMPORTS
=
ole32 shlwapi comctl32 user32 gdi32 advapi32 kernel32
ALTNAMES
=
shell.dll
EXTRALIBS
=
$(LIBUUID)
$(LIBUNICODE)
...
...
dlls/shell32/pidl.c
View file @
516b50f3
...
...
@@ -39,7 +39,6 @@
#include "shlguid.h"
#include "winerror.h"
#include "winnls.h"
#include "winternl.h"
#include "undocshell.h"
#include "shell32_main.h"
#include "shellapi.h"
...
...
@@ -1041,18 +1040,24 @@ static HRESULT WINAPI _ILParsePathW(LPCWSTR path, LPWIN32_FIND_DATAW lpFindFile,
*/
LPITEMIDLIST
WINAPI
SHSimpleIDListFromPathA
(
LPCSTR
lpszPath
)
{
LPITEMIDLIST
pidl
=
NULL
;
UNICODE_STRING
wPath
;
LPITEMIDLIST
pidl
=
NULL
;
LPWSTR
wPath
=
NULL
;
int
len
;
TRACE
(
"%s
\n
"
,
debugstr_a
(
lpszPath
));
TRACE
(
"%s
\n
"
,
debugstr_a
(
lpszPath
));
RtlCreateUnicodeStringFromAsciiz
(
&
wPath
,
lpszPath
);
if
(
lpszPath
)
{
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
lpszPath
,
-
1
,
NULL
,
0
);
wPath
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
lpszPath
,
-
1
,
wPath
,
len
);
}
_ILParsePathW
(
wPath
.
Buffer
,
NULL
,
TRUE
,
&
pidl
,
NULL
);
RtlFreeUnicodeString
(
&
wPath
);
_ILParsePathW
(
wPath
,
NULL
,
TRUE
,
&
pidl
,
NULL
);
TRACE
(
"%s %p
\n
"
,
debugstr_a
(
lpszPath
),
pidl
);
return
pidl
;
if
(
wPath
)
HeapFree
(
GetProcessHeap
(),
0
,
wPath
);
TRACE
(
"%s %p
\n
"
,
debugstr_a
(
lpszPath
),
pidl
);
return
pidl
;
}
LPITEMIDLIST
WINAPI
SHSimpleIDListFromPathW
(
LPCWSTR
lpszPath
)
...
...
dlls/shell32/shell32_main.c
View file @
516b50f3
...
...
@@ -30,7 +30,6 @@
#include "winbase.h"
#include "winerror.h"
#include "winreg.h"
#include "winternl.h"
#include "dlgs.h"
#include "shellapi.h"
#include "winuser.h"
...
...
@@ -798,14 +797,27 @@ INT_PTR CALLBACK AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam,
*/
BOOL
WINAPI
ShellAboutA
(
HWND
hWnd
,
LPCSTR
szApp
,
LPCSTR
szOtherStuff
,
HICON
hIcon
)
{
UNICODE_STRING
appW
,
otherW
;
BOOL
ret
;
LPWSTR
appW
=
NULL
,
otherW
=
NULL
;
int
len
;
RtlCreateUnicodeStringFromAsciiz
(
&
appW
,
szApp
);
RtlCreateUnicodeStringFromAsciiz
(
&
otherW
,
szOtherStuff
);
ret
=
ShellAboutW
(
hWnd
,
appW
.
Buffer
,
otherW
.
Buffer
,
hIcon
);
RtlFreeUnicodeString
(
&
appW
);
RtlFreeUnicodeString
(
&
otherW
);
if
(
szApp
)
{
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
szApp
,
-
1
,
NULL
,
0
);
appW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
szApp
,
-
1
,
appW
,
len
);
}
if
(
szOtherStuff
)
{
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
szOtherStuff
,
-
1
,
NULL
,
0
);
otherW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
szOtherStuff
,
-
1
,
otherW
,
len
);
}
ret
=
ShellAboutW
(
hWnd
,
appW
,
otherW
,
hIcon
);
if
(
otherW
)
HeapFree
(
GetProcessHeap
(),
0
,
otherW
);
if
(
appW
)
HeapFree
(
GetProcessHeap
(),
0
,
appW
);
return
ret
;
}
...
...
@@ -880,10 +892,6 @@ HRESULT WINAPI SHELL32_DllGetVersion (DLLVERSIONINFO *pdvi)
* all are once per process
*
*/
void
(
WINAPI
*
pDLLInitComctl
)(
LPVOID
);
static
HINSTANCE
hComctl32
;
HINSTANCE
shell32_hInstance
=
0
;
HIMAGELIST
ShellSmallIconList
=
0
;
HIMAGELIST
ShellBigIconList
=
0
;
...
...
@@ -904,27 +912,13 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
{
case
DLL_PROCESS_ATTACH
:
shell32_hInstance
=
hinstDLL
;
/* get full path to this DLL for IExtractIconW_fnGetIconLocation() */
GetModuleFileNameW
(
hinstDLL
,
swShell32Name
,
MAX_PATH
);
WideCharToMultiByte
(
CP_ACP
,
0
,
swShell32Name
,
-
1
,
sShell32Name
,
MAX_PATH
,
NULL
,
NULL
);
hComctl32
=
GetModuleHandleA
(
"COMCTL32.DLL"
);
DisableThreadLibraryCalls
(
shell32_hInstance
);
if
(
!
hComctl32
)
{
ERR
(
"P A N I C SHELL32 loading failed
\n
"
);
return
FALSE
;
}
/* get full path to this DLL for IExtractIconW_fnGetIconLocation() */
GetModuleFileNameW
(
hinstDLL
,
swShell32Name
,
MAX_PATH
);
WideCharToMultiByte
(
CP_ACP
,
0
,
swShell32Name
,
-
1
,
sShell32Name
,
MAX_PATH
,
NULL
,
NULL
);
/* comctl32 */
pDLLInitComctl
=
(
void
*
)
GetProcAddress
(
hComctl32
,
"InitCommonControlsEx"
);
/* initialize the common controls */
if
(
pDLLInitComctl
)
{
pDLLInitComctl
(
NULL
);
}
InitCommonControlsEx
(
NULL
);
SIC_Initialize
();
SYSTRAY_Init
();
...
...
dlls/shell32/shell32_main.h
View file @
516b50f3
...
...
@@ -46,11 +46,6 @@ extern HIMAGELIST ShellSmallIconList;
extern
HIMAGELIST
ShellBigIconList
;
extern
HDPA
sic_hdpa
;
/*******************************************
* pointer to functions dynamically loaded
*/
extern
void
(
WINAPI
*
pDLLInitComctl
)(
LPVOID
);
BOOL
WINAPI
Shell_GetImageList
(
HIMAGELIST
*
lpBigList
,
HIMAGELIST
*
lpSmallList
);
/* Iconcache */
...
...
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