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
fb2eca81
Commit
fb2eca81
authored
Jul 29, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import comctl32 functions from shell32 by ordinal.
Removed some unnecessary ordinals in comctl32.spec.
parent
d97432ac
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
50 additions
and
82 deletions
+50
-82
comctl32.spec
dlls/comctl32/comctl32.spec
+0
-0
iconcache.c
dlls/shell32/iconcache.c
+9
-9
pidl.c
dlls/shell32/pidl.c
+5
-2
shell32_main.c
dlls/shell32/shell32_main.c
+0
-22
shell32_main.h
dlls/shell32/shell32_main.h
+0
-18
shellord.c
dlls/shell32/shellord.c
+31
-26
shlview.c
dlls/shell32/shlview.c
+5
-5
No files found.
dlls/comctl32/comctl32.spec
View file @
fb2eca81
This diff is collapsed.
Click to expand it.
dlls/shell32/iconcache.c
View file @
fb2eca81
...
...
@@ -95,7 +95,7 @@ static INT SIC_IconAppend (LPCSTR sSourceFile, INT dwSourceIndex, HICON hSmallIc
EnterCriticalSection
(
&
SHELL32_SicCS
);
index
=
p
DPA_InsertPtr
(
sic_hdpa
,
0x7fff
,
lpsice
);
index
=
DPA_InsertPtr
(
sic_hdpa
,
0x7fff
,
lpsice
);
if
(
INVALID_INDEX
==
index
)
{
SHFree
(
lpsice
);
...
...
@@ -159,10 +159,10 @@ INT SIC_GetIconIndex (LPCSTR sSourceFile, INT dwSourceIndex )
EnterCriticalSection
(
&
SHELL32_SicCS
);
if
(
NULL
!=
p
DPA_GetPtr
(
sic_hdpa
,
0
))
if
(
NULL
!=
DPA_GetPtr
(
sic_hdpa
,
0
))
{
/* search linear from position 0*/
index
=
p
DPA_Search
(
sic_hdpa
,
&
sice
,
0
,
SIC_CompareEntries
,
0
,
0
);
index
=
DPA_Search
(
sic_hdpa
,
&
sice
,
0
,
SIC_CompareEntries
,
0
,
0
);
}
if
(
INVALID_INDEX
==
index
)
...
...
@@ -172,7 +172,7 @@ INT SIC_GetIconIndex (LPCSTR sSourceFile, INT dwSourceIndex )
else
{
TRACE
(
"-- found
\n
"
);
ret
=
((
LPSIC_ENTRY
)
p
DPA_GetPtr
(
sic_hdpa
,
index
))
->
dwListIndex
;
ret
=
((
LPSIC_ENTRY
)
DPA_GetPtr
(
sic_hdpa
,
index
))
->
dwListIndex
;
}
LeaveCriticalSection
(
&
SHELL32_SicCS
);
...
...
@@ -218,7 +218,7 @@ BOOL SIC_Initialize(void)
if
(
sic_hdpa
)
/* already initialized?*/
return
TRUE
;
sic_hdpa
=
p
DPA_Create
(
16
);
sic_hdpa
=
DPA_Create
(
16
);
if
(
!
sic_hdpa
)
{
...
...
@@ -262,14 +262,14 @@ void SIC_Destroy(void)
EnterCriticalSection
(
&
SHELL32_SicCS
);
if
(
sic_hdpa
&&
NULL
!=
p
DPA_GetPtr
(
sic_hdpa
,
0
))
if
(
sic_hdpa
&&
NULL
!=
DPA_GetPtr
(
sic_hdpa
,
0
))
{
for
(
i
=
0
;
i
<
p
DPA_GetPtrCount
(
sic_hdpa
);
++
i
)
for
(
i
=
0
;
i
<
DPA_GetPtrCount
(
sic_hdpa
);
++
i
)
{
lpsice
=
p
DPA_GetPtr
(
sic_hdpa
,
i
);
lpsice
=
DPA_GetPtr
(
sic_hdpa
,
i
);
SHFree
(
lpsice
);
}
p
DPA_Destroy
(
sic_hdpa
);
DPA_Destroy
(
sic_hdpa
);
}
sic_hdpa
=
NULL
;
...
...
dlls/shell32/pidl.c
View file @
fb2eca81
...
...
@@ -42,6 +42,9 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
pidl
);
WINE_DECLARE_DEBUG_CHANNEL
(
shell
);
/* from comctl32.dll */
extern
LPVOID
WINAPI
Alloc
(
INT
);
extern
BOOL
WINAPI
Free
(
LPVOID
);
/*************************************************************************
* ILGetDisplayName [SHELL32.15]
...
...
@@ -297,7 +300,7 @@ LPITEMIDLIST WINAPI ILGlobalClone(LPCITEMIDLIST pidl)
return
NULL
;
len
=
ILGetSize
(
pidl
);
newpidl
=
(
LPITEMIDLIST
)
pCOMCTL32_
Alloc
(
len
);
newpidl
=
(
LPITEMIDLIST
)
Alloc
(
len
);
if
(
newpidl
)
memcpy
(
newpidl
,
pidl
,
len
);
...
...
@@ -640,7 +643,7 @@ void WINAPI ILGlobalFree( LPCITEMIDLIST pidl)
TRACE
(
"%p
\n
"
,
pidl
);
if
(
!
pidl
)
return
;
pCOMCTL32_
Free
(
pidl
);
Free
(
pidl
);
}
/*************************************************************************
* ILCreateFromPath [SHELL32.157]
...
...
dlls/shell32/shell32_main.c
View file @
fb2eca81
...
...
@@ -908,13 +908,6 @@ void (WINAPI *pDLLInitComctl)(LPVOID);
LPVOID
(
WINAPI
*
pCOMCTL32_Alloc
)
(
INT
);
BOOL
(
WINAPI
*
pCOMCTL32_Free
)
(
LPVOID
);
HDPA
(
WINAPI
*
pDPA_Create
)
(
INT
);
INT
(
WINAPI
*
pDPA_InsertPtr
)
(
const
HDPA
,
INT
,
LPVOID
);
BOOL
(
WINAPI
*
pDPA_Sort
)
(
const
HDPA
,
PFNDPACOMPARE
,
LPARAM
);
LPVOID
(
WINAPI
*
pDPA_GetPtr
)
(
const
HDPA
,
INT
);
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
);
HANDLE
(
WINAPI
*
pCreateMRUListA
)
(
LPVOID
lpcml
);
DWORD
(
WINAPI
*
pFreeMRUListA
)
(
HANDLE
hMRUList
);
INT
(
WINAPI
*
pAddMRUData
)
(
HANDLE
hList
,
LPCVOID
lpData
,
DWORD
cbData
);
...
...
@@ -954,21 +947,6 @@ BOOL WINAPI Shell32LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
/* comctl32 */
pDLLInitComctl
=
(
void
*
)
GetProcAddress
(
hComctl32
,
"InitCommonControlsEx"
);
pCOMCTL32_Alloc
=
(
void
*
)
GetProcAddress
(
hComctl32
,
(
LPCSTR
)
71L
);
pCOMCTL32_Free
=
(
void
*
)
GetProcAddress
(
hComctl32
,
(
LPCSTR
)
73L
);
pDPA_Create
=
(
void
*
)
GetProcAddress
(
hComctl32
,
(
LPCSTR
)
328L
);
pDPA_Destroy
=
(
void
*
)
GetProcAddress
(
hComctl32
,
(
LPCSTR
)
329L
);
pDPA_GetPtr
=
(
void
*
)
GetProcAddress
(
hComctl32
,
(
LPCSTR
)
332L
);
pDPA_InsertPtr
=
(
void
*
)
GetProcAddress
(
hComctl32
,
(
LPCSTR
)
334L
);
pDPA_DeletePtr
=
(
void
*
)
GetProcAddress
(
hComctl32
,
(
LPCSTR
)
336L
);
pDPA_Sort
=
(
void
*
)
GetProcAddress
(
hComctl32
,
(
LPCSTR
)
338L
);
pDPA_Search
=
(
void
*
)
GetProcAddress
(
hComctl32
,
(
LPCSTR
)
339L
);
pCreateMRUListA
=
(
void
*
)
GetProcAddress
(
hComctl32
,
(
LPCSTR
)
151L
/*"CreateMRUListA"*/
);
pFreeMRUListA
=
(
void
*
)
GetProcAddress
(
hComctl32
,
(
LPCSTR
)
152L
/*"FreeMRUList"*/
);
pAddMRUData
=
(
void
*
)
GetProcAddress
(
hComctl32
,
(
LPCSTR
)
167L
/*"AddMRUData"*/
);
pFindMRUData
=
(
void
*
)
GetProcAddress
(
hComctl32
,
(
LPCSTR
)
169L
/*"FindMRUData"*/
);
pEnumMRUListA
=
(
void
*
)
GetProcAddress
(
hComctl32
,
(
LPCSTR
)
154L
/*"EnumMRUListA"*/
);
/* initialize the common controls */
if
(
pDLLInitComctl
)
{
...
...
dlls/shell32/shell32_main.h
View file @
fb2eca81
...
...
@@ -47,24 +47,6 @@ extern HDPA sic_hdpa;
*/
extern
void
(
WINAPI
*
pDLLInitComctl
)(
LPVOID
);
extern
LPVOID
(
WINAPI
*
pCOMCTL32_Alloc
)
(
INT
);
extern
BOOL
(
WINAPI
*
pCOMCTL32_Free
)
(
LPVOID
);
extern
HDPA
(
WINAPI
*
pDPA_Create
)
(
INT
);
extern
INT
(
WINAPI
*
pDPA_InsertPtr
)
(
const
HDPA
,
INT
,
LPVOID
);
extern
BOOL
(
WINAPI
*
pDPA_Sort
)
(
const
HDPA
,
PFNDPACOMPARE
,
LPARAM
);
extern
LPVOID
(
WINAPI
*
pDPA_GetPtr
)
(
const
HDPA
,
INT
);
extern
BOOL
(
WINAPI
*
pDPA_Destroy
)
(
const
HDPA
);
extern
INT
(
WINAPI
*
pDPA_Search
)
(
const
HDPA
,
LPVOID
,
INT
,
PFNDPACOMPARE
,
LPARAM
,
UINT
);
extern
LPVOID
(
WINAPI
*
pDPA_DeletePtr
)
(
const
HDPA
hdpa
,
INT
i
);
extern
HANDLE
(
WINAPI
*
pCreateMRUListA
)
(
LPVOID
lpcml
);
extern
DWORD
(
WINAPI
*
pFreeMRUListA
)
(
HANDLE
hMRUList
);
extern
INT
(
WINAPI
*
pAddMRUData
)
(
HANDLE
hList
,
LPCVOID
lpData
,
DWORD
cbData
);
extern
INT
(
WINAPI
*
pFindMRUData
)
(
HANDLE
hList
,
LPCVOID
lpData
,
DWORD
cbData
,
LPINT
lpRegNum
);
extern
INT
(
WINAPI
*
pEnumMRUListA
)
(
HANDLE
hList
,
INT
nItemPos
,
LPVOID
lpBuffer
,
DWORD
nBufferSize
);
#define pDPA_GetPtrCount(hdpa) (*(INT*)(hdpa))
BOOL
WINAPI
Shell_GetImageList
(
HIMAGELIST
*
lpBigList
,
HIMAGELIST
*
lpSmallList
);
/* Iconcache */
...
...
dlls/shell32/shellord.c
View file @
fb2eca81
...
...
@@ -40,6 +40,29 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
shell
);
WINE_DECLARE_DEBUG_CHANNEL
(
pidl
);
/* FIXME: !!! move CREATEMRULIST and flags to header file !!! */
/* !!! it is in both here and comctl32undoc.c !!! */
typedef
struct
tagCREATEMRULIST
{
DWORD
cbSize
;
/* size of struct */
DWORD
nMaxItems
;
/* max no. of items in list */
DWORD
dwFlags
;
/* see below */
HKEY
hKey
;
/* root reg. key under which list is saved */
LPCSTR
lpszSubKey
;
/* reg. subkey */
PROC
lpfnCompare
;
/* item compare proc */
}
CREATEMRULISTA
,
*
LPCREATEMRULISTA
;
/* dwFlags */
#define MRUF_STRING_LIST 0
/* list will contain strings */
#define MRUF_BINARY_LIST 1
/* list will contain binary data */
#define MRUF_DELAYED_SAVE 2
/* only save list order to reg. is FreeMRUList */
extern
HANDLE
WINAPI
CreateMRUListA
(
LPCREATEMRULISTA
lpcml
);
extern
DWORD
WINAPI
FreeMRUList
(
HANDLE
hMRUList
);
extern
INT
WINAPI
AddMRUData
(
HANDLE
hList
,
LPCVOID
lpData
,
DWORD
cbData
);
extern
INT
WINAPI
FindMRUData
(
HANDLE
hList
,
LPCVOID
lpData
,
DWORD
cbData
,
LPINT
lpRegNum
);
extern
INT
WINAPI
EnumMRUListA
(
HANDLE
hList
,
INT
nItemPos
,
LPVOID
lpBuffer
,
DWORD
nBufferSize
);
/*************************************************************************
* ParseFieldA [internal]
*
...
...
@@ -526,7 +549,7 @@ static INT SHADD_create_add_mru_data(HANDLE mruhandle, LPSTR doc_name, LPSTR new
/* Add the new entry into the MRU list
*/
return
p
AddMRUData
(
mruhandle
,
(
LPCVOID
)
buffer
,
*
len
);
return
AddMRUData
(
mruhandle
,
(
LPCVOID
)
buffer
,
*
len
);
}
/*************************************************************************
...
...
@@ -543,24 +566,6 @@ static INT SHADD_create_add_mru_data(HANDLE mruhandle, LPSTR doc_name, LPSTR new
*/
DWORD
WINAPI
SHAddToRecentDocs
(
UINT
uFlags
,
LPCVOID
pv
)
{
/* FIXME: !!! move CREATEMRULIST and flags to header file !!! */
/* !!! it is in both here and comctl32undoc.c !!! */
typedef
struct
tagCREATEMRULIST
{
DWORD
cbSize
;
/* size of struct */
DWORD
nMaxItems
;
/* max no. of items in list */
DWORD
dwFlags
;
/* see below */
HKEY
hKey
;
/* root reg. key under which list is saved */
LPCSTR
lpszSubKey
;
/* reg. subkey */
PROC
lpfnCompare
;
/* item compare proc */
}
CREATEMRULIST
,
*
LPCREATEMRULIST
;
/* dwFlags */
#define MRUF_STRING_LIST 0
/* list will contain strings */
#define MRUF_BINARY_LIST 1
/* list will contain binary data */
#define MRUF_DELAYED_SAVE 2
/* only save list order to reg. is FreeMRUList */
/* If list is a string list lpfnCompare has the following prototype
* int CALLBACK MRUCompareString(LPCSTR s1, LPCSTR s2)
* for binary lists the prototype is
...
...
@@ -709,7 +714,7 @@ typedef struct tagCREATEMRULIST
* new_lnk_filepath
* - path and file name of new .lnk file
*/
CREATEMRULIST
mymru
;
CREATEMRULIST
A
mymru
;
HANDLE
mruhandle
;
INT
len
,
pos
,
bufused
,
err
;
INT
i
;
...
...
@@ -719,13 +724,13 @@ typedef struct tagCREATEMRULIST
CHAR
old_lnk_name
[
MAX_PATH
];
short
int
slen
;
mymru
.
cbSize
=
sizeof
(
CREATEMRULIST
);
mymru
.
cbSize
=
sizeof
(
CREATEMRULIST
A
);
mymru
.
nMaxItems
=
15
;
mymru
.
dwFlags
=
MRUF_BINARY_LIST
|
MRUF_DELAYED_SAVE
;
mymru
.
hKey
=
HCUbasekey
;
mymru
.
lpszSubKey
=
"RecentDocs"
;
mymru
.
lpfnCompare
=
&
SHADD_compare_mru
;
mruhandle
=
p
CreateMRUListA
(
&
mymru
);
mruhandle
=
CreateMRUListA
(
&
mymru
);
if
(
!
mruhandle
)
{
/* MRU failed */
ERR
(
"MRU processing failed, handle zero
\n
"
);
...
...
@@ -733,13 +738,13 @@ typedef struct tagCREATEMRULIST
return
0
;
}
len
=
lstrlenA
(
doc_name
);
pos
=
p
FindMRUData
(
mruhandle
,
doc_name
,
len
,
0
);
pos
=
FindMRUData
(
mruhandle
,
doc_name
,
len
,
0
);
/* Now get the MRU entry that will be replaced
* and delete the .lnk file for it
*/
if
((
bufused
=
p
EnumMRUListA
(
mruhandle
,
(
pos
==
-
1
)
?
14
:
pos
,
buffer
,
2048
))
!=
-
1
)
{
if
((
bufused
=
EnumMRUListA
(
mruhandle
,
(
pos
==
-
1
)
?
14
:
pos
,
buffer
,
2048
))
!=
-
1
)
{
ptr
=
buffer
;
ptr
+=
(
lstrlenA
(
buffer
)
+
1
);
slen
=
*
((
short
int
*
)
ptr
);
...
...
@@ -795,7 +800,7 @@ typedef struct tagCREATEMRULIST
*/
pos
=
SHADD_create_add_mru_data
(
mruhandle
,
doc_name
,
new_lnk_name
,
buffer
,
&
len
);
pFreeMRUListA
(
mruhandle
);
FreeMRUList
(
mruhandle
);
TRACE
(
"Updated MRU list, new doc is position %d
\n
"
,
pos
);
}
...
...
dlls/shell32/shlview.c
View file @
fb2eca81
...
...
@@ -577,7 +577,7 @@ static HRESULT ShellView_FillList(IShellViewImpl * This)
}
/* create a pointer array */
hdpa
=
p
DPA_Create
(
16
);
hdpa
=
DPA_Create
(
16
);
if
(
!
hdpa
)
{
return
(
E_OUTOFMEMORY
);
...
...
@@ -586,21 +586,21 @@ static HRESULT ShellView_FillList(IShellViewImpl * This)
/* copy the items into the array*/
while
((
S_OK
==
IEnumIDList_Next
(
pEnumIDList
,
1
,
&
pidl
,
&
dwFetched
))
&&
dwFetched
)
{
if
(
p
DPA_InsertPtr
(
hdpa
,
0x7fff
,
pidl
)
==
-
1
)
if
(
DPA_InsertPtr
(
hdpa
,
0x7fff
,
pidl
)
==
-
1
)
{
SHFree
(
pidl
);
}
}
/* sort the array */
p
DPA_Sort
(
hdpa
,
ShellView_CompareItems
,
(
LPARAM
)
This
->
pSFParent
);
DPA_Sort
(
hdpa
,
ShellView_CompareItems
,
(
LPARAM
)
This
->
pSFParent
);
/*turn the listview's redrawing off*/
SendMessageA
(
This
->
hWndList
,
WM_SETREDRAW
,
FALSE
,
0
);
for
(
i
=
0
;
i
<
DPA_GetPtrCount
(
hdpa
);
++
i
)
/* DPA_GetPtrCount is a macro*/
{
pidl
=
(
LPITEMIDLIST
)
p
DPA_GetPtr
(
hdpa
,
i
);
pidl
=
(
LPITEMIDLIST
)
DPA_GetPtr
(
hdpa
,
i
);
/* in a commdlg This works as a filemask*/
if
(
IncludeObject
(
This
,
pidl
)
==
S_OK
)
...
...
@@ -612,7 +612,7 @@ static HRESULT ShellView_FillList(IShellViewImpl * This)
SendMessageA
(
This
->
hWndList
,
WM_SETREDRAW
,
TRUE
,
0
);
IEnumIDList_Release
(
pEnumIDList
);
/* destroy the list*/
p
DPA_Destroy
(
hdpa
);
DPA_Destroy
(
hdpa
);
return
S_OK
;
}
...
...
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