secur32: Copy helper buffer to output buffer before reusing helper buffer.
[wine.git] / programs / oleview / main.h
blobd9f4a75547bb69b52ec3ab948380c1ab13905cbf
1 /*
2 * OleView (main.h)
4 * Copyright 2006 Piotr Caban
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #define COBJMACROS
23 #ifdef NONAMELESSUNION
24 # define U(x) (x).u
25 #else
26 # define U(x) (x)
27 #endif
29 #include <windows.h>
30 #include <winreg.h>
31 #include <commctrl.h>
32 #include <unknwn.h>
34 #include "resource.h"
36 #define MAX_LOAD_STRING 256
37 #define MAX_WINDOW_WIDTH 30000
39 #define STATUS_WINDOW 2000
40 #define TREE_WINDOW 2001
41 #define TAB_WINDOW 2002
42 #define TYPELIB_TREE 2003
44 /*ItemInfo flags */
45 #define REGTOP 1
46 #define REGPATH 2
47 #define SHOWALL 4
48 #define INTERFACE 8
50 typedef struct
52 HWND hMainWnd;
53 HWND hPaneWnd;
54 HWND hStatusBar;
55 HWND hToolBar;
56 HWND hTree;
57 HWND hDetails;
58 HWND hTypeLibWnd;
59 HINSTANCE hMainInst;
60 BOOL bExpert;
61 DWORD dwClsCtx;
62 WCHAR wszMachineName[MAX_LOAD_STRING];
63 }GLOBALS;
65 typedef struct
67 HWND left;
68 HWND right;
69 INT pos;
70 INT size;
71 INT width;
72 INT height;
73 INT last;
74 }PANE;
76 typedef struct
78 /* Main TreeView entries: */
79 HTREEITEM hOC; /* Object Classes */
80 HTREEITEM hGBCC; /* Grouped by Component Category */
81 HTREEITEM hO1O; /* OLE 1.0 Objects */
82 HTREEITEM hCLO; /* COM Library Objects */
83 HTREEITEM hAO; /* All Objects */
84 HTREEITEM hAID; /* Application IDs */
85 HTREEITEM hTL; /* Type Libraries */
86 HTREEITEM hI; /* Interfaces */
87 }TREE;
89 typedef struct
91 CHAR cFlag;
92 WCHAR info[MAX_LOAD_STRING];
93 WCHAR clsid[MAX_LOAD_STRING];
94 WCHAR path[MAX_LOAD_STRING];
95 BOOL loaded;
96 IUnknown *pU;
97 }ITEM_INFO;
99 typedef struct
101 HWND hStatic;
102 HWND hTab;
103 HWND hReg;
104 }DETAILS;
106 typedef struct
108 HWND hPaneWnd;
109 HWND hTree;
110 HWND hEdit;
111 HWND hStatusBar;
112 WCHAR wszFileName[MAX_LOAD_STRING];
113 }TYPELIB;
115 typedef struct
117 WCHAR *idl;
118 WCHAR wszInsertAfter[MAX_LOAD_STRING];
119 INT idlLen;
120 }TYPELIB_DATA;
122 extern GLOBALS globals;
123 extern TREE tree;
124 extern TYPELIB typelib;
126 /* Predefinitions: */
127 /* details.c */
128 HWND CreateDetailsWindow(HINSTANCE hInst);
129 void RefreshDetails(HTREEITEM item);
131 /* oleview.c */
132 void RefreshMenu(HTREEITEM item);
134 /* pane.c */
135 BOOL CreatePanedWindow(HWND hWnd, HWND *hWndCreated, HINSTANCE hInst);
136 BOOL PaneRegisterClass(void);
137 void SetLeft(HWND hParent, HWND hWnd);
138 void SetRight(HWND hParent, HWND hWnd);
140 /* tree.c */
141 void EmptyTree(void);
142 void AddTreeEx(void);
143 void AddTree(void);
144 HWND CreateTreeWindow(HINSTANCE hInst);
145 BOOL CreateRegPath(HTREEITEM item, WCHAR *buffer, int bufSize);
146 void CreateInst(HTREEITEM item, WCHAR *wszMachineName);
147 void ReleaseInst(HTREEITEM item);
149 /* typelib.c */
150 BOOL CreateTypeLibWindow(HINSTANCE hInst, WCHAR *wszFileName);
151 BOOL TypeLibRegisterClass(void);
152 void UpdateData(HTREEITEM item);
154 /* interface.c */
155 BOOL IsInterface(HTREEITEM item);
156 void InterfaceViewer(HTREEITEM item);