comctl32/dpa: Implement DPA_GetSize().

This commit is contained in:
Nikolay Sivov 2009-09-13 03:13:42 +04:00 committed by Alexandre Julliard
parent c1513c6bde
commit 28998999d0
3 changed files with 24 additions and 2 deletions

View File

@ -125,6 +125,7 @@
@ stdcall DestroyPropertySheetPage(long)
@ stdcall -private DllGetVersion(ptr)
@ stdcall -private DllInstall(long wstr)
@ stdcall DPA_GetSize(ptr)
@ stdcall DrawShadowText(long wstr long ptr long long long long long)
@ stdcall DrawStatusText(long ptr ptr long) DrawStatusTextA
@ stdcall DrawStatusTextW(long ptr wstr long)

View File

@ -45,14 +45,14 @@
WINE_DEFAULT_DEBUG_CHANNEL(dpa);
struct _DPA
typedef struct _DPA
{
INT nItemCount;
LPVOID *ptrs;
HANDLE hHeap;
INT nGrow;
INT nMaxCount;
};
} DPA;
typedef struct _STREAMDATA
{
@ -997,3 +997,23 @@ void WINAPI DPA_DestroyCallback (HDPA hdpa, PFNDPAENUMCALLBACK enumProc,
DPA_EnumCallback (hdpa, enumProc, lParam);
DPA_Destroy (hdpa);
}
/**************************************************************************
* DPA_GetSize [COMCTL32.@]
*
* Returns all array allocated memory size
*
* PARAMS
* hdpa [I] handle to the dynamic pointer array
*
* RETURNS
* Size in bytes
*/
ULONGLONG WINAPI DPA_GetSize(HDPA hdpa)
{
TRACE("(%p)\n", hdpa);
if (!hdpa) return 0;
return sizeof(DPA) + hdpa->nMaxCount*sizeof(PVOID);
}

View File

@ -5003,6 +5003,7 @@ BOOL WINAPI DPA_DeleteAllPtrs(HDPA);
BOOL WINAPI DPA_SetPtr(HDPA, INT, LPVOID);
LPVOID WINAPI DPA_GetPtr(HDPA, INT);
INT WINAPI DPA_GetPtrIndex(HDPA, LPCVOID);
ULONGLONG WINAPI DPA_GetSize(HDPA);
BOOL WINAPI DPA_Grow(HDPA, INT);
INT WINAPI DPA_InsertPtr(HDPA, INT, LPVOID);
BOOL WINAPI DPA_Sort(HDPA, PFNDPACOMPARE, LPARAM);