mirror of
https://github.com/reactos/wine.git
synced 2024-11-28 22:20:26 +00:00
oleview: Added data freeing in TypeLib Viewer.
This commit is contained in:
parent
928966ddad
commit
0260b26962
@ -560,6 +560,36 @@ void UpdateTypeLibStatusBar(int itemID)
|
||||
SendMessage(typelib.hStatusBar, SB_SETTEXT, 0, (LPARAM)info);
|
||||
}
|
||||
|
||||
void EmptyTLTree(void)
|
||||
{
|
||||
HTREEITEM cur, del;
|
||||
TVITEM tvi;
|
||||
|
||||
tvi.mask = TVIF_PARAM;
|
||||
cur = TreeView_GetChild(typelib.hTree, TVI_ROOT);
|
||||
|
||||
while(TRUE)
|
||||
{
|
||||
del = cur;
|
||||
cur = TreeView_GetChild(typelib.hTree, del);
|
||||
|
||||
if(!cur) cur = TreeView_GetNextSibling(typelib.hTree, del);
|
||||
if(!cur) cur = TreeView_GetParent(typelib.hTree, del);
|
||||
|
||||
tvi.hItem = del;
|
||||
SendMessage(typelib.hTree, TVM_GETITEM, 0, (LPARAM)&tvi);
|
||||
if(tvi.lParam)
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, ((TYPELIB_DATA *)tvi.lParam)->idl);
|
||||
HeapFree(GetProcessHeap(), 0, (TYPELIB_DATA *)tvi.lParam);
|
||||
}
|
||||
|
||||
SendMessage(typelib.hTree, TVM_DELETEITEM, 0, (LPARAM)del);
|
||||
|
||||
if(!cur) break;
|
||||
}
|
||||
}
|
||||
|
||||
LRESULT CALLBACK TypeLibProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch(uMsg)
|
||||
@ -596,6 +626,7 @@ LRESULT CALLBACK TypeLibProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
TypeLibResizeChild();
|
||||
break;
|
||||
case WM_DESTROY:
|
||||
EmptyTLTree();
|
||||
break;
|
||||
default:
|
||||
return DefWindowProc(hWnd, uMsg, wParam, lParam);
|
||||
|
Loading…
Reference in New Issue
Block a user