Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
556d8b5e
Commit
556d8b5e
authored
Jan 17, 2001
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced some GetProcAddress() imports by the standard dll import
mechanism.
parent
06187462
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
57 additions
and
203 deletions
+57
-203
cdlg.h
dlls/commdlg/cdlg.h
+0
-24
cdlg32.c
dlls/commdlg/cdlg32.c
+8
-85
filedlg95.c
dlls/commdlg/filedlg95.c
+31
-31
filedlgbrowser.c
dlls/commdlg/filedlgbrowser.c
+4
-3
folders.c
dlls/shell32/folders.c
+2
-2
iconcache.c
dlls/shell32/iconcache.c
+8
-8
shell32_main.c
dlls/shell32/shell32_main.c
+3
-39
shell32_main.h
dlls/shell32/shell32_main.h
+0
-10
shlmenu.c
dlls/shell32/shlmenu.c
+1
-1
No files found.
dlls/commdlg/cdlg.h
View file @
556d8b5e
...
...
@@ -92,9 +92,6 @@ typedef struct {
#include "shlobj.h"
#include "shellapi.h"
/* IMAGELIST */
extern
BOOL
(
WINAPI
*
COMDLG32_ImageList_Draw
)
(
HIMAGELIST
himl
,
int
i
,
HDC
hdcDest
,
int
x
,
int
y
,
UINT
fStyle
);
/* ITEMIDLIST */
extern
LPITEMIDLIST
(
WINAPI
*
COMDLG32_PIDL_ILClone
)
(
LPCITEMIDLIST
);
...
...
@@ -104,31 +101,10 @@ extern BOOL (WINAPI *COMDLG32_PIDL_ILRemoveLastID)(LPCITEMIDLIST);
extern
BOOL
(
WINAPI
*
COMDLG32_PIDL_ILIsEqual
)(
LPCITEMIDLIST
,
LPCITEMIDLIST
);
/* SHELL */
extern
BOOL
(
WINAPI
*
COMDLG32_SHGetPathFromIDListA
)
(
LPCITEMIDLIST
,
LPSTR
);
extern
HRESULT
(
WINAPI
*
COMDLG32_SHGetSpecialFolderLocation
)(
HWND
,
INT
,
LPITEMIDLIST
*
);
extern
DWORD
(
WINAPI
*
COMDLG32_SHGetDesktopFolder
)(
IShellFolder
**
);
extern
DWORD
(
WINAPI
*
COMDLG32_SHGetFileInfoA
)(
LPCSTR
,
DWORD
,
SHFILEINFOA
*
,
UINT
,
UINT
);
extern
LPVOID
(
WINAPI
*
COMDLG32_SHAlloc
)(
DWORD
);
extern
DWORD
(
WINAPI
*
COMDLG32_SHFree
)(
LPVOID
);
extern
HRESULT
(
WINAPI
*
COMDLG32_SHGetDataFromIDListA
)(
LPSHELLFOLDER
psf
,
LPCITEMIDLIST
pidl
,
int
nFormat
,
LPVOID
dest
,
int
len
);
extern
BOOL
(
WINAPI
*
COMDLG32_SHGetFolderPathA
)(
HWND
,
int
,
HANDLE
,
DWORD
,
LPSTR
);
/* PATH */
extern
BOOL
(
WINAPI
*
COMDLG32_PathIsRootA
)(
LPCSTR
x
);
extern
LPSTR
(
WINAPI
*
COMDLG32_PathFindFileNameA
)(
LPCSTR
path
);
extern
DWORD
(
WINAPI
*
COMDLG32_PathRemoveFileSpecA
)(
LPSTR
fn
);
extern
BOOL
(
WINAPI
*
COMDLG32_PathMatchSpecW
)(
LPCWSTR
x
,
LPCWSTR
y
);
extern
LPSTR
(
WINAPI
*
COMDLG32_PathAddBackslashA
)(
LPSTR
path
);
extern
BOOL
(
WINAPI
*
COMDLG32_PathCanonicalizeA
)(
LPSTR
pszBuf
,
LPCSTR
pszPath
);
extern
int
(
WINAPI
*
COMDLG32_PathGetDriveNumberA
)(
LPCSTR
lpszPath
);
extern
BOOL
(
WINAPI
*
COMDLG32_PathIsRelativeA
)
(
LPCSTR
lpszPath
);
extern
LPSTR
(
WINAPI
*
COMDLG32_PathFindNextComponentA
)(
LPCSTR
pszPath
);
extern
LPWSTR
(
WINAPI
*
COMDLG32_PathAddBackslashW
)(
LPWSTR
lpszPath
);
extern
LPSTR
(
WINAPI
*
COMDLG32_PathFindExtensionA
)(
LPCVOID
lpszPath
);
extern
BOOL
(
WINAPI
*
COMDLG32_PathAddExtensionA
)(
LPSTR
pszPath
,
LPCSTR
pszExtension
);
extern
BOOL
WINAPI
GetFileDialog95A
(
LPOPENFILENAMEA
ofn
,
UINT
iDlgType
);
extern
BOOL
WINAPI
GetFileDialog95W
(
LPOPENFILENAMEW
ofn
,
UINT
iDlgType
);
...
...
dlls/commdlg/cdlg32.c
View file @
556d8b5e
...
...
@@ -20,16 +20,10 @@ HINSTANCE COMDLG32_hInstance = 0;
HINSTANCE16
COMDLG32_hInstance16
=
0
;
static
DWORD
COMDLG32_TlsIndex
;
static
int
COMDLG32_Attach
=
0
;
HINSTANCE
COMCTL32_hInstance
=
0
;
HINSTANCE
SHELL32_hInstance
=
0
;
HINSTANCE
SHLWAPI_hInstance
=
0
;
HINSTANCE
SHFOLDER_hInstance
=
0
;
/* IMAGELIST */
BOOL
(
WINAPI
*
COMDLG32_ImageList_Draw
)
(
HIMAGELIST
himl
,
int
i
,
HDC
hdcDest
,
int
x
,
int
y
,
UINT
fStyle
);
/* ITEMIDLIST */
LPITEMIDLIST
(
WINAPI
*
COMDLG32_PIDL_ILClone
)
(
LPCITEMIDLIST
);
LPITEMIDLIST
(
WINAPI
*
COMDLG32_PIDL_ILCombine
)(
LPCITEMIDLIST
,
LPCITEMIDLIST
);
...
...
@@ -38,31 +32,10 @@ BOOL (WINAPI *COMDLG32_PIDL_ILRemoveLastID)(LPCITEMIDLIST);
BOOL
(
WINAPI
*
COMDLG32_PIDL_ILIsEqual
)(
LPCITEMIDLIST
,
LPCITEMIDLIST
);
/* SHELL */
BOOL
(
WINAPI
*
COMDLG32_SHGetPathFromIDListA
)
(
LPCITEMIDLIST
,
LPSTR
);
HRESULT
(
WINAPI
*
COMDLG32_SHGetSpecialFolderLocation
)(
HWND
,
INT
,
LPITEMIDLIST
*
);
DWORD
(
WINAPI
*
COMDLG32_SHGetDesktopFolder
)(
IShellFolder
**
);
DWORD
(
WINAPI
*
COMDLG32_SHGetFileInfoA
)(
LPCSTR
,
DWORD
,
SHFILEINFOA
*
,
UINT
,
UINT
);
LPVOID
(
WINAPI
*
COMDLG32_SHAlloc
)(
DWORD
);
DWORD
(
WINAPI
*
COMDLG32_SHFree
)(
LPVOID
);
HRESULT
(
WINAPI
*
COMDLG32_SHGetDataFromIDListA
)(
LPSHELLFOLDER
psf
,
LPCITEMIDLIST
pidl
,
int
nFormat
,
LPVOID
dest
,
int
len
);
HRESULT
(
WINAPI
*
COMDLG32_StrRetToBufA
)(
LPSTRRET
,
LPITEMIDLIST
,
LPSTR
,
DWORD
);
HRESULT
(
WINAPI
*
COMDLG32_StrRetToBufW
)(
LPSTRRET
,
LPITEMIDLIST
,
LPWSTR
,
DWORD
);
BOOL
(
WINAPI
*
COMDLG32_SHGetFolderPathA
)(
HWND
,
int
,
HANDLE
,
DWORD
,
LPSTR
);
/* PATH */
BOOL
(
WINAPI
*
COMDLG32_PathIsRootA
)(
LPCSTR
x
);
LPSTR
(
WINAPI
*
COMDLG32_PathFindFileNameA
)(
LPCSTR
path
);
DWORD
(
WINAPI
*
COMDLG32_PathRemoveFileSpecA
)(
LPSTR
fn
);
BOOL
(
WINAPI
*
COMDLG32_PathMatchSpecW
)(
LPCWSTR
x
,
LPCWSTR
y
);
LPSTR
(
WINAPI
*
COMDLG32_PathAddBackslashA
)(
LPSTR
path
);
BOOL
(
WINAPI
*
COMDLG32_PathCanonicalizeA
)(
LPSTR
pszBuf
,
LPCSTR
pszPath
);
int
(
WINAPI
*
COMDLG32_PathGetDriveNumberA
)(
LPCSTR
lpszPath
);
BOOL
(
WINAPI
*
COMDLG32_PathIsRelativeA
)
(
LPCSTR
lpszPath
);
LPSTR
(
WINAPI
*
COMDLG32_PathFindNextComponentA
)(
LPCSTR
pszPath
);
LPWSTR
(
WINAPI
*
COMDLG32_PathAddBackslashW
)(
LPWSTR
lpszPath
);
LPSTR
(
WINAPI
*
COMDLG32_PathFindExtensionA
)(
LPCVOID
lpszPath
);
BOOL
(
WINAPI
*
COMDLG32_PathAddExtensionA
)(
LPSTR
pszPath
,
LPCSTR
pszExtension
);
/***********************************************************************
* COMDLG32_DllEntryPoint (COMDLG32.entry)
*
...
...
@@ -87,18 +60,6 @@ BOOL WINAPI COMDLG32_DllEntryPoint(HINSTANCE hInstance, DWORD Reason, LPVOID Res
switch
(
Reason
)
{
case
DLL_PROCESS_ATTACH
:
COMDLG32_Attach
++
;
if
(
COMDLG32_hInstance
)
{
ERR
(
"comdlg32.dll instantiated twice in one address space!
\n
"
);
/*
* We should return FALSE here, but that will break
* most apps that use CreateProcess because we do
* not yet support seperate address spaces.
*/
return
TRUE
;
}
COMDLG32_hInstance
=
hInstance
;
DisableThreadLibraryCalls
(
hInstance
);
...
...
@@ -113,19 +74,14 @@ BOOL WINAPI COMDLG32_DllEntryPoint(HINSTANCE hInstance, DWORD Reason, LPVOID Res
COMDLG32_TlsIndex
=
0xffffffff
;
COMCTL32_hInstance
=
GetModuleHandleA
(
"COMCTL32.DLL"
);
SHELL32_hInstance
=
GetModuleHandleA
(
"SHELL32.DLL"
);
SHLWAPI_hInstance
=
GetModuleHandleA
(
"SHLWAPI.DLL"
);
if
(
!
COMCTL32_hInstance
||
!
SHELL32_hInstance
||
!
SHLWAPI
_hInstance
)
if
(
!
SHELL32
_hInstance
)
{
ERR
(
"loading of
comctl32 or shell32 or shlwapi
failed
\n
"
);
ERR
(
"loading of
shell32
failed
\n
"
);
return
FALSE
;
}
/* IMAGELIST */
GPA
(
COMDLG32_ImageList_Draw
,
COMCTL32_hInstance
,
"ImageList_Draw"
);
/* ITEMIDLIST */
GPA
(
COMDLG32_PIDL_ILIsEqual
,
SHELL32_hInstance
,
(
LPCSTR
)
21L
);
GPA
(
COMDLG32_PIDL_ILCombine
,
SHELL32_hInstance
,
(
LPCSTR
)
25L
);
...
...
@@ -137,12 +93,6 @@ BOOL WINAPI COMDLG32_DllEntryPoint(HINSTANCE hInstance, DWORD Reason, LPVOID Res
GPA
(
COMDLG32_SHAlloc
,
SHELL32_hInstance
,
(
LPCSTR
)
196L
);
GPA
(
COMDLG32_SHFree
,
SHELL32_hInstance
,
(
LPCSTR
)
195L
);
GPA
(
COMDLG32_SHGetSpecialFolderLocation
,
SHELL32_hInstance
,
"SHGetSpecialFolderLocation"
);
GPA
(
COMDLG32_SHGetPathFromIDListA
,
SHELL32_hInstance
,
"SHGetPathFromIDListA"
);
GPA
(
COMDLG32_SHGetDesktopFolder
,
SHELL32_hInstance
,
"SHGetDesktopFolder"
);
GPA
(
COMDLG32_SHGetFileInfoA
,
SHELL32_hInstance
,
"SHGetFileInfoA"
);
GPA
(
COMDLG32_SHGetDataFromIDListA
,
SHELL32_hInstance
,
"SHGetDataFromIDListA"
);
/* for the first versions of shell32 SHGetFolderPathA is in SHFOLDER.DLL */
COMDLG32_SHGetFolderPathA
=
(
void
*
)
GetProcAddress
(
SHELL32_hInstance
,
"SHGetFolderPathA"
);
if
(
!
COMDLG32_SHGetFolderPathA
)
...
...
@@ -151,42 +101,15 @@ BOOL WINAPI COMDLG32_DllEntryPoint(HINSTANCE hInstance, DWORD Reason, LPVOID Res
GPA
(
COMDLG32_SHGetFolderPathA
,
SHFOLDER_hInstance
,
"SHGetFolderPathA"
);
}
/* ### WARINIG ###
We can't do a GetProcAddress to link to StrRetToBuf[A|W] sine not all
versions of the shlwapi are exporting these functions. When we are
seperating the dlls then we have to dublicate code from shell32 into comdlg32.
Till then just call these functions. These functions don't have any side effects
so it won't break the use of any combination of native and buildin dll's (jsch) */
/* PATH */
GPA
(
COMDLG32_PathMatchSpecW
,
SHLWAPI_hInstance
,
"PathMatchSpecW"
);
GPA
(
COMDLG32_PathIsRootA
,
SHLWAPI_hInstance
,
"PathIsRootA"
);
GPA
(
COMDLG32_PathRemoveFileSpecA
,
SHLWAPI_hInstance
,
"PathRemoveFileSpecA"
);
GPA
(
COMDLG32_PathFindFileNameA
,
SHLWAPI_hInstance
,
"PathFindFileNameA"
);
GPA
(
COMDLG32_PathAddBackslashA
,
SHLWAPI_hInstance
,
"PathAddBackslashA"
);
GPA
(
COMDLG32_PathCanonicalizeA
,
SHLWAPI_hInstance
,
"PathCanonicalizeA"
);
GPA
(
COMDLG32_PathGetDriveNumberA
,
SHLWAPI_hInstance
,
"PathGetDriveNumberA"
);
GPA
(
COMDLG32_PathIsRelativeA
,
SHLWAPI_hInstance
,
"PathIsRelativeA"
);
GPA
(
COMDLG32_PathFindNextComponentA
,
SHLWAPI_hInstance
,
"PathFindNextComponentA"
);
GPA
(
COMDLG32_PathAddBackslashW
,
SHLWAPI_hInstance
,
"PathAddBackslashW"
);
GPA
(
COMDLG32_PathFindExtensionA
,
SHLWAPI_hInstance
,
"PathFindExtensionA"
);
GPA
(
COMDLG32_PathAddExtensionA
,
SHLWAPI_hInstance
,
"PathAddExtensionA"
);
break
;
case
DLL_PROCESS_DETACH
:
if
(
!--
COMDLG32_Attach
)
{
if
(
COMDLG32_TlsIndex
!=
0xffffffff
)
TlsFree
(
COMDLG32_TlsIndex
);
COMDLG32_TlsIndex
=
0xffffffff
;
COMDLG32_hInstance
=
0
;
if
(
COMDLG32_hInstance16
)
FreeLibrary16
(
COMDLG32_hInstance16
);
if
(
SHFOLDER_hInstance
)
FreeLibrary
(
SHFOLDER_hInstance
);
}
break
;
if
(
COMDLG32_TlsIndex
!=
0xffffffff
)
TlsFree
(
COMDLG32_TlsIndex
);
COMDLG32_TlsIndex
=
0xffffffff
;
COMDLG32_hInstance
=
0
;
if
(
COMDLG32_hInstance16
)
FreeLibrary16
(
COMDLG32_hInstance16
);
if
(
SHFOLDER_hInstance
)
FreeLibrary
(
SHFOLDER_hInstance
);
break
;
}
return
TRUE
;
}
...
...
dlls/commdlg/filedlg95.c
View file @
556d8b5e
This diff is collapsed.
Click to expand it.
dlls/commdlg/filedlgbrowser.c
View file @
556d8b5e
...
...
@@ -14,6 +14,7 @@
#include "heap.h"
#include "debugtools.h"
#include "shlwapi.h"
#include "filedlgbrowser.h"
#include "cdlg.h"
#include "shlguid.h"
...
...
@@ -75,7 +76,7 @@ extern HRESULT SendCustomDlgNotificationMessage(HWND hwndParentDlg, UINT uCode);
static
void
COMDLG32_UpdateCurrentDir
(
FileOpenDlgInfos
*
fodInfos
)
{
char
lpstrPath
[
MAX_PATH
];
COMDLG32_
SHGetPathFromIDListA
(
fodInfos
->
ShellInfos
.
pidlAbsCurrent
,
lpstrPath
);
SHGetPathFromIDListA
(
fodInfos
->
ShellInfos
.
pidlAbsCurrent
,
lpstrPath
);
SetCurrentDirectoryA
(
lpstrPath
);
TRACE
(
"new current folder %s
\n
"
,
lpstrPath
);
}
...
...
@@ -138,7 +139,7 @@ IShellBrowser * IShellBrowserImpl_Construct(HWND hwndOwner)
sb
->
lpVtbl
=
&
IShellBrowserImpl_Vtbl
;
sb
->
lpVtblCommDlgBrowser
=
&
IShellBrowserImpl_ICommDlgBrowser_Vtbl
;
sb
->
lpVtblServiceProvider
=
&
IShellBrowserImpl_IServiceProvider_Vtbl
;
COMDLG32_
SHGetSpecialFolderLocation
(
hwndOwner
,
CSIDL_DESKTOP
,
SHGetSpecialFolderLocation
(
hwndOwner
,
CSIDL_DESKTOP
,
&
fodInfos
->
ShellInfos
.
pidlAbsCurrent
);
TRACE
(
"%p
\n
"
,
sb
);
...
...
@@ -789,7 +790,7 @@ HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_IncludeObject(ICommDlgBrowser *
{
if
(
SUCCEEDED
(
COMDLG32_StrRetToStrNW
(
szPathW
,
MAX_PATH
,
&
str
,
pidl
)))
{
if
(
COMDLG32_
PathMatchSpecW
(
szPathW
,
fodInfos
->
ShellInfos
.
lpstrCurrentFilter
))
if
(
PathMatchSpecW
(
szPathW
,
fodInfos
->
ShellInfos
.
lpstrCurrentFilter
))
return
S_OK
;
}
}
...
...
dlls/shell32/folders.c
View file @
556d8b5e
...
...
@@ -233,10 +233,10 @@ static HRESULT WINAPI IExtractIconA_fnExtract(IExtractIconA * iface, LPCSTR pszF
FIXME
(
"(%p) (file=%p index=%u %p %p size=%u) semi-stub
\n
"
,
This
,
pszFile
,
nIconIndex
,
phiconLarge
,
phiconSmall
,
nIconSize
);
if
(
phiconLarge
)
*
phiconLarge
=
p
ImageList_GetIcon
(
ShellBigIconList
,
nIconIndex
,
ILD_TRANSPARENT
);
*
phiconLarge
=
ImageList_GetIcon
(
ShellBigIconList
,
nIconIndex
,
ILD_TRANSPARENT
);
if
(
phiconSmall
)
*
phiconSmall
=
p
ImageList_GetIcon
(
ShellSmallIconList
,
nIconIndex
,
ILD_TRANSPARENT
);
*
phiconSmall
=
ImageList_GetIcon
(
ShellSmallIconList
,
nIconIndex
,
ILD_TRANSPARENT
);
return
S_OK
;
}
...
...
dlls/shell32/iconcache.c
View file @
556d8b5e
...
...
@@ -82,8 +82,8 @@ static INT SIC_IconAppend (LPCSTR sSourceFile, INT dwSourceIndex, HICON hSmallIc
}
else
{
index
=
p
ImageList_AddIcon
(
ShellSmallIconList
,
hSmallIcon
);
index1
=
p
ImageList_AddIcon
(
ShellBigIconList
,
hBigIcon
);
index
=
ImageList_AddIcon
(
ShellSmallIconList
,
hSmallIcon
);
index1
=
ImageList_AddIcon
(
ShellBigIconList
,
hBigIcon
);
if
(
index
!=
index1
)
{
...
...
@@ -175,8 +175,8 @@ static HICON WINE_UNUSED SIC_GetIcon (LPCSTR sSourceFile, INT dwSourceIndex, BOO
}
if
(
bSmallIcon
)
return
p
ImageList_GetIcon
(
ShellSmallIconList
,
index
,
ILD_NORMAL
);
return
p
ImageList_GetIcon
(
ShellBigIconList
,
index
,
ILD_NORMAL
);
return
ImageList_GetIcon
(
ShellSmallIconList
,
index
,
ILD_NORMAL
);
return
ImageList_GetIcon
(
ShellBigIconList
,
index
,
ILD_NORMAL
);
}
/*****************************************************************************
...
...
@@ -203,11 +203,11 @@ BOOL SIC_Initialize(void)
return
(
FALSE
);
}
ShellSmallIconList
=
p
ImageList_Create
(
16
,
16
,
ILC_COLORDDB
|
ILC_MASK
,
0
,
0x20
);
ShellBigIconList
=
p
ImageList_Create
(
32
,
32
,
ILC_COLORDDB
|
ILC_MASK
,
0
,
0x20
);
ShellSmallIconList
=
ImageList_Create
(
16
,
16
,
ILC_COLORDDB
|
ILC_MASK
,
0
,
0x20
);
ShellBigIconList
=
ImageList_Create
(
32
,
32
,
ILC_COLORDDB
|
ILC_MASK
,
0
,
0x20
);
p
ImageList_SetBkColor
(
ShellSmallIconList
,
GetSysColor
(
COLOR_WINDOW
));
p
ImageList_SetBkColor
(
ShellBigIconList
,
GetSysColor
(
COLOR_WINDOW
));
ImageList_SetBkColor
(
ShellSmallIconList
,
GetSysColor
(
COLOR_WINDOW
));
ImageList_SetBkColor
(
ShellBigIconList
,
GetSysColor
(
COLOR_WINDOW
));
for
(
index
=
1
;
index
<
39
;
index
++
)
{
...
...
dlls/shell32/shell32_main.c
View file @
556d8b5e
...
...
@@ -305,7 +305,7 @@ DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes,
/* icon handle */
if
(
SUCCEEDED
(
hr
)
&&
(
flags
&
SHGFI_ICON
))
psfi
->
hIcon
=
p
ImageList_GetIcon
((
flags
&
SHGFI_LARGEICON
)
?
ShellBigIconList
:
ShellSmallIconList
,
psfi
->
iIcon
,
ILD_NORMAL
);
psfi
->
hIcon
=
ImageList_GetIcon
((
flags
&
SHGFI_LARGEICON
)
?
ShellBigIconList
:
ShellSmallIconList
,
psfi
->
iIcon
,
ILD_NORMAL
);
if
(
flags
&
(
SHGFI_UNKNOWN1
|
SHGFI_UNKNOWN2
|
SHGFI_UNKNOWN3
))
FIXME
(
"unknown attribute!
\n
"
);
...
...
@@ -836,13 +836,6 @@ HRESULT WINAPI SHELL32_DllGetVersion (DLLVERSIONINFO *pdvi)
*
*/
void
(
WINAPI
*
pDLLInitComctl
)(
LPVOID
);
INT
(
WINAPI
*
pImageList_AddIcon
)
(
HIMAGELIST
himl
,
HICON
hIcon
);
INT
(
WINAPI
*
pImageList_ReplaceIcon
)
(
HIMAGELIST
,
INT
,
HICON
);
HIMAGELIST
(
WINAPI
*
pImageList_Create
)
(
INT
,
INT
,
UINT
,
INT
,
INT
);
BOOL
(
WINAPI
*
pImageList_Draw
)
(
HIMAGELIST
himl
,
int
i
,
HDC
hdcDest
,
int
x
,
int
y
,
UINT
fStyle
);
HICON
(
WINAPI
*
pImageList_GetIcon
)
(
HIMAGELIST
,
INT
,
UINT
);
INT
(
WINAPI
*
pImageList_GetImageCount
)(
HIMAGELIST
);
COLORREF
(
WINAPI
*
pImageList_SetBkColor
)(
HIMAGELIST
,
COLORREF
);
LPVOID
(
WINAPI
*
pCOMCTL32_Alloc
)
(
INT
);
BOOL
(
WINAPI
*
pCOMCTL32_Free
)
(
LPVOID
);
...
...
@@ -855,16 +848,10 @@ BOOL (WINAPI* pDPA_Destroy) (const HDPA);
INT
(
WINAPI
*
pDPA_Search
)
(
const
HDPA
,
LPVOID
,
INT
,
PFNDPACOMPARE
,
LPARAM
,
UINT
);
LPVOID
(
WINAPI
*
pDPA_DeletePtr
)
(
const
HDPA
hdpa
,
INT
i
);
/* user32 */
HICON
(
WINAPI
*
pLookupIconIdFromDirectoryEx
)(
LPBYTE
dir
,
BOOL
bIcon
,
INT
width
,
INT
height
,
UINT
cFlag
);
HICON
(
WINAPI
*
pCreateIconFromResourceEx
)(
LPBYTE
bits
,
UINT
cbSize
,
BOOL
bIcon
,
DWORD
dwVersion
,
INT
width
,
INT
height
,
UINT
cFlag
);
static
HINSTANCE
hComctl32
;
static
INT
shell32_RefCount
=
0
;
LONG
shell32_ObjCount
=
0
;
HINSTANCE
shell32_hInstance
=
0
;
HMODULE
huser32
=
0
;
HIMAGELIST
ShellSmallIconList
=
0
;
HIMAGELIST
ShellBigIconList
=
0
;
...
...
@@ -883,15 +870,11 @@ BOOL WINAPI Shell32LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
switch
(
fdwReason
)
{
case
DLL_PROCESS_ATTACH
:
shell32_RefCount
++
;
if
(
shell32_hInstance
)
return
TRUE
;
shell32_hInstance
=
hinstDLL
;
hComctl32
=
GetModuleHandleA
(
"COMCTL32.DLL"
);
if
(
!
huser32
)
huser32
=
GetModuleHandleA
(
"USER32.DLL"
);
DisableThreadLibraryCalls
(
shell32_hInstance
);
if
(
!
hComctl32
||
!
huser32
)
if
(
!
hComctl32
)
{
ERR
(
"P A N I C SHELL32 loading failed
\n
"
);
return
FALSE
;
...
...
@@ -899,13 +882,6 @@ BOOL WINAPI Shell32LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
/* comctl32 */
pDLLInitComctl
=
(
void
*
)
GetProcAddress
(
hComctl32
,
"InitCommonControlsEx"
);
pImageList_Create
=
(
void
*
)
GetProcAddress
(
hComctl32
,
"ImageList_Create"
);
pImageList_AddIcon
=
(
void
*
)
GetProcAddress
(
hComctl32
,
"ImageList_AddIcon"
);
pImageList_ReplaceIcon
=
(
void
*
)
GetProcAddress
(
hComctl32
,
"ImageList_ReplaceIcon"
);
pImageList_GetIcon
=
(
void
*
)
GetProcAddress
(
hComctl32
,
"ImageList_GetIcon"
);
pImageList_GetImageCount
=
(
void
*
)
GetProcAddress
(
hComctl32
,
"ImageList_GetImageCount"
);
pImageList_Draw
=
(
void
*
)
GetProcAddress
(
hComctl32
,
"ImageList_Draw"
);
pImageList_SetBkColor
=
(
void
*
)
GetProcAddress
(
hComctl32
,
"ImageList_SetBkColor"
);
pCOMCTL32_Alloc
=
(
void
*
)
GetProcAddress
(
hComctl32
,
(
LPCSTR
)
71L
);
pCOMCTL32_Free
=
(
void
*
)
GetProcAddress
(
hComctl32
,
(
LPCSTR
)
73L
);
pDPA_Create
=
(
void
*
)
GetProcAddress
(
hComctl32
,
(
LPCSTR
)
328L
);
...
...
@@ -915,9 +891,6 @@ BOOL WINAPI Shell32LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
pDPA_DeletePtr
=
(
void
*
)
GetProcAddress
(
hComctl32
,
(
LPCSTR
)
336L
);
pDPA_Sort
=
(
void
*
)
GetProcAddress
(
hComctl32
,
(
LPCSTR
)
338L
);
pDPA_Search
=
(
void
*
)
GetProcAddress
(
hComctl32
,
(
LPCSTR
)
339L
);
/* user32 */
pLookupIconIdFromDirectoryEx
=
(
void
*
)
GetProcAddress
(
huser32
,
"LookupIconIdFromDirectoryEx"
);
pCreateIconFromResourceEx
=
(
void
*
)
GetProcAddress
(
huser32
,
"CreateIconFromResourceEx"
);
/* initialize the common controls */
if
(
pDLLInitComctl
)
...
...
@@ -932,18 +905,12 @@ BOOL WINAPI Shell32LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
break
;
case
DLL_THREAD_ATTACH
:
shell32_RefCount
++
;
break
;
case
DLL_THREAD_DETACH
:
shell32_RefCount
--
;
break
;
case
DLL_PROCESS_DETACH
:
shell32_RefCount
--
;
if
(
!
shell32_RefCount
)
{
shell32_hInstance
=
0
;
if
(
pdesktopfolder
)
...
...
@@ -960,10 +927,7 @@ BOOL WINAPI Shell32LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
{
WARN
(
"leaving with %lu objects left (memory leak)
\n
"
,
shell32_ObjCount
);
}
}
TRACE
(
"refcount=%u objcount=%lu
\n
"
,
shell32_RefCount
,
shell32_ObjCount
);
break
;
break
;
}
return
TRUE
;
}
...
...
dlls/shell32/shell32_main.h
View file @
556d8b5e
...
...
@@ -30,13 +30,6 @@ extern HDPA sic_hdpa;
* pointer to functions dynamically loaded
*/
extern
void
(
WINAPI
*
pDLLInitComctl
)(
LPVOID
);
extern
INT
(
WINAPI
*
pImageList_AddIcon
)
(
HIMAGELIST
himl
,
HICON
hIcon
);
extern
INT
(
WINAPI
*
pImageList_ReplaceIcon
)
(
HIMAGELIST
,
INT
,
HICON
);
extern
HIMAGELIST
(
WINAPI
*
pImageList_Create
)
(
INT
,
INT
,
UINT
,
INT
,
INT
);
extern
BOOL
(
WINAPI
*
pImageList_Draw
)
(
HIMAGELIST
himl
,
int
i
,
HDC
hdcDest
,
int
x
,
int
y
,
UINT
fStyle
);
extern
HICON
(
WINAPI
*
pImageList_GetIcon
)
(
HIMAGELIST
,
INT
,
UINT
);
extern
INT
(
WINAPI
*
pImageList_GetImageCount
)(
HIMAGELIST
);
extern
COLORREF
(
WINAPI
*
pImageList_SetBkColor
)(
HIMAGELIST
,
COLORREF
);
extern
LPVOID
(
WINAPI
*
pCOMCTL32_Alloc
)
(
INT
);
extern
BOOL
(
WINAPI
*
pCOMCTL32_Free
)
(
LPVOID
);
...
...
@@ -50,9 +43,6 @@ extern INT (WINAPI* pDPA_Search) (const HDPA, LPVOID, INT, PFNDPACOMPARE, LPARAM
extern
LPVOID
(
WINAPI
*
pDPA_DeletePtr
)
(
const
HDPA
hdpa
,
INT
i
);
#define pDPA_GetPtrCount(hdpa) (*(INT*)(hdpa))
extern
HICON
(
WINAPI
*
pLookupIconIdFromDirectoryEx
)(
LPBYTE
dir
,
BOOL
bIcon
,
INT
width
,
INT
height
,
UINT
cFlag
);
extern
HICON
(
WINAPI
*
pCreateIconFromResourceEx
)(
LPBYTE
bits
,
UINT
cbSize
,
BOOL
bIcon
,
DWORD
dwVersion
,
INT
width
,
INT
height
,
UINT
cFlag
);
/* ole2 */
/*
extern HRESULT (WINAPI* pOleInitialize)(LPVOID reserved);
...
...
dlls/shell32/shlmenu.c
View file @
556d8b5e
...
...
@@ -601,7 +601,7 @@ LRESULT WINAPI FileMenu_DrawItem(
ExtTextOutA
(
lpdis
->
hDC
,
xt
,
yt
,
ETO_OPAQUE
,
&
TextRect
,
pMyItem
->
szItemText
,
pMyItem
->
cchItemText
,
NULL
);
Shell_GetImageList
(
0
,
&
hImageList
);
p
ImageList_Draw
(
hImageList
,
pMyItem
->
iIconIndex
,
lpdis
->
hDC
,
xi
,
yi
,
ILD_NORMAL
);
ImageList_Draw
(
hImageList
,
pMyItem
->
iIconIndex
,
lpdis
->
hDC
,
xi
,
yi
,
ILD_NORMAL
);
TRACE
(
"-- 0x%04x 0x%04x 0x%04x 0x%04x
\n
"
,
TextRect
.
left
,
TextRect
.
top
,
TextRect
.
right
,
TextRect
.
bottom
);
...
...
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