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
c17ddc86
Commit
c17ddc86
authored
Apr 28, 2000
by
Juergen Schmied
Committed by
Alexandre Julliard
Apr 28, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes.
Use GetModuleHandleA instead of LoadLibrary for dlls imported by the spec file.
parent
3853f0f0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
32 deletions
+33
-32
shell32_main.c
dlls/shell32/shell32_main.c
+31
-24
shell32_main.h
dlls/shell32/shell32_main.h
+2
-8
No files found.
dlls/shell32/shell32_main.c
View file @
c17ddc86
...
...
@@ -24,11 +24,11 @@
#include "shellapi.h"
#include "pidl.h"
#include "shlobj.h"
#include "shell32_main.h"
#include "shlguid.h"
#include "wine/undocshell.h"
#include "shpolicy.h"
#include "shlobj.h"
#include "shlguid.h"
#include "shlwapi.h"
DEFAULT_DEBUG_CHANNEL
(
shell
);
...
...
@@ -97,7 +97,7 @@ void WINAPI Control_RunDLL( HWND hwnd, LPCVOID code, LPCSTR cmd, DWORD arg4 )
}
/*************************************************************************
* SHGetFileInfoA [SHELL32.
254
]
* SHGetFileInfoA [SHELL32.
@
]
*/
DWORD
WINAPI
SHGetFileInfoA
(
LPCSTR
path
,
DWORD
dwFileAttributes
,
...
...
@@ -109,15 +109,12 @@ DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes,
DWORD
ret
=
TRUE
,
dwAttributes
=
0
;
IShellFolder
*
psfParent
=
NULL
;
IExtractIconA
*
pei
=
NULL
;
LPITEMIDLIST
pidlLast
,
pidl
=
NULL
;
LPITEMIDLIST
pidlLast
=
NULL
,
pidl
=
NULL
;
HRESULT
hr
=
S_OK
;
TRACE
(
"(%s
,0x%lx,%p,0x%x,
0x%x)
\n
"
,
(
flags
&
SHGFI_PIDL
)
?
"pidl"
:
path
,
dwFileAttributes
,
psfi
,
sizeofpsfi
,
flags
);
TRACE
(
"(%s
fattr=0x%lx sfi=%p(attr=0x%08lx) size=0x%x flags=
0x%x)
\n
"
,
(
flags
&
SHGFI_PIDL
)
?
"pidl"
:
path
,
dwFileAttributes
,
psfi
,
psfi
->
dwAttributes
,
sizeofpsfi
,
flags
);
#ifdef MORE_DEBUG
ZeroMemory
(
psfi
,
sizeof
(
SHFILEINFOA
));
#endif
if
((
flags
&
SHGFI_USEFILEATTRIBUTES
)
&&
(
flags
&
(
SHGFI_ATTRIBUTES
|
SHGFI_EXETYPE
|
SHGFI_PIDL
)))
return
FALSE
;
...
...
@@ -159,7 +156,7 @@ DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes,
{
if
(
flags
&
SHGFI_USEFILEATTRIBUTES
)
{
strcpy
(
psfi
->
szDisplayName
,
PathFindFile
n
ameA
(
path
));
strcpy
(
psfi
->
szDisplayName
,
PathFindFile
N
ameA
(
path
));
}
else
{
...
...
@@ -264,6 +261,7 @@ DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes,
if
(
hr
!=
S_OK
)
ret
=
FALSE
;
if
(
pidlLast
)
SHFree
(
pidlLast
);
#ifdef MORE_DEBUG
TRACE
(
"icon=0x%08x index=0x%08x attr=0x%08lx name=%s type=%s ret=0x%08lx
\n
"
,
psfi
->
hIcon
,
psfi
->
iIcon
,
psfi
->
dwAttributes
,
psfi
->
szDisplayName
,
psfi
->
szTypeName
,
ret
);
...
...
@@ -272,7 +270,7 @@ DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes,
}
/*************************************************************************
* SHGetFileInfoW [SHELL32.
255
]
* SHGetFileInfoW [SHELL32.
@
]
*/
DWORD
WINAPI
SHGetFileInfoW
(
LPCWSTR
path
,
DWORD
dwFileAttributes
,
...
...
@@ -284,6 +282,21 @@ DWORD WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
}
/*************************************************************************
* SHGetFileInfoAW [SHELL32.@]
*/
DWORD
WINAPI
SHGetFileInfoAW
(
LPCVOID
path
,
DWORD
dwFileAttributes
,
LPVOID
psfi
,
UINT
sizeofpsfi
,
UINT
flags
)
{
if
(
VERSION_OsIsUnicode
())
return
SHGetFileInfoW
(
path
,
dwFileAttributes
,
psfi
,
sizeofpsfi
,
flags
);
return
SHGetFileInfoA
(
path
,
dwFileAttributes
,
psfi
,
sizeofpsfi
,
flags
);
}
/*************************************************************************
* ExtractIconA [SHELL32.133]
*/
HICON
WINAPI
ExtractIconA
(
HINSTANCE
hInstance
,
LPCSTR
lpszExeFileName
,
...
...
@@ -755,7 +768,7 @@ HICON (WINAPI *pCreateIconFromResourceEx)(LPBYTE bits,UINT cbSize, BOOL bIcon, D
static
HINSTANCE
hComctl32
;
static
INT
shell32_RefCount
=
0
;
INT
shell32_ObjCount
=
0
;
LONG
shell32_ObjCount
=
0
;
HINSTANCE
shell32_hInstance
;
HIMAGELIST
ShellSmallIconList
=
0
;
HIMAGELIST
ShellBigIconList
=
0
;
...
...
@@ -777,16 +790,12 @@ BOOL WINAPI Shell32LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
{
case
DLL_PROCESS_ATTACH
:
shell32_RefCount
++
;
if
(
shell32_hInstance
)
{
ERR
(
"shell32.dll instantiated twice in one address space!
\n
"
);
break
;
}
if
(
shell32_hInstance
)
return
TRUE
;
shell32_hInstance
=
hinstDLL
;
hComctl32
=
LoadLibraryA
(
"COMCTL32.DLL"
);
hComctl32
=
GetModuleHandleA
(
"COMCTL32.DLL"
);
hUser32
=
GetModuleHandleA
(
"USER32"
);
DisableThreadLibraryCalls
(
shell32_hInstance
);
if
(
!
hComctl32
||
!
hUser32
)
{
...
...
@@ -855,13 +864,11 @@ BOOL WINAPI Shell32LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
/* this one is here to check if AddRef/Release is balanced */
if
(
shell32_ObjCount
)
{
WARN
(
"leaving with %u objects left (memory leak)
\n
"
,
shell32_ObjCount
);
WARN
(
"leaving with %
l
u objects left (memory leak)
\n
"
,
shell32_ObjCount
);
}
}
FreeLibrary
(
hComctl32
);
TRACE
(
"refcount=%u objcount=%u
\n
"
,
shell32_RefCount
,
shell32_ObjCount
);
TRACE
(
"refcount=%u objcount=%lu
\n
"
,
shell32_RefCount
,
shell32_ObjCount
);
break
;
}
return
TRUE
;
...
...
dlls/shell32/shell32_main.h
View file @
c17ddc86
...
...
@@ -21,7 +21,7 @@
* global SHELL32.DLL variables
*/
extern
HINSTANCE
shell32_hInstance
;
extern
INT
shell32_ObjCount
;
extern
LONG
shell32_ObjCount
;
extern
HIMAGELIST
ShellSmallIconList
;
extern
HIMAGELIST
ShellBigIconList
;
extern
HDPA
sic_hdpa
;
...
...
@@ -82,11 +82,6 @@ BOOL HCR_GetFolderAttributes (REFIID riid, LPDWORD szDest);
DWORD
WINAPI
ParseFieldA
(
LPCSTR
src
,
DWORD
field
,
LPSTR
dst
,
DWORD
len
);
HGLOBAL
WINAPI
SHAllocShared
(
LPVOID
psrc
,
DWORD
size
,
DWORD
procID
);
LPVOID
WINAPI
SHLockShared
(
HANDLE
hmem
,
DWORD
procID
);
BOOL
WINAPI
SHUnlockShared
(
HANDLE
pmem
);
HANDLE
WINAPI
SHFreeShared
(
HANDLE
hmem
,
DWORD
procID
);
/****************************************************************************
* Class constructors
*/
...
...
@@ -114,7 +109,6 @@ HRESULT CreateStreamOnFile (LPCSTR pszFilename, IStream ** ppstm);
/* fixme: rename the functions when the shell32.dll has it's own exports namespace */
HRESULT
WINAPI
SHELL32_DllGetClassObject
(
REFCLSID
rclsid
,
REFIID
riid
,
LPVOID
*
ppv
);
HRESULT
WINAPI
SHELL32_DllCanUnloadNow
(
void
);
LRESULT
WINAPI
SHCoCreateInstance
(
LPSTR
,
REFCLSID
,
LPUNKNOWN
,
REFIID
,
LPVOID
*
);
/* fixme: move away */
#define ResultFromShort(i) MAKE_SCODE(SEVERITY_SUCCESS, 0, (USHORT)(i))
...
...
@@ -169,5 +163,5 @@ void InitChangeNotifications(void);
void
FreeChangeNotifications
(
void
);
/* file operation */
BOOL
SHELL_DeleteDirectoryA
(
LPCSTR
pszDir
);
BOOL
SHELL_DeleteDirectoryA
(
LPCSTR
pszDir
,
BOOL
bShowUI
);
#endif
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