Renamed the COMCTL32_* functions to use the exported name.
This commit is contained in:
parent
5a2cde6532
commit
10aacbf3ef
|
@ -155,15 +155,18 @@ typedef struct
|
||||||
WNDPROC origproc;
|
WNDPROC origproc;
|
||||||
} SUBCLASS_INFO, *LPSUBCLASS_INFO;
|
} SUBCLASS_INFO, *LPSUBCLASS_INFO;
|
||||||
|
|
||||||
/* private heap memory functions */
|
|
||||||
|
|
||||||
LPVOID WINAPI COMCTL32_Alloc (DWORD);
|
|
||||||
LPVOID WINAPI COMCTL32_ReAlloc (LPVOID, DWORD);
|
|
||||||
BOOL WINAPI COMCTL32_Free (LPVOID);
|
|
||||||
DWORD WINAPI COMCTL32_GetSize (LPVOID);
|
|
||||||
|
|
||||||
/* undocumented functions */
|
/* undocumented functions */
|
||||||
|
|
||||||
|
LPVOID WINAPI Alloc (DWORD);
|
||||||
|
LPVOID WINAPI ReAlloc (LPVOID, DWORD);
|
||||||
|
BOOL WINAPI Free (LPVOID);
|
||||||
|
DWORD WINAPI GetSize (LPVOID);
|
||||||
|
|
||||||
|
/* for compatibility with old code */
|
||||||
|
#define COMCTL32_Alloc(size) Alloc(size)
|
||||||
|
#define COMCTL32_ReAlloc(ptr,size) ReAlloc(ptr,size)
|
||||||
|
#define COMCTL32_Free(ptr) Free(ptr)
|
||||||
|
|
||||||
INT WINAPI Str_GetPtrA (LPCSTR, LPSTR, INT);
|
INT WINAPI Str_GetPtrA (LPCSTR, LPSTR, INT);
|
||||||
INT WINAPI Str_GetPtrW (LPCWSTR, LPWSTR, INT);
|
INT WINAPI Str_GetPtrW (LPCWSTR, LPWSTR, INT);
|
||||||
|
|
||||||
|
|
|
@ -19,10 +19,10 @@
|
||||||
15 stdcall DrawInsert(long long long)
|
15 stdcall DrawInsert(long long long)
|
||||||
16 stdcall CreateUpDownControl(long long long long long long long long long long long long)
|
16 stdcall CreateUpDownControl(long long long long long long long long long long long long)
|
||||||
17 stdcall InitCommonControls()
|
17 stdcall InitCommonControls()
|
||||||
71 stdcall -noname Alloc(long) COMCTL32_Alloc
|
71 stdcall -noname Alloc(long)
|
||||||
72 stdcall -noname ReAlloc(ptr long) COMCTL32_ReAlloc
|
72 stdcall -noname ReAlloc(ptr long)
|
||||||
73 stdcall -noname Free(ptr) COMCTL32_Free
|
73 stdcall -noname Free(ptr)
|
||||||
74 stdcall -noname GetSize(ptr) COMCTL32_GetSize
|
74 stdcall -noname GetSize(ptr)
|
||||||
151 stdcall -noname CreateMRUListA(ptr)
|
151 stdcall -noname CreateMRUListA(ptr)
|
||||||
152 stdcall -noname FreeMRUList(long)
|
152 stdcall -noname FreeMRUList(long)
|
||||||
153 stdcall -noname AddMRUStringA(long str)
|
153 stdcall -noname AddMRUStringA(long str)
|
||||||
|
@ -59,24 +59,24 @@
|
||||||
338 stdcall -noname DPA_Sort(ptr ptr long)
|
338 stdcall -noname DPA_Sort(ptr ptr long)
|
||||||
339 stdcall -noname DPA_Search(ptr ptr long ptr long long)
|
339 stdcall -noname DPA_Search(ptr ptr long ptr long long)
|
||||||
340 stdcall -noname DPA_CreateEx(long long)
|
340 stdcall -noname DPA_CreateEx(long long)
|
||||||
341 stdcall -noname SendNotify(long long long ptr) COMCTL32_SendNotify
|
341 stdcall -noname SendNotify(long long long ptr)
|
||||||
342 stdcall -noname SendNotifyEx(long long long ptr long) COMCTL32_SendNotifyEx
|
342 stdcall -noname SendNotifyEx(long long long ptr long)
|
||||||
350 stdcall -noname StrChrA(str str) COMCTL32_StrChrA
|
350 stdcall -noname StrChrA(str str)
|
||||||
351 stdcall -noname StrRChrA(str str long) COMCTL32_StrRChrA
|
351 stdcall -noname StrRChrA(str str long)
|
||||||
352 stdcall -noname StrCmpNA(str str long) COMCTL32_StrCmpNA
|
352 stdcall -noname StrCmpNA(str str long)
|
||||||
353 stdcall -noname StrCmpNIA(str str long) COMCTL32_StrCmpNIA
|
353 stdcall -noname StrCmpNIA(str str long)
|
||||||
354 stdcall -noname StrStrA(str str) COMCTL32_StrStrA
|
354 stdcall -noname StrStrA(str str)
|
||||||
355 stdcall -noname StrStrIA(str str) COMCTL32_StrStrIA
|
355 stdcall -noname StrStrIA(str str)
|
||||||
356 stdcall -noname StrCSpnA(str str) COMCTL32_StrCSpnA
|
356 stdcall -noname StrCSpnA(str str)
|
||||||
357 stdcall -noname StrToIntA(str) COMCTL32_StrToIntA
|
357 stdcall -noname StrToIntA(str)
|
||||||
358 stdcall -noname StrChrW(wstr long) COMCTL32_StrChrW
|
358 stdcall -noname StrChrW(wstr long)
|
||||||
359 stdcall -noname StrRChrW(wstr wstr long) COMCTL32_StrRChrW
|
359 stdcall -noname StrRChrW(wstr wstr long)
|
||||||
360 stdcall -noname StrCmpNW(wstr wstr long) COMCTL32_StrCmpNW
|
360 stdcall -noname StrCmpNW(wstr wstr long)
|
||||||
361 stdcall -noname StrCmpNIW(wstr wstr long) COMCTL32_StrCmpNIW
|
361 stdcall -noname StrCmpNIW(wstr wstr long)
|
||||||
362 stdcall -noname StrStrW(wstr wstr) COMCTL32_StrStrW
|
362 stdcall -noname StrStrW(wstr wstr)
|
||||||
363 stdcall -noname StrStrIW(wstr wstr) COMCTL32_StrStrIW
|
363 stdcall -noname StrStrIW(wstr wstr)
|
||||||
364 stdcall -noname StrSpnW(wstr wstr) COMCTL32_StrSpnW
|
364 stdcall -noname StrSpnW(wstr wstr)
|
||||||
365 stdcall -noname StrToIntW(wstr) COMCTL32_StrToIntW
|
365 stdcall -noname StrToIntW(wstr)
|
||||||
366 stub -noname StrChrIA
|
366 stub -noname StrChrIA
|
||||||
367 stub -noname StrChrIW
|
367 stub -noname StrChrIW
|
||||||
368 stub -noname StrRChrIA
|
368 stub -noname StrRChrIA
|
||||||
|
|
|
@ -368,8 +368,7 @@ DPA_Merge (const HDPA hdpa1, const HDPA hdpa2, DWORD dwFlags,
|
||||||
* Failure: NULL
|
* Failure: NULL
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LPVOID WINAPI
|
LPVOID WINAPI Alloc (DWORD dwSize)
|
||||||
COMCTL32_Alloc (DWORD dwSize)
|
|
||||||
{
|
{
|
||||||
LPVOID lpPtr;
|
LPVOID lpPtr;
|
||||||
|
|
||||||
|
@ -398,12 +397,11 @@ COMCTL32_Alloc (DWORD dwSize)
|
||||||
* Failure: NULL
|
* Failure: NULL
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* If lpSrc is a NULL-pointer, then COMCTL32_ReAlloc allocates a memory
|
* If lpSrc is a NULL-pointer, then ReAlloc allocates a memory
|
||||||
* block like COMCTL32_Alloc.
|
* block like Alloc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LPVOID WINAPI
|
LPVOID WINAPI ReAlloc (LPVOID lpSrc, DWORD dwSize)
|
||||||
COMCTL32_ReAlloc (LPVOID lpSrc, DWORD dwSize)
|
|
||||||
{
|
{
|
||||||
LPVOID lpDest;
|
LPVOID lpDest;
|
||||||
|
|
||||||
|
@ -433,8 +431,7 @@ COMCTL32_ReAlloc (LPVOID lpSrc, DWORD dwSize)
|
||||||
* Failure: FALSE
|
* Failure: FALSE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
BOOL WINAPI
|
BOOL WINAPI Free (LPVOID lpMem)
|
||||||
COMCTL32_Free (LPVOID lpMem)
|
|
||||||
{
|
{
|
||||||
TRACE("(%p)\n", lpMem);
|
TRACE("(%p)\n", lpMem);
|
||||||
|
|
||||||
|
@ -456,8 +453,7 @@ COMCTL32_Free (LPVOID lpMem)
|
||||||
* Failure: 0
|
* Failure: 0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
DWORD WINAPI
|
DWORD WINAPI GetSize (LPVOID lpMem)
|
||||||
COMCTL32_GetSize (LPVOID lpMem)
|
|
||||||
{
|
{
|
||||||
TRACE("(%p)\n", lpMem);
|
TRACE("(%p)\n", lpMem);
|
||||||
|
|
||||||
|
@ -616,12 +612,12 @@ FreeMRUList (HANDLE hMRUList)
|
||||||
|
|
||||||
for(i=0; i<mp->extview.nMaxItems; i++) {
|
for(i=0; i<mp->extview.nMaxItems; i++) {
|
||||||
if (mp->array[i])
|
if (mp->array[i])
|
||||||
COMCTL32_Free(mp->array[i]);
|
Free(mp->array[i]);
|
||||||
}
|
}
|
||||||
COMCTL32_Free(mp->realMRU);
|
Free(mp->realMRU);
|
||||||
COMCTL32_Free(mp->array);
|
Free(mp->array);
|
||||||
COMCTL32_Free((LPWSTR)mp->extview.lpszSubKey);
|
Free((LPWSTR)mp->extview.lpszSubKey);
|
||||||
return COMCTL32_Free(mp);
|
return Free(mp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -656,7 +652,7 @@ FindMRUData (HANDLE hList, LPCVOID lpData, DWORD cbData, LPINT lpRegNum)
|
||||||
if(!(mp->extview.dwFlags & MRUF_BINARY_LIST) && !mp->isUnicode) {
|
if(!(mp->extview.dwFlags & MRUF_BINARY_LIST) && !mp->isUnicode) {
|
||||||
DWORD len = WideCharToMultiByte(CP_ACP, 0, lpData, -1,
|
DWORD len = WideCharToMultiByte(CP_ACP, 0, lpData, -1,
|
||||||
NULL, 0, NULL, NULL);
|
NULL, 0, NULL, NULL);
|
||||||
dataA = COMCTL32_Alloc(len);
|
dataA = Alloc(len);
|
||||||
WideCharToMultiByte(CP_ACP, 0, lpData, -1, dataA, len, NULL, NULL);
|
WideCharToMultiByte(CP_ACP, 0, lpData, -1, dataA, len, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -674,20 +670,20 @@ FindMRUData (HANDLE hList, LPCVOID lpData, DWORD cbData, LPINT lpRegNum)
|
||||||
DWORD len = WideCharToMultiByte(CP_ACP, 0,
|
DWORD len = WideCharToMultiByte(CP_ACP, 0,
|
||||||
(LPWSTR)&mp->array[i]->datastart, -1,
|
(LPWSTR)&mp->array[i]->datastart, -1,
|
||||||
NULL, 0, NULL, NULL);
|
NULL, 0, NULL, NULL);
|
||||||
LPSTR itemA = COMCTL32_Alloc(len);
|
LPSTR itemA = Alloc(len);
|
||||||
INT cmp;
|
INT cmp;
|
||||||
WideCharToMultiByte(CP_ACP, 0, (LPWSTR)&mp->array[i]->datastart, -1,
|
WideCharToMultiByte(CP_ACP, 0, (LPWSTR)&mp->array[i]->datastart, -1,
|
||||||
itemA, len, NULL, NULL);
|
itemA, len, NULL, NULL);
|
||||||
|
|
||||||
cmp = mp->extview.lpfnCompare(dataA, itemA);
|
cmp = mp->extview.lpfnCompare(dataA, itemA);
|
||||||
COMCTL32_Free(itemA);
|
Free(itemA);
|
||||||
if(!cmp)
|
if(!cmp)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(dataA)
|
if(dataA)
|
||||||
COMCTL32_Free(dataA);
|
Free(dataA);
|
||||||
if (i < mp->cursize)
|
if (i < mp->cursize)
|
||||||
ret = i;
|
ret = i;
|
||||||
else
|
else
|
||||||
|
@ -735,17 +731,16 @@ AddMRUData (HANDLE hList, LPCVOID lpData, DWORD cbData)
|
||||||
else {
|
else {
|
||||||
/* get the oldest entry and replace data */
|
/* get the oldest entry and replace data */
|
||||||
replace = mp->realMRU[mp->cursize - 1] - 'a';
|
replace = mp->realMRU[mp->cursize - 1] - 'a';
|
||||||
COMCTL32_Free(mp->array[replace]);
|
Free(mp->array[replace]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* free up the old data */
|
/* free up the old data */
|
||||||
COMCTL32_Free(mp->array[replace]);
|
Free(mp->array[replace]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Allocate space for new item and move in the data */
|
/* Allocate space for new item and move in the data */
|
||||||
mp->array[replace] = witem = (LPWINEMRUITEM)COMCTL32_Alloc(cbData +
|
mp->array[replace] = witem = Alloc(cbData + sizeof(WINEMRUITEM));
|
||||||
sizeof(WINEMRUITEM));
|
|
||||||
witem->itemFlag |= WMRUIF_CHANGED;
|
witem->itemFlag |= WMRUIF_CHANGED;
|
||||||
witem->size = cbData;
|
witem->size = cbData;
|
||||||
memcpy( &witem->datastart, lpData, cbData);
|
memcpy( &witem->datastart, lpData, cbData);
|
||||||
|
@ -850,12 +845,12 @@ INT WINAPI
|
||||||
FindMRUStringA (HANDLE hList, LPCSTR lpszString, LPINT lpRegNum)
|
FindMRUStringA (HANDLE hList, LPCSTR lpszString, LPINT lpRegNum)
|
||||||
{
|
{
|
||||||
DWORD len = MultiByteToWideChar(CP_ACP, 0, lpszString, -1, NULL, 0);
|
DWORD len = MultiByteToWideChar(CP_ACP, 0, lpszString, -1, NULL, 0);
|
||||||
LPWSTR stringW = COMCTL32_Alloc(len * sizeof(WCHAR));
|
LPWSTR stringW = Alloc(len * sizeof(WCHAR));
|
||||||
INT ret;
|
INT ret;
|
||||||
|
|
||||||
MultiByteToWideChar(CP_ACP, 0, lpszString, -1, stringW, len);
|
MultiByteToWideChar(CP_ACP, 0, lpszString, -1, stringW, len);
|
||||||
ret = FindMRUData(hList, stringW, len * sizeof(WCHAR), lpRegNum);
|
ret = FindMRUData(hList, stringW, len * sizeof(WCHAR), lpRegNum);
|
||||||
COMCTL32_Free(stringW);
|
Free(stringW);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -875,13 +870,12 @@ HANDLE CreateMRUListLazy_common(LPWINEMRULIST mp)
|
||||||
/* get space to save indices that will turn into names
|
/* get space to save indices that will turn into names
|
||||||
* but in order of most to least recently used
|
* but in order of most to least recently used
|
||||||
*/
|
*/
|
||||||
mp->realMRU = (LPSTR) COMCTL32_Alloc(mp->extview.nMaxItems + 2);
|
mp->realMRU = Alloc(mp->extview.nMaxItems + 2);
|
||||||
|
|
||||||
/* get space to save pointers to actual data in order of
|
/* get space to save pointers to actual data in order of
|
||||||
* 'a' to 'z' (0 to n).
|
* 'a' to 'z' (0 to n).
|
||||||
*/
|
*/
|
||||||
mp->array = (LPVOID) COMCTL32_Alloc(mp->extview.nMaxItems *
|
mp->array = Alloc(mp->extview.nMaxItems * sizeof(LPVOID));
|
||||||
sizeof(LPVOID));
|
|
||||||
|
|
||||||
/* open the sub key */
|
/* open the sub key */
|
||||||
if ((err = RegCreateKeyExW( mp->extview.hKey, mp->extview.lpszSubKey,
|
if ((err = RegCreateKeyExW( mp->extview.hKey, mp->extview.lpszSubKey,
|
||||||
|
@ -923,8 +917,7 @@ HANDLE CreateMRUListLazy_common(LPWINEMRULIST mp)
|
||||||
/* not present - what to do ??? */
|
/* not present - what to do ??? */
|
||||||
ERR("Key %s not found 1\n", debugstr_w(realname));
|
ERR("Key %s not found 1\n", debugstr_w(realname));
|
||||||
}
|
}
|
||||||
mp->array[i] = witem = (LPWINEMRUITEM)COMCTL32_Alloc(datasize +
|
mp->array[i] = witem = Alloc(datasize + sizeof(WINEMRUITEM));
|
||||||
sizeof(WINEMRUITEM));
|
|
||||||
witem->size = datasize;
|
witem->size = datasize;
|
||||||
if(RegQueryValueExW( newkey, realname, 0, &type,
|
if(RegQueryValueExW( newkey, realname, 0, &type,
|
||||||
&witem->datastart, &datasize)) {
|
&witem->datastart, &datasize)) {
|
||||||
|
@ -958,10 +951,9 @@ CreateMRUListLazyW (LPCREATEMRULISTW lpcml, DWORD dwParam2, DWORD dwParam3, DWOR
|
||||||
if (lpcml->cbSize < sizeof(CREATEMRULISTW))
|
if (lpcml->cbSize < sizeof(CREATEMRULISTW))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
mp = (LPWINEMRULIST) COMCTL32_Alloc(sizeof(WINEMRULIST));
|
mp = Alloc(sizeof(WINEMRULIST));
|
||||||
memcpy(&mp->extview, lpcml, sizeof(CREATEMRULISTW));
|
memcpy(&mp->extview, lpcml, sizeof(CREATEMRULISTW));
|
||||||
mp->extview.lpszSubKey = COMCTL32_Alloc((strlenW(lpcml->lpszSubKey) + 1) *
|
mp->extview.lpszSubKey = Alloc((strlenW(lpcml->lpszSubKey) + 1) * sizeof(WCHAR));
|
||||||
sizeof(WCHAR));
|
|
||||||
strcpyW((LPWSTR)mp->extview.lpszSubKey, lpcml->lpszSubKey);
|
strcpyW((LPWSTR)mp->extview.lpszSubKey, lpcml->lpszSubKey);
|
||||||
mp->isUnicode = TRUE;
|
mp->isUnicode = TRUE;
|
||||||
|
|
||||||
|
@ -983,10 +975,10 @@ CreateMRUListLazyA (LPCREATEMRULISTA lpcml, DWORD dwParam2, DWORD dwParam3, DWOR
|
||||||
if (lpcml->cbSize < sizeof(CREATEMRULISTA))
|
if (lpcml->cbSize < sizeof(CREATEMRULISTA))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
mp = (LPWINEMRULIST) COMCTL32_Alloc(sizeof(WINEMRULIST));
|
mp = Alloc(sizeof(WINEMRULIST));
|
||||||
memcpy(&mp->extview, lpcml, sizeof(CREATEMRULISTW));
|
memcpy(&mp->extview, lpcml, sizeof(CREATEMRULISTW));
|
||||||
len = MultiByteToWideChar(CP_ACP, 0, lpcml->lpszSubKey, -1, NULL, 0);
|
len = MultiByteToWideChar(CP_ACP, 0, lpcml->lpszSubKey, -1, NULL, 0);
|
||||||
mp->extview.lpszSubKey = COMCTL32_Alloc(len * sizeof(WCHAR));
|
mp->extview.lpszSubKey = Alloc(len * sizeof(WCHAR));
|
||||||
MultiByteToWideChar(CP_ACP, 0, lpcml->lpszSubKey, -1,
|
MultiByteToWideChar(CP_ACP, 0, lpcml->lpszSubKey, -1,
|
||||||
(LPWSTR)mp->extview.lpszSubKey, len);
|
(LPWSTR)mp->extview.lpszSubKey, len);
|
||||||
mp->isUnicode = FALSE;
|
mp->isUnicode = FALSE;
|
||||||
|
@ -1146,7 +1138,7 @@ Str_SetPtrA (LPSTR *lppDest, LPCSTR lpSrc)
|
||||||
TRACE("(%p %p)\n", lppDest, lpSrc);
|
TRACE("(%p %p)\n", lppDest, lpSrc);
|
||||||
|
|
||||||
if (lpSrc) {
|
if (lpSrc) {
|
||||||
LPSTR ptr = COMCTL32_ReAlloc (*lppDest, strlen (lpSrc) + 1);
|
LPSTR ptr = ReAlloc (*lppDest, strlen (lpSrc) + 1);
|
||||||
if (!ptr)
|
if (!ptr)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
strcpy (ptr, lpSrc);
|
strcpy (ptr, lpSrc);
|
||||||
|
@ -1154,7 +1146,7 @@ Str_SetPtrA (LPSTR *lppDest, LPCSTR lpSrc)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (*lppDest) {
|
if (*lppDest) {
|
||||||
COMCTL32_Free (*lppDest);
|
Free (*lppDest);
|
||||||
*lppDest = NULL;
|
*lppDest = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1220,7 +1212,7 @@ Str_SetPtrW (LPWSTR *lppDest, LPCWSTR lpSrc)
|
||||||
|
|
||||||
if (lpSrc) {
|
if (lpSrc) {
|
||||||
INT len = strlenW (lpSrc) + 1;
|
INT len = strlenW (lpSrc) + 1;
|
||||||
LPWSTR ptr = COMCTL32_ReAlloc (*lppDest, len * sizeof(WCHAR));
|
LPWSTR ptr = ReAlloc (*lppDest, len * sizeof(WCHAR));
|
||||||
if (!ptr)
|
if (!ptr)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
strcpyW (ptr, lpSrc);
|
strcpyW (ptr, lpSrc);
|
||||||
|
@ -1228,7 +1220,7 @@ Str_SetPtrW (LPWSTR *lppDest, LPCWSTR lpSrc)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (*lppDest) {
|
if (*lppDest) {
|
||||||
COMCTL32_Free (*lppDest);
|
Free (*lppDest);
|
||||||
*lppDest = NULL;
|
*lppDest = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1305,7 +1297,7 @@ Str_SetPtrAtoW (LPWSTR *lppDest, LPCSTR lpSrc)
|
||||||
|
|
||||||
if (lpSrc) {
|
if (lpSrc) {
|
||||||
INT len = MultiByteToWideChar(CP_ACP,0,lpSrc,-1,NULL,0);
|
INT len = MultiByteToWideChar(CP_ACP,0,lpSrc,-1,NULL,0);
|
||||||
LPWSTR ptr = COMCTL32_ReAlloc (*lppDest, len*sizeof(WCHAR));
|
LPWSTR ptr = ReAlloc (*lppDest, len*sizeof(WCHAR));
|
||||||
|
|
||||||
if (!ptr)
|
if (!ptr)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -1314,7 +1306,7 @@ Str_SetPtrAtoW (LPWSTR *lppDest, LPCSTR lpSrc)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (*lppDest) {
|
if (*lppDest) {
|
||||||
COMCTL32_Free (*lppDest);
|
Free (*lppDest);
|
||||||
*lppDest = NULL;
|
*lppDest = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1348,7 +1340,7 @@ DSA_Create (INT nSize, INT nGrow)
|
||||||
|
|
||||||
TRACE("(size=%d grow=%d)\n", nSize, nGrow);
|
TRACE("(size=%d grow=%d)\n", nSize, nGrow);
|
||||||
|
|
||||||
hdsa = (HDSA)COMCTL32_Alloc (sizeof(*hdsa));
|
hdsa = Alloc (sizeof(*hdsa));
|
||||||
if (hdsa)
|
if (hdsa)
|
||||||
{
|
{
|
||||||
hdsa->nItemCount = 0;
|
hdsa->nItemCount = 0;
|
||||||
|
@ -1381,10 +1373,10 @@ DSA_Destroy (const HDSA hdsa)
|
||||||
if (!hdsa)
|
if (!hdsa)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (hdsa->pData && (!COMCTL32_Free (hdsa->pData)))
|
if (hdsa->pData && (!Free (hdsa->pData)))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
return COMCTL32_Free (hdsa);
|
return Free (hdsa);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1492,7 +1484,7 @@ DSA_SetItem (const HDSA hdsa, INT nIndex, LPVOID pSrc)
|
||||||
hdsa->nGrow * ((INT)(((nIndex + 1) - 1) / hdsa->nGrow) + 1);
|
hdsa->nGrow * ((INT)(((nIndex + 1) - 1) / hdsa->nGrow) + 1);
|
||||||
nSize = hdsa->nItemSize * nNewItems;
|
nSize = hdsa->nItemSize * nNewItems;
|
||||||
|
|
||||||
lpTemp = (LPVOID)COMCTL32_ReAlloc (hdsa->pData, nSize);
|
lpTemp = ReAlloc (hdsa->pData, nSize);
|
||||||
if (!lpTemp)
|
if (!lpTemp)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -1545,7 +1537,7 @@ DSA_InsertItem (const HDSA hdsa, INT nIndex, LPVOID pSrc)
|
||||||
nNewItems = hdsa->nMaxCount + hdsa->nGrow;
|
nNewItems = hdsa->nMaxCount + hdsa->nGrow;
|
||||||
nSize = hdsa->nItemSize * nNewItems;
|
nSize = hdsa->nItemSize * nNewItems;
|
||||||
|
|
||||||
lpTemp = (LPVOID)COMCTL32_ReAlloc (hdsa->pData, nSize);
|
lpTemp = ReAlloc (hdsa->pData, nSize);
|
||||||
if (!lpTemp)
|
if (!lpTemp)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
@ -1615,7 +1607,7 @@ DSA_DeleteItem (const HDSA hdsa, INT nIndex)
|
||||||
if ((hdsa->nMaxCount - hdsa->nItemCount) >= hdsa->nGrow) {
|
if ((hdsa->nMaxCount - hdsa->nItemCount) >= hdsa->nGrow) {
|
||||||
nSize = hdsa->nItemSize * hdsa->nItemCount;
|
nSize = hdsa->nItemSize * hdsa->nItemCount;
|
||||||
|
|
||||||
lpDest = (LPVOID)COMCTL32_ReAlloc (hdsa->pData, nSize);
|
lpDest = ReAlloc (hdsa->pData, nSize);
|
||||||
if (!lpDest)
|
if (!lpDest)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
@ -1647,7 +1639,7 @@ DSA_DeleteAllItems (const HDSA hdsa)
|
||||||
|
|
||||||
if (!hdsa)
|
if (!hdsa)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (hdsa->pData && (!COMCTL32_Free (hdsa->pData)))
|
if (hdsa->pData && (!Free (hdsa->pData)))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
hdsa->nItemCount = 0;
|
hdsa->nItemCount = 0;
|
||||||
|
@ -1681,13 +1673,12 @@ DPA_Create (INT nGrow)
|
||||||
|
|
||||||
TRACE("(%d)\n", nGrow);
|
TRACE("(%d)\n", nGrow);
|
||||||
|
|
||||||
hdpa = (HDPA)COMCTL32_Alloc (sizeof(*hdpa));
|
hdpa = Alloc (sizeof(*hdpa));
|
||||||
if (hdpa) {
|
if (hdpa) {
|
||||||
hdpa->nGrow = max(8, nGrow);
|
hdpa->nGrow = max(8, nGrow);
|
||||||
hdpa->hHeap = COMCTL32_hHeap;
|
hdpa->hHeap = COMCTL32_hHeap;
|
||||||
hdpa->nMaxCount = hdpa->nGrow * 2;
|
hdpa->nMaxCount = hdpa->nGrow * 2;
|
||||||
hdpa->ptrs =
|
hdpa->ptrs = Alloc (hdpa->nMaxCount * sizeof(LPVOID));
|
||||||
(LPVOID*)COMCTL32_Alloc (hdpa->nMaxCount * sizeof(LPVOID));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("-- %p\n", hdpa);
|
TRACE("-- %p\n", hdpa);
|
||||||
|
@ -2257,7 +2248,7 @@ DPA_CreateEx (INT nGrow, HANDLE hHeap)
|
||||||
if (hHeap)
|
if (hHeap)
|
||||||
hdpa = (HDPA)HeapAlloc (hHeap, HEAP_ZERO_MEMORY, sizeof(*hdpa));
|
hdpa = (HDPA)HeapAlloc (hHeap, HEAP_ZERO_MEMORY, sizeof(*hdpa));
|
||||||
else
|
else
|
||||||
hdpa = (HDPA)COMCTL32_Alloc (sizeof(*hdpa));
|
hdpa = Alloc (sizeof(*hdpa));
|
||||||
|
|
||||||
if (hdpa) {
|
if (hdpa) {
|
||||||
hdpa->nGrow = min(8, nGrow);
|
hdpa->nGrow = min(8, nGrow);
|
||||||
|
@ -2347,9 +2338,7 @@ DoNotify (LPNOTIFYDATA lpNotify, UINT uCode, LPNMHDR lpHdr)
|
||||||
* Failure: 0
|
* Failure: 0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LRESULT WINAPI
|
LRESULT WINAPI SendNotify (HWND hwndTo, HWND hwndFrom, UINT uCode, LPNMHDR lpHdr)
|
||||||
COMCTL32_SendNotify (HWND hwndTo, HWND hwndFrom,
|
|
||||||
UINT uCode, LPNMHDR lpHdr)
|
|
||||||
{
|
{
|
||||||
NOTIFYDATA notify;
|
NOTIFYDATA notify;
|
||||||
|
|
||||||
|
@ -2380,8 +2369,7 @@ COMCTL32_SendNotify (HWND hwndTo, HWND hwndFrom,
|
||||||
* Failure: 0
|
* Failure: 0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LRESULT WINAPI
|
LRESULT WINAPI SendNotifyEx (HWND hwndTo, HWND hwndFrom, UINT uCode,
|
||||||
COMCTL32_SendNotifyEx (HWND hwndTo, HWND hwndFrom, UINT uCode,
|
|
||||||
LPNMHDR lpHdr, DWORD dwParam5)
|
LPNMHDR lpHdr, DWORD dwParam5)
|
||||||
{
|
{
|
||||||
NOTIFYDATA notify;
|
NOTIFYDATA notify;
|
||||||
|
@ -2413,8 +2401,7 @@ COMCTL32_SendNotifyEx (HWND hwndTo, HWND hwndFrom, UINT uCode,
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LPSTR WINAPI
|
LPSTR WINAPI StrChrA (LPCSTR lpString, CHAR cChar)
|
||||||
COMCTL32_StrChrA (LPCSTR lpString, CHAR cChar)
|
|
||||||
{
|
{
|
||||||
return strchr (lpString, cChar);
|
return strchr (lpString, cChar);
|
||||||
}
|
}
|
||||||
|
@ -2424,8 +2411,7 @@ COMCTL32_StrChrA (LPCSTR lpString, CHAR cChar)
|
||||||
* StrStrIA [COMCTL32.355]
|
* StrStrIA [COMCTL32.355]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LPSTR WINAPI
|
LPSTR WINAPI StrStrIA (LPCSTR lpStr1, LPCSTR lpStr2)
|
||||||
COMCTL32_StrStrIA (LPCSTR lpStr1, LPCSTR lpStr2)
|
|
||||||
{
|
{
|
||||||
INT len1, len2, i;
|
INT len1, len2, i;
|
||||||
CHAR first;
|
CHAR first;
|
||||||
|
@ -2456,8 +2442,7 @@ COMCTL32_StrStrIA (LPCSTR lpStr1, LPCSTR lpStr2)
|
||||||
* StrToIntA [COMCTL32.357] Converts a string to a signed integer.
|
* StrToIntA [COMCTL32.357] Converts a string to a signed integer.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
INT WINAPI
|
INT WINAPI StrToIntA (LPSTR lpString)
|
||||||
COMCTL32_StrToIntA (LPSTR lpString)
|
|
||||||
{
|
{
|
||||||
return atoi(lpString);
|
return atoi(lpString);
|
||||||
}
|
}
|
||||||
|
@ -2466,8 +2451,7 @@ COMCTL32_StrToIntA (LPSTR lpString)
|
||||||
* StrStrIW [COMCTL32.363]
|
* StrStrIW [COMCTL32.363]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LPWSTR WINAPI
|
LPWSTR WINAPI StrStrIW (LPCWSTR lpStr1, LPCWSTR lpStr2)
|
||||||
COMCTL32_StrStrIW (LPCWSTR lpStr1, LPCWSTR lpStr2)
|
|
||||||
{
|
{
|
||||||
INT len1, len2, i;
|
INT len1, len2, i;
|
||||||
WCHAR first;
|
WCHAR first;
|
||||||
|
@ -2498,8 +2482,7 @@ COMCTL32_StrStrIW (LPCWSTR lpStr1, LPCWSTR lpStr2)
|
||||||
* StrToIntW [COMCTL32.365] Converts a wide char string to a signed integer.
|
* StrToIntW [COMCTL32.365] Converts a wide char string to a signed integer.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
INT WINAPI
|
INT WINAPI StrToIntW (LPWSTR lpString)
|
||||||
COMCTL32_StrToIntW (LPWSTR lpString)
|
|
||||||
{
|
{
|
||||||
return atoiW(lpString);
|
return atoiW(lpString);
|
||||||
}
|
}
|
||||||
|
@ -2627,7 +2610,8 @@ DSA_DestroyCallback (HDSA hdsa, PFNDSAENUMCALLBACK enumProc, LPVOID lParam)
|
||||||
* StrCSpnA [COMCTL32.356]
|
* StrCSpnA [COMCTL32.356]
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
INT WINAPI COMCTL32_StrCSpnA( LPCSTR lpStr, LPCSTR lpSet) {
|
INT WINAPI StrCSpnA( LPCSTR lpStr, LPCSTR lpSet)
|
||||||
|
{
|
||||||
return strcspn(lpStr, lpSet);
|
return strcspn(lpStr, lpSet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2635,7 +2619,8 @@ INT WINAPI COMCTL32_StrCSpnA( LPCSTR lpStr, LPCSTR lpSet) {
|
||||||
* StrChrW [COMCTL32.358]
|
* StrChrW [COMCTL32.358]
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
LPWSTR WINAPI COMCTL32_StrChrW( LPCWSTR lpStart, WORD wMatch) {
|
LPWSTR WINAPI StrChrW( LPCWSTR lpStart, WORD wMatch)
|
||||||
|
{
|
||||||
return strchrW(lpStart, wMatch);
|
return strchrW(lpStart, wMatch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2643,7 +2628,8 @@ LPWSTR WINAPI COMCTL32_StrChrW( LPCWSTR lpStart, WORD wMatch) {
|
||||||
* StrCmpNA [COMCTL32.352]
|
* StrCmpNA [COMCTL32.352]
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
INT WINAPI COMCTL32_StrCmpNA( LPCSTR lpStr1, LPCSTR lpStr2, int nChar) {
|
INT WINAPI StrCmpNA( LPCSTR lpStr1, LPCSTR lpStr2, int nChar)
|
||||||
|
{
|
||||||
return strncmp(lpStr1, lpStr2, nChar);
|
return strncmp(lpStr1, lpStr2, nChar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2651,7 +2637,8 @@ INT WINAPI COMCTL32_StrCmpNA( LPCSTR lpStr1, LPCSTR lpStr2, int nChar) {
|
||||||
* StrCmpNIA [COMCTL32.353]
|
* StrCmpNIA [COMCTL32.353]
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
INT WINAPI COMCTL32_StrCmpNIA( LPCSTR lpStr1, LPCSTR lpStr2, int nChar) {
|
INT WINAPI StrCmpNIA( LPCSTR lpStr1, LPCSTR lpStr2, int nChar)
|
||||||
|
{
|
||||||
return strncasecmp(lpStr1, lpStr2, nChar);
|
return strncasecmp(lpStr1, lpStr2, nChar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2659,7 +2646,8 @@ INT WINAPI COMCTL32_StrCmpNIA( LPCSTR lpStr1, LPCSTR lpStr2, int nChar) {
|
||||||
* StrCmpNW [COMCTL32.360]
|
* StrCmpNW [COMCTL32.360]
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
INT WINAPI COMCTL32_StrCmpNW( LPCWSTR lpStr1, LPCWSTR lpStr2, int nChar) {
|
INT WINAPI StrCmpNW( LPCWSTR lpStr1, LPCWSTR lpStr2, int nChar)
|
||||||
|
{
|
||||||
return strncmpW(lpStr1, lpStr2, nChar);
|
return strncmpW(lpStr1, lpStr2, nChar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2667,7 +2655,8 @@ INT WINAPI COMCTL32_StrCmpNW( LPCWSTR lpStr1, LPCWSTR lpStr2, int nChar) {
|
||||||
* StrCmpNIW [COMCTL32.361]
|
* StrCmpNIW [COMCTL32.361]
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
INT WINAPI COMCTL32_StrCmpNIW( LPCWSTR lpStr1, LPCWSTR lpStr2, int nChar) {
|
INT WINAPI StrCmpNIW( LPCWSTR lpStr1, LPCWSTR lpStr2, int nChar)
|
||||||
|
{
|
||||||
FIXME("(%s, %s, %i): stub\n", debugstr_w(lpStr1), debugstr_w(lpStr2), nChar);
|
FIXME("(%s, %s, %i): stub\n", debugstr_w(lpStr1), debugstr_w(lpStr2), nChar);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -2676,7 +2665,7 @@ INT WINAPI COMCTL32_StrCmpNIW( LPCWSTR lpStr1, LPCWSTR lpStr2, int nChar) {
|
||||||
* StrRChrA [COMCTL32.351]
|
* StrRChrA [COMCTL32.351]
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
LPSTR WINAPI COMCTL32_StrRChrA( LPCSTR lpStart, LPCSTR lpEnd, WORD wMatch )
|
LPSTR WINAPI StrRChrA( LPCSTR lpStart, LPCSTR lpEnd, WORD wMatch )
|
||||||
{
|
{
|
||||||
LPCSTR lpGotIt = NULL;
|
LPCSTR lpGotIt = NULL;
|
||||||
BOOL dbcs = IsDBCSLeadByte( LOBYTE(wMatch) );
|
BOOL dbcs = IsDBCSLeadByte( LOBYTE(wMatch) );
|
||||||
|
@ -2699,7 +2688,7 @@ LPSTR WINAPI COMCTL32_StrRChrA( LPCSTR lpStart, LPCSTR lpEnd, WORD wMatch )
|
||||||
* StrRChrW [COMCTL32.359]
|
* StrRChrW [COMCTL32.359]
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
LPWSTR WINAPI COMCTL32_StrRChrW( LPCWSTR lpStart, LPCWSTR lpEnd, WORD wMatch)
|
LPWSTR WINAPI StrRChrW( LPCWSTR lpStart, LPCWSTR lpEnd, WORD wMatch)
|
||||||
{
|
{
|
||||||
LPCWSTR lpGotIt = NULL;
|
LPCWSTR lpGotIt = NULL;
|
||||||
|
|
||||||
|
@ -2717,7 +2706,8 @@ LPWSTR WINAPI COMCTL32_StrRChrW( LPCWSTR lpStart, LPCWSTR lpEnd, WORD wMatch)
|
||||||
* StrStrA [COMCTL32.354]
|
* StrStrA [COMCTL32.354]
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
LPSTR WINAPI COMCTL32_StrStrA( LPCSTR lpFirst, LPCSTR lpSrch) {
|
LPSTR WINAPI StrStrA( LPCSTR lpFirst, LPCSTR lpSrch)
|
||||||
|
{
|
||||||
return strstr(lpFirst, lpSrch);
|
return strstr(lpFirst, lpSrch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2725,7 +2715,8 @@ LPSTR WINAPI COMCTL32_StrStrA( LPCSTR lpFirst, LPCSTR lpSrch) {
|
||||||
* StrStrW [COMCTL32.362]
|
* StrStrW [COMCTL32.362]
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
LPWSTR WINAPI COMCTL32_StrStrW( LPCWSTR lpFirst, LPCWSTR lpSrch) {
|
LPWSTR WINAPI StrStrW( LPCWSTR lpFirst, LPCWSTR lpSrch)
|
||||||
|
{
|
||||||
return strstrW(lpFirst, lpSrch);
|
return strstrW(lpFirst, lpSrch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2733,7 +2724,8 @@ LPWSTR WINAPI COMCTL32_StrStrW( LPCWSTR lpFirst, LPCWSTR lpSrch) {
|
||||||
* StrSpnW [COMCTL32.364]
|
* StrSpnW [COMCTL32.364]
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
INT WINAPI COMCTL32_StrSpnW( LPWSTR lpStr, LPWSTR lpSet) {
|
INT WINAPI StrSpnW( LPWSTR lpStr, LPWSTR lpSet)
|
||||||
|
{
|
||||||
LPWSTR lpLoop = lpStr;
|
LPWSTR lpLoop = lpStr;
|
||||||
|
|
||||||
/* validate ptr */
|
/* validate ptr */
|
||||||
|
|
Loading…
Reference in New Issue