Fixed some undocumented functions.

Changed algorithm in DPA_QuickSort().
Fixed heap creation/destruction and control [un]registration in
ComCtl32LibMain().
This commit is contained in:
Eric Kohl 1998-10-11 13:21:17 +00:00 committed by Alexandre Julliard
parent 54d9f79337
commit 17216d35a7
3 changed files with 425 additions and 169 deletions

View File

@ -23,21 +23,31 @@
#include "debug.h"
CRITICAL_SECTION cs_comctl_alloc;
HANDLE32 hComctl32Heap = 0;
extern HANDLE32 COMCTL32_hHeap; /* handle to the private heap */
/**************************************************************************
* COMCTL32_11 [COMCTL32.11]
*
* PARAMS
* hdpa1 [I] handle to a dynamic pointer array
* hdpa2 [I] handle to a dynamic pointer array
* dwParam3
* dwParam4
* dwParam5
* dwParam6
*
* NOTES
* No more information available yet!
*/
DWORD WINAPI
COMCTL32_11 (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3,
COMCTL32_11 (HDPA hdpa1, HDPA hdpa2, DWORD dwParam3,
DWORD dwParam4, DWORD dwParam5, DWORD dwParam6)
{
FIXME (commctrl, "(%08lx, %08lx, %08lx, %08lx, %08lx, %08lx): empty stub\n",
dwParam1, dwParam2, dwParam3, dwParam4, dwParam5, dwParam6);
FIXME (commctrl, "(%p %p %08lx %08lx %08lx %08lx): empty stub\n",
hdpa1, hdpa2, dwParam3, dwParam4, dwParam5, dwParam6);
return 0;
}
@ -46,7 +56,7 @@ COMCTL32_11 (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3,
/**************************************************************************
* Alloc [COMCTL32.71]
*
* Allocates memory block from the dll's local heap
* Allocates memory block from the dll's private heap
*
* PARAMS
* dwSize [I] size of the allocated memory block
@ -63,17 +73,10 @@ COMCTL32_Alloc (DWORD dwSize)
TRACE (commctrl, "(0x%lx)\n", dwSize);
if (hComctl32Heap == 0) {
EnterCriticalSection ((void*)&cs_comctl_alloc);
hComctl32Heap = HeapCreate (0, 1, 0x4000000);
LeaveCriticalSection ((void*)&cs_comctl_alloc);
TRACE (commctrl, "Heap created: 0x%x\n", hComctl32Heap);
if (!hComctl32Heap)
return NULL;
}
lpPtr = HeapAlloc (COMCTL32_hHeap, HEAP_ZERO_MEMORY, dwSize);
lpPtr = HeapAlloc (hComctl32Heap, HEAP_ZERO_MEMORY, dwSize);
TRACE (commctrl, "-- ret=%p\n", lpPtr);
return lpPtr;
}
@ -82,7 +85,7 @@ COMCTL32_Alloc (DWORD dwSize)
* ReAlloc [COMCTL32.72]
*
* Changes the size of an allocated memory block or allocates a memory
* block using the dll's local heap.
* block using the dll's private heap.
*
* PARAMS
* lpSrc [I] pointer to memory block which will be resized
@ -104,19 +107,10 @@ COMCTL32_ReAlloc (LPVOID lpSrc, DWORD dwSize)
TRACE (commctrl, "(%p 0x%08lx)\n", lpSrc, dwSize);
if (hComctl32Heap == 0) {
EnterCriticalSection ((void*)&cs_comctl_alloc);
hComctl32Heap = HeapCreate (0, 1, 0x4000000);
LeaveCriticalSection ((void*)&cs_comctl_alloc);
TRACE (commctrl, "Heap created: 0x%x\n", hComctl32Heap);
if (!hComctl32Heap)
return NULL;
}
if (lpSrc)
lpDest = HeapReAlloc (hComctl32Heap, HEAP_ZERO_MEMORY, lpSrc, dwSize);
lpDest = HeapReAlloc (COMCTL32_hHeap, HEAP_ZERO_MEMORY, lpSrc, dwSize);
else
lpDest = HeapAlloc (hComctl32Heap, HEAP_ZERO_MEMORY, dwSize);
lpDest = HeapAlloc (COMCTL32_hHeap, HEAP_ZERO_MEMORY, dwSize);
TRACE (commctrl, "-- ret=%p\n", lpDest);
@ -127,7 +121,7 @@ COMCTL32_ReAlloc (LPVOID lpSrc, DWORD dwSize)
/**************************************************************************
* Free [COMCTL32.73]
.*
* Frees an allocated memory block from the dll's local heap.
* Frees an allocated memory block from the dll's private heap.
*
* PARAMS
* lpMem [I] pointer to memory block which will be freed
@ -142,7 +136,7 @@ COMCTL32_Free (LPVOID lpMem)
{
TRACE (commctrl, "(%p)\n", lpMem);
return HeapFree (hComctl32Heap, 0, lpMem);
return HeapFree (COMCTL32_hHeap, 0, lpMem);
}
@ -150,7 +144,7 @@ COMCTL32_Free (LPVOID lpMem)
* GetSize [COMCTL32.74]
*
* Retrieves the size of the specified memory block from the dll's
* local heap.
* private heap.
*
* PARAMS
* lpMem [I] pointer to an allocated memory block
@ -165,7 +159,7 @@ COMCTL32_GetSize (LPVOID lpMem)
{
TRACE (commctrl, "(%p)\n", lpMem);
return HeapSize (hComctl32Heap, 0, lpMem);
return HeapSize (COMCTL32_hHeap, 0, lpMem);
}
@ -185,7 +179,21 @@ typedef struct tagMRUINFO
LPCSTR lpszSubKey;
DWORD dwParam6;
} MRUINFO, *LPMRUINFO;
typedef struct tagMRU
{
DWORD dwParam1; /* some kind of flag */
DWORD dwParam2;
DWORD dwParam3;
HKEY hkeyMRU;
LPCSTR lpszSubKey;
DWORD dwParam6;
} MRU, *HMRU;
LPVOID WINAPI
CreateMRUListEx32A (LPMRUINFO lpmi, DWORD dwParam2,
DWORD dwParam3, DWORD dwParam4);
/**************************************************************************
@ -197,10 +205,6 @@ typedef struct tagMRUINFO
* RETURNS
*/
LPVOID WINAPI
CreateMRUListEx32A (LPMRUINFO lpmi, DWORD dwParam2,
DWORD dwParam3, DWORD dwParam4);
LPVOID WINAPI
CreateMRUList32A (LPMRUINFO lpmi)
{
@ -208,20 +212,48 @@ CreateMRUList32A (LPMRUINFO lpmi)
}
DWORD WINAPI
FreeMRUList32A (LPVOID ptr)
FreeMRUList32A (HMRU hmru)
{
FIXME (commctrl, "(%p) empty stub!\n", ptr);
FIXME (commctrl, "(%p) empty stub!\n", hmru);
COMCTL32_Free (ptr);
#if 0
if (!(hmru->dwParam1 & 1001)) {
RegSetValueEx32A (hmru->hKeyMRU, "MRUList", 0, REG_SZ,
hmru->lpszMRUString,
lstrlen32A (hmru->lpszMRUString));
}
return TRUE;
RegClosKey32 (hmru->hkeyMRU
COMCTL32_Free32 (hmru->lpszMRUString);
#endif
return COMCTL32_Free (hmru);
}
DWORD WINAPI
AddMRUData (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3)
{
FIXME (commctrl, "(%lx %lx %lx) empty stub!\n",
dwParam1, dwParam2, dwParam3);
return 0;
}
DWORD WINAPI
FindMRUData (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3, DWORD dwParam4)
{
FIXME (commctrl, "(%lx %lx %lx %lx) empty stub!\n",
dwParam1, dwParam2, dwParam3, dwParam4);
return -1;
}
LPVOID WINAPI
@ -257,28 +289,6 @@ CreateMRUListEx32A (LPMRUINFO lpmi, DWORD dwParam2, DWORD dwParam3, DWORD dwPara
DWORD WINAPI
AddMRUData (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3)
{
FIXME (commctrl, "(%lx %lx %lx) empty stub!\n",
dwParam1, dwParam2, dwParam3);
return 0;
}
DWORD WINAPI
FindMRUData (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3, DWORD dwParam4)
{
FIXME (commctrl, "(%lx %lx %lx %lx) empty stub!\n",
dwParam1, dwParam2, dwParam3, dwParam4);
return -1;
}
/**************************************************************************
* Str_GetPtrA [COMCTL32.233]
@ -459,7 +469,7 @@ DSA_Create (INT32 nSize, INT32 nGrow)
hdsa->pData = NULL;
hdsa->nMaxCount = 0;
hdsa->nItemSize = nSize;
hdsa->nGrow = MIN(1, nGrow);
hdsa->nGrow = MAX(1, nGrow);
}
return hdsa;
@ -795,8 +805,8 @@ DPA_Create (INT32 nGrow)
hdpa = (HDPA)COMCTL32_Alloc (sizeof(DPA));
if (hdpa) {
hdpa->nGrow = MIN(8, nGrow);
hdpa->hHeap = hComctl32Heap;
hdpa->nGrow = MAX(8, nGrow);
hdpa->hHeap = COMCTL32_hHeap;
hdpa->nMaxCount = hdpa->nGrow * 2;
hdpa->ptrs =
(LPVOID*)COMCTL32_Alloc (hdpa->nMaxCount * sizeof(LPVOID));
@ -856,7 +866,7 @@ DPA_Grow (const HDPA hdpa, INT32 nGrow)
if (!hdpa)
return FALSE;
hdpa->nGrow = MIN(8, nGrow);
hdpa->nGrow = MAX(8, nGrow);
return TRUE;
}
@ -1020,14 +1030,14 @@ DPA_InsertPtr (const HDPA hdpa, INT32 i, LPVOID p)
if (!hdpa->ptrs) {
hdpa->ptrs =
(LPVOID*)HeapAlloc (hdpa->hHeap, HEAP_ZERO_MEMORY,
hdpa->nGrow * sizeof(LPVOID));
2 * hdpa->nGrow * sizeof(LPVOID));
if (!hdpa->ptrs)
return -1;
hdpa->nMaxCount = hdpa->nGrow;
hdpa->nMaxCount = hdpa->nGrow * 2;
nIndex = 0;
}
else {
if (hdpa->nItemCount > hdpa->nMaxCount) {
if (hdpa->nItemCount >= hdpa->nMaxCount) {
TRACE (commctrl, "-- resizing\n");
nNewItems = hdpa->nMaxCount + hdpa->nGrow;
nSize = nNewItems * sizeof(LPVOID);
@ -1041,8 +1051,8 @@ DPA_InsertPtr (const HDPA hdpa, INT32 i, LPVOID p)
}
if (i >= hdpa->nItemCount) {
TRACE (commctrl, "-- appending at %d\n", nIndex);
nIndex = hdpa->nItemCount;
TRACE (commctrl, "-- appending at %d\n", nIndex);
}
else {
TRACE (commctrl, "-- inserting at %d\n", i);
@ -1210,7 +1220,7 @@ DPA_DeleteAllPtrs (const HDPA hdpa)
/**************************************************************************
* DPA_QuickSort [Internal]
*
* Modified version of quicksort (used by DPA_Sort).
* Ordinary quicksort (used by DPA_Sort).
*
* PARAMS
* lpPtrs [I] pointer to the pointer array
@ -1221,38 +1231,32 @@ DPA_DeleteAllPtrs (const HDPA hdpa)
*
* RETURNS
* NONE
*
* NOTES
* Taken from R.Sedgewick "Algorithms in C"!
* If something goes wrong, blame HIM not ME! (Eric Kohl)
*/
static VOID
DPA_QuickSort (LPVOID *lpPtrs , INT32 l, INT32 r,
DPA_QuickSort (LPVOID *lpPtrs, INT32 l, INT32 r,
PFNDPACOMPARE pfnCompare, LPARAM lParam)
{
LPVOID t, v;
INT32 i, j;
if (r > l) {
v = lpPtrs[r];
i = l - 1;
j = r;
for (;;) {
while ((pfnCompare)(lpPtrs[++i], v, lParam) < 0);
while ((pfnCompare)(lpPtrs[--j], v, lParam) > 0);
if (i >= j)
break;
TRACE (commctrl, "l=%i r=%i\n", l, r);
i = l;
j = r;
v = lpPtrs[(int)(l+r)/2];
do {
while ((pfnCompare)(lpPtrs[i], v, lParam) < 0) i++;
while ((pfnCompare)(lpPtrs[j], v, lParam) > 0) j--;
if (i <= j)
{
t = lpPtrs[i];
lpPtrs[i] = lpPtrs[j];
lpPtrs[j] = t;
lpPtrs[i++] = lpPtrs[j];
lpPtrs[j--] = t;
}
t = lpPtrs[i];
lpPtrs[i] = lpPtrs[r];
lpPtrs[r] = t;
DPA_QuickSort (lpPtrs, l, i - 1, pfnCompare, lParam);
DPA_QuickSort (lpPtrs, i + 1, r, pfnCompare, lParam);
}
} while (i <= j);
if (l < j) DPA_QuickSort (lpPtrs, l, j, pfnCompare, lParam);
if (i < r) DPA_QuickSort (lpPtrs, i, r, pfnCompare, lParam);
}
@ -1306,6 +1310,7 @@ DPA_Sort (const HDPA hdpa, PFNDPACOMPARE pfnCompare, LPARAM lParam)
*
* NOTES
* Binary search taken from R.Sedgewick "Algorithms in C"!
* Function is NOT tested!
* If something goes wrong, blame HIM not ME! (Eric Kohl)
*/
@ -1402,7 +1407,7 @@ DPA_CreateEx (INT32 nGrow, HANDLE32 hHeap)
if (hdpa) {
hdpa->nGrow = MIN(8, nGrow);
hdpa->hHeap = hHeap ? hHeap : hComctl32Heap;
hdpa->hHeap = hHeap ? hHeap : COMCTL32_hHeap;
hdpa->nMaxCount = hdpa->nGrow * 2;
hdpa->ptrs =
(LPVOID*)HeapAlloc (hHeap, HEAP_ZERO_MEMORY,
@ -1416,20 +1421,137 @@ DPA_CreateEx (INT32 nGrow, HANDLE32 hHeap)
/**************************************************************************
* SendNotify [COMCTL32.341]
*
* Notification functions
*/
DWORD WINAPI
COMCTL32_SendNotify (DWORD dw1, DWORD dw2, DWORD dw3, DWORD dw4)
typedef struct tagNOTIFYDATA
{
FIXME (commctrl, "(0x%08lx 0x%08lx 0x%08lx 0x%08lx)\n",
dw1, dw2, dw3, dw4);
HWND32 hwndFrom;
HWND32 hwndTo;
DWORD dwParam3;
DWORD dwParam4;
DWORD dwParam5;
DWORD dwParam6;
} NOTIFYDATA, *LPNOTIFYDATA;
return 0;
/**************************************************************************
* DoNotify [Internal]
*/
static LRESULT
DoNotify (LPNOTIFYDATA lpNotify, UINT32 uCode, LPNMHDR lpHdr)
{
NMHDR nmhdr;
LPNMHDR lpNmh = NULL;
UINT32 idFrom = 0;
TRACE (commctrl, "(0x%04x 0x%04x %d %p 0x%08lx)\n",
lpNotify->hwndFrom, lpNotify->hwndTo, uCode, lpHdr,
lpNotify->dwParam5);
if (!lpNotify->hwndTo)
return 0;
if (lpNotify->hwndFrom == -1) {
lpNmh = lpHdr;
idFrom = lpHdr->idFrom;
}
else {
if (lpNotify->hwndFrom) {
HWND32 hwndParent = GetParent32 (lpNotify->hwndFrom);
if (hwndParent) {
hwndParent = GetWindow32 (lpNotify->hwndFrom, GW_OWNER);
if (hwndParent)
idFrom = GetDlgCtrlID32 (lpNotify->hwndFrom);
}
}
lpNmh = (lpHdr) ? lpHdr : &nmhdr;
lpNmh->hwndFrom = lpNotify->hwndFrom;
lpNmh->idFrom = idFrom;
lpNmh->code = uCode;
}
return SendMessage32A (lpNotify->hwndTo, WM_NOTIFY, idFrom, (LPARAM)lpNmh);
}
/**************************************************************************
* SendNotify [COMCTL32.341]
*
* PARAMS
* hwndFrom [I]
* hwndTo [I]
* uCode [I]
* lpHdr [I]
*
* RETURNS
* Success: return value from notification
* Failure: 0
*/
LRESULT WINAPI
COMCTL32_SendNotify (HWND32 hwndFrom, HWND32 hwndTo,
UINT32 uCode, LPNMHDR lpHdr)
{
NOTIFYDATA notify;
TRACE (commctrl, "(0x%04x 0x%04x %d %p)\n",
hwndFrom, hwndTo, uCode, lpHdr);
notify.hwndFrom = hwndFrom;
notify.hwndTo = hwndTo;
notify.dwParam5 = 0;
notify.dwParam6 = 0;
return DoNotify (&notify, uCode, lpHdr);
}
/**************************************************************************
* SendNotifyEx [COMCTL32.342]
*
* PARAMS
* hwndFrom [I]
* hwndTo [I]
* uCode [I]
* lpHdr [I]
* dwParam5 [I]
*
* RETURNS
* Success: return value from notification
* Failure: 0
*/
LRESULT WINAPI
COMCTL32_SendNotifyEx (HWND32 hwndTo, HWND32 hwndFrom, UINT32 uCode,
LPNMHDR lpHdr, DWORD dwParam5)
{
NOTIFYDATA notify;
HWND32 hwndNotify;
TRACE (commctrl, "(0x%04x 0x%04x %d %p 0x%08lx)\n",
hwndFrom, hwndTo, uCode, lpHdr, dwParam5);
hwndNotify = hwndTo;
if (!hwndTo) {
if (IsWindow32 (hwndFrom)) {
hwndNotify = GetParent32 (hwndFrom);
if (!hwndNotify)
return 0;
}
}
notify.hwndFrom = hwndFrom;
notify.hwndTo = hwndNotify;
notify.dwParam5 = dwParam5;
notify.dwParam6 = 0;
return DoNotify (&notify, uCode, lpHdr);
}
/**************************************************************************
* StrChrA [COMCTL32.350]
@ -1489,60 +1611,139 @@ COMCTL32_StrToIntA (LPSTR lpString)
/**************************************************************************
* COMCTL32_385 [COMCTL32.385]
*
* Enumerates all items in a dynamic pointer array.
*
* PARAMS
* hdpa [I] handle to the dynamic pointer array
* enumProc [I]
* dwParam3 [I]
*
* RETURNS
* none
*
* NOTES
* Original function name unknown!
*/
DWORD WINAPI
COMCTL32_385 (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3)
typedef DWORD (CALLBACK *DPAENUMPROC)(LPVOID, DWORD);
VOID WINAPI
COMCTL32_385 (HDPA hdpa, DPAENUMPROC enumProc, DWORD dwParam3)
{
INT32 i;
FIXME (commctrl, "(%08lx, %08lx, %08lx): empty stub\n",
dwParam1, dwParam2, dwParam3);
TRACE (commctrl, "(%p %p %08lx)\n", hdpa, enumProc, dwParam3);
return 0;
if (!hdpa)
return;
if (hdpa->nItemCount <= 0)
return;
for (i = 0; i < hdpa->nItemCount; i++) {
if ((enumProc)(hdpa->ptrs[i], dwParam3) == 0)
return;
}
return;
}
/**************************************************************************
* COMCTL32_386 [COMCTL32.386]
*
* Enumerates all items in a dynamic pointer array and destroys it.
*
* PARAMS
* hdpa [I] handle to the dynamic pointer array
* enumProc [I]
* dwParam3 [I]
*
* RETURNS
* Success: TRUE
* Failure: FALSE
*
* NOTES
* Original function name unknown!
*/
DWORD WINAPI
COMCTL32_386 (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3)
BOOL32 WINAPI
COMCTL32_386 (HDPA hdpa, DPAENUMPROC enumProc, DWORD dwParam3)
{
TRACE (commctrl, "(%p %p %08lx)\n", hdpa, enumProc, dwParam3);
FIXME (commctrl, "(%08lx, %08lx, %08lx): empty stub\n",
dwParam1, dwParam2, dwParam3);
COMCTL32_385 (hdpa, enumProc, dwParam3);
return 0;
return DPA_Destroy (hdpa);
}
/**************************************************************************
* COMCTL32_387 [COMCTL32.387]
*
* Enumerates all items in a dynamic storage array.
*
* PARAMS
* hdsa [I] handle to the dynamic storage array
* enumProc [I]
* dwParam3 [I]
*
* RETURNS
* none
*
* NOTES
* Original function name unknown!
*/
DWORD WINAPI
COMCTL32_387 (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3)
typedef DWORD (CALLBACK *DSAENUMPROC)(LPVOID, DWORD);
VOID WINAPI
COMCTL32_387 (HDSA hdsa, DSAENUMPROC enumProc, DWORD dwParam3)
{
INT32 i;
FIXME (commctrl, "(%08lx, %08lx, %08lx): empty stub\n",
dwParam1, dwParam2, dwParam3);
TRACE (commctrl, "(%p %p %08lx)\n", hdsa, enumProc, dwParam3);
return 0;
if (!hdsa)
return;
if (hdsa->nItemCount <= 0)
return;
for (i = 0; i < hdsa->nItemCount; i++) {
LPVOID lpItem = DSA_GetItemPtr (hdsa, i);
if ((enumProc)(lpItem, dwParam3) == 0)
return;
}
return;
}
/**************************************************************************
* COMCTL32_388 [COMCTL32.388]
*
* Enumerates all items in a dynamic storage array and destroys it.
*
* PARAMS
* hdsa [I] handle to the dynamic storage array
* enumProc [I]
* dwParam3 [I]
*
* RETURNS
* Success: TRUE
* Failure: FALSE
*
* NOTES
* Original function name unknown!
*/
DWORD WINAPI
COMCTL32_388 (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3)
BOOL32 WINAPI
COMCTL32_388 (HDSA hdsa, DSAENUMPROC enumProc, DWORD dwParam3)
{
TRACE (commctrl, "(%p %p %08lx)\n", hdsa, enumProc, dwParam3);
FIXME (commctrl, "(%08lx, %08lx, %08lx): empty stub\n",
dwParam1, dwParam2, dwParam3);
COMCTL32_387 (hdsa, enumProc, dwParam3);
return 0;
return DSA_Destroy (hdsa);
}

View File

@ -328,14 +328,14 @@ BOOL32 WINAPI ImageList_DrawEx(HIMAGELIST,INT32,HDC32,INT32,INT32,INT32,
INT32,COLORREF,COLORREF,UINT32);
BOOL32 WINAPI ImageList_DrawIndirect(IMAGELISTDRAWPARAMS*);
HIMAGELIST WINAPI ImageList_Duplicate(HIMAGELIST);
BOOL32 WINAPI ImageList_EndDrag (VOID);
BOOL32 WINAPI ImageList_EndDrag(VOID);
COLORREF WINAPI ImageList_GetBkColor(HIMAGELIST);
HIMAGELIST WINAPI ImageList_GetDragImage(POINT32*,POINT32*);
HICON32 WINAPI ImageList_GetIcon(HIMAGELIST,INT32,UINT32);
BOOL32 WINAPI ImageList_GetIconSize(HIMAGELIST,INT32*,INT32*);
INT32 WINAPI ImageList_GetImageCount(HIMAGELIST);
BOOL32 WINAPI ImageList_GetImageInfo(HIMAGELIST,INT32,IMAGEINFO*);
BOOL32 WINAPI ImageList_GetImageRect (HIMAGELIST,INT32,LPRECT32);
BOOL32 WINAPI ImageList_GetImageRect(HIMAGELIST,INT32,LPRECT32);
HIMAGELIST WINAPI ImageList_LoadImage32A(HINSTANCE32,LPCSTR,INT32,INT32,
COLORREF,UINT32,UINT32);
HIMAGELIST WINAPI ImageList_LoadImage32W(HINSTANCE32,LPCWSTR,INT32,INT32,
@ -343,7 +343,7 @@ HIMAGELIST WINAPI ImageList_LoadImage32W(HINSTANCE32,LPCWSTR,INT32,INT32,
#define ImageList_LoadImage WINELIB_NAME_AW(ImageList_LoadImage)
HIMAGELIST WINAPI ImageList_Merge(HIMAGELIST,INT32,HIMAGELIST,INT32,INT32,INT32);
#ifdef __IStream_INTREFACE_DEFINED__
HIMAGELIST WINAPI ImageList_Read (LPSTREAM32);
HIMAGELIST WINAPI ImageList_Read(LPSTREAM32);
#endif
BOOL32 WINAPI ImageList_Remove(HIMAGELIST,INT32);
BOOL32 WINAPI ImageList_Replace(HIMAGELIST,INT32,HBITMAP32,HBITMAP32);
@ -351,11 +351,11 @@ INT32 WINAPI ImageList_ReplaceIcon(HIMAGELIST,INT32,HICON32);
COLORREF WINAPI ImageList_SetBkColor(HIMAGELIST,COLORREF);
BOOL32 WINAPI ImageList_SetDragCursorImage(HIMAGELIST,INT32,INT32,INT32);
BOOL32 WINAPI ImageList_SetIconSize (HIMAGELIST,INT32,INT32);
BOOL32 WINAPI ImageList_SetImageCount (HIMAGELIST,INT32);
BOOL32 WINAPI ImageList_SetIconSize(HIMAGELIST,INT32,INT32);
BOOL32 WINAPI ImageList_SetImageCount(HIMAGELIST,INT32);
BOOL32 WINAPI ImageList_SetOverlayImage(HIMAGELIST,INT32,INT32);
#ifdef __IStream_INTREFACE_DEFINED__
BOOL32 WINAPI ImageList_Write (HIMAGELIST, LPSTREAM32);
BOOL32 WINAPI ImageList_Write(HIMAGELIST, LPSTREAM32);
#endif
#ifndef __WINE__
@ -369,10 +369,10 @@ BOOL32 WINAPI ImageList_Write (HIMAGELIST, LPSTREAM32);
/* Header control */
#define WC_HEADER16 "SysHeader"
#define WC_HEADER32A "SysHeader32"
#define WC_HEADER32W L"SysHeader32"
#define WC_HEADER WINELIB_NAME_AW(WC_HEADER)
#define WC_HEADER16 "SysHeader"
#define WC_HEADER32A "SysHeader32"
#define WC_HEADER32W L"SysHeader32"
#define WC_HEADER WINELIB_NAME_AW(WC_HEADER)
#define HDS_HORZ 0x0000
#define HDS_BUTTONS 0x0002
@ -2189,6 +2189,55 @@ typedef INT32 (CALLBACK *PFNLVCOMPARE)(LPARAM, LPARAM, LPARAM);
(BOOL32)SendMessage32A(hwnd,ACM_PLAY,1,(LPARAM)MAKELONG(frame,frame))
/**************************************************************************
* IP Address control
*/
#define WC_IPADDRESS32A "SysIPAddress32"
#define WC_IPADDRESS32W L"SysIPAddress32"
#define WC_IPADDRESS WINELIB_NAME_AW(WC_IPADDRESS)
#define IPM_CLEARADDRESS (WM_USER+100)
#define IPM_SETADDRESS (WM_USER+101)
#define IPM_GETADDRESS (WM_USER+102)
#define IPM_SETRANGE (WM_USER+103)
#define IPM_SETFOCUS (WM_USER+104)
#define IPM_ISBLANK (WM_USER+105)
#define IPN_FIELDCHANGED (IPN_FIRST-0)
typedef struct tagNMIPADDRESS
{
NMHDR hdr;
INT32 iField;
INT32 iValue;
} NMIPADDRESS, *LPNMIPADDRESS;
#define MAKEIPRANGE(low,high) \
((LPARAM)(WORD)(((BYTE)(high)<<8)+(BYTE)(low)))
#define MAKEIPADDRESS(b1,b2,b3,b4) \
((LPARAM)(((DWORD)(b1)<<24)+((DWORD)(b2)<16)+((DWORD)(b3)<<8)+((DWORD)(b4))))
#define FIRST_IPADDRESS(x) (((x)>>24)&0xff)
#define SECOND_IPADDRESS(x) (((x)>>16)&0xff)
#define THIRD_IPADDRESS(x) (((x)>>8)&0xff)
#define FOURTH_IPADDRESS(x) ((x)&0xff)
/**************************************************************************
* Native Font control
*/
#define WC_NATIVEFONTCTL32A "NativeFontCtl"
#define WC_NATIVEFONTCTL32W L"NativeFontCtl"
#define WC_NATIVEFONTCTL WINELIB_NAME_AW(WC_NATIVEFONTCTL)
#define NFS_EDIT 0x0001
#define NFS_STATIC 0x0002
#define NFS_LISTCOMBO 0x0004
#define NFS_BUTTON 0x0008
#define NFS_ALL 0x0010
/**************************************************************************
* UNDOCUMENTED functions
@ -2196,16 +2245,16 @@ typedef INT32 (CALLBACK *PFNLVCOMPARE)(LPARAM, LPARAM, LPARAM);
/* local heap memory functions */
LPVOID WINAPI COMCTL32_Alloc (DWORD dwSize);
LPVOID WINAPI COMCTL32_ReAlloc (LPVOID lpSrc, DWORD dwSize);
BOOL32 WINAPI COMCTL32_Free (LPVOID lpMem);
DWORD WINAPI COMCTL32_GetSize (LPVOID lpMem);
LPVOID WINAPI COMCTL32_Alloc (DWORD);
LPVOID WINAPI COMCTL32_ReAlloc (LPVOID, DWORD);
BOOL32 WINAPI COMCTL32_Free (LPVOID);
DWORD WINAPI COMCTL32_GetSize (LPVOID);
INT32 WINAPI Str_GetPtr32A (LPCSTR lpSrc, LPSTR lpDest, INT32 nMaxLen);
BOOL32 WINAPI Str_SetPtr32A (LPSTR *lppDest, LPCSTR lpSrc);
INT32 WINAPI Str_GetPtr32W (LPCWSTR lpSrc, LPWSTR lpDest, INT32 nMaxLen);
BOOL32 WINAPI Str_SetPtr32W (LPWSTR *lppDest, LPCWSTR lpSrc);
INT32 WINAPI Str_GetPtr32A (LPCSTR, LPSTR, INT32);
BOOL32 WINAPI Str_SetPtr32A (LPSTR *, LPCSTR);
INT32 WINAPI Str_GetPtr32W (LPCWSTR, LPWSTR, INT32);
BOOL32 WINAPI Str_SetPtr32W (LPWSTR *, LPCWSTR);
#define Str_GetPtr WINELIB_NAME_AW(Str_GetPtr)
#define Str_SetPtr WINELIB_NAME_AW(Str_SetPtr)
@ -2221,14 +2270,14 @@ typedef struct _DSA
INT32 nGrow;
} DSA, *HDSA;
HDSA WINAPI DSA_Create (INT32 nSize, INT32 nGrow);
BOOL32 WINAPI DSA_DeleteAllItems (const HDSA hdsa);
INT32 WINAPI DSA_DeleteItem (const HDSA hdsa, INT32 nIndex);
BOOL32 WINAPI DSA_Destroy (const HDSA hdsa);
BOOL32 WINAPI DSA_GetItem (const HDSA hdsa, INT32 nIndex, LPVOID pDest);
LPVOID WINAPI DSA_GetItemPtr (const HDSA hdsa, INT32 nIndex);
INT32 WINAPI DSA_InsertItem (const HDSA hdsa, INT32 nIndex, LPVOID pSrc);
BOOL32 WINAPI DSA_SetItem (const HDSA hdsa, INT32 nIndex, LPVOID pSrc);
HDSA WINAPI DSA_Create (INT32, INT32);
BOOL32 WINAPI DSA_DeleteAllItems (const HDSA);
INT32 WINAPI DSA_DeleteItem (const HDSA, INT32);
BOOL32 WINAPI DSA_Destroy (const HDSA);
BOOL32 WINAPI DSA_GetItem (const HDSA, INT32, LPVOID);
LPVOID WINAPI DSA_GetItemPtr (const HDSA, INT32);
INT32 WINAPI DSA_InsertItem (const HDSA, INT32, LPVOID);
BOOL32 WINAPI DSA_SetItem (const HDSA, INT32, LPVOID);
/* Dynamic Pointer Array */
@ -2242,32 +2291,38 @@ typedef struct _DPA
INT32 nMaxCount;
} DPA, *HDPA;
HDPA WINAPI DPA_Create (INT32 nGrow);
HDPA WINAPI DPA_CreateEx (INT32 nGrow, HANDLE32 hHeap);
BOOL32 WINAPI DPA_Destroy (const HDPA hdpa);
HDPA WINAPI DPA_Clone (const HDPA hdpa, const HDPA hdpaNew);
LPVOID WINAPI DPA_GetPtr (const HDPA hdpa, INT32 i);
INT32 WINAPI DPA_GetPtrIndex (const HDPA hdpa, LPVOID p);
BOOL32 WINAPI DPA_Grow (const HDPA pdpa, INT32 cp);
BOOL32 WINAPI DPA_SetPtr (const HDPA hdpa, INT32 i, LPVOID p);
INT32 WINAPI DPA_InsertPtr (const HDPA hdpa, INT32 i, LPVOID p);
LPVOID WINAPI DPA_DeletePtr (const HDPA hdpa, INT32 i);
BOOL32 WINAPI DPA_DeleteAllPtrs (const HDPA hdpa);
HDPA WINAPI DPA_Create (INT32);
HDPA WINAPI DPA_CreateEx (INT32, HANDLE32);
BOOL32 WINAPI DPA_Destroy (const HDPA);
HDPA WINAPI DPA_Clone (const HDPA, const HDPA);
LPVOID WINAPI DPA_GetPtr (const HDPA, INT32);
INT32 WINAPI DPA_GetPtrIndex (const HDPA, LPVOID);
BOOL32 WINAPI DPA_Grow (const HDPA, INT32);
BOOL32 WINAPI DPA_SetPtr (const HDPA, INT32, LPVOID);
INT32 WINAPI DPA_InsertPtr (const HDPA, INT32, LPVOID);
LPVOID WINAPI DPA_DeletePtr (const HDPA, INT32);
BOOL32 WINAPI DPA_DeleteAllPtrs (const HDPA);
typedef INT32 (CALLBACK *PFNDPACOMPARE)(LPVOID p1, LPVOID p2, LPARAM lParam);
BOOL32 WINAPI DPA_Sort (const HDPA hdpa, PFNDPACOMPARE pfnCompare, LPARAM lParam);
typedef INT32 (CALLBACK *PFNDPACOMPARE)(LPVOID, LPVOID, LPARAM);
BOOL32 WINAPI DPA_Sort (const HDPA, PFNDPACOMPARE, LPARAM);
#define DPAS_SORTED 0x0001
#define DPAS_INSERTBEFORE 0x0002
#define DPAS_INSERTAFTER 0x0004
INT32 WINAPI DPA_Search (const HDPA hdpa, LPVOID pFind, INT32 nStart,
PFNDPACOMPARE pfnCompare,
LPARAM lParam, UINT32 uOptions);
INT32 WINAPI DPA_Search (const HDPA, LPVOID, INT32, PFNDPACOMPARE, LPARAM, UINT32);
#define DPA_GetPtrCount(hdpa) (*(INT32*)(hdpa))
#define DPA_GetPtrPtr(hdpa) (*((LPVOID**)((BYTE*)(hdpa)+sizeof(INT32))))
#define DPA_FastGetPtr(hdpa,i) (DPA_GetPtrPtr(hdpa)[i])
/* notification helper functions */
LRESULT WINAPI COMCTL32_SendNotify (HWND32, HWND32, UINT32, LPNMHDR);
/* type and functionality of last parameter is still unknown */
LRESULT WINAPI COMCTL32_SendNotifyEx (HWND32, HWND32, UINT32, LPNMHDR, DWORD);
#endif /* __WINE_COMMCTRL_H */

View File

@ -17,7 +17,7 @@ init ComCtl32LibMain
9 stub COMCTL32_9
10 stub COMCTL32_10
11 stdcall COMCTL32_11(long long long long long long) COMCTL32_11
12 stub Cctl1632_ThunkData32
#12 stub Cctl1632_ThunkData32
13 stub MakeDragList
14 stub LBItemFromPt
15 stub DrawInsert
@ -95,7 +95,7 @@ init ComCtl32LibMain
87 stub _TrackMouseEvent
151 stdcall CreateMRUListA(ptr) CreateMRUList32A
152 stdcall FreeMRUList(long) FreeMRUList32A
152 stdcall FreeMRUList(ptr) FreeMRUList32A
153 stub AddMRUStringA@8
154 stub EnumMRUListA@16
155 stub FindMRUStringA@12
@ -105,8 +105,8 @@ init ComCtl32LibMain
163 stub CreatePage
164 stub CreateProxyPage
167 stdcall AddMRUData(long long long) AddMRUData
169 stdcall FindMRUData(long long long long) FindMRUData
167 stdcall AddMRUData(ptr long long) AddMRUData
169 stdcall FindMRUData(ptr long long long) FindMRUData
233 stdcall Str_GetPtrA(str str long) Str_GetPtr32A
234 stdcall Str_SetPtrA(str str) Str_SetPtr32A
@ -134,8 +134,8 @@ init ComCtl32LibMain
338 stdcall DPA_Sort(ptr ptr long) DPA_Sort
339 stdcall DPA_Search(ptr ptr long ptr long long) DPA_Search
340 stdcall DPA_CreateEx(long long) DPA_CreateEx
341 stdcall SendNotify(long long long long) COMCTL32_SendNotify
342 stub SendNotifyEx
341 stdcall SendNotify(long long long ptr) COMCTL32_SendNotify
342 stdcall SendNotifyEx(long long long ptr long) COMCTL32_SendNotifyEx
350 stdcall StrChrA(str str) COMCTL32_StrChrA
351 stub StrRChrA