source: trunk/src/shell32/misc.cpp@ 21494

Last change on this file since 21494 was 21494, checked in by dmik, 15 years ago

Fixed broken build after r21492 by sorting out a huuuuge wagon of duplicates, wrong include order and other dirty mess.

File size: 10.4 KB
Line 
1/* $Id: misc.cpp,v 1.13 2002-06-09 12:41:21 sandervl Exp $ */
2
3/*
4 * Win32 SHELL32 for OS/2
5 * 1998/06/15 Patrick Haller (haller@zebra.fh-weingarten.de)
6 * Copyright 1997 Marcus Meissner
7 * Copyright 1988 Patrick Haller (adapted for win32os2)
8 * Project Odin Software License can be found in LICENSE.TXT
9 *
10 */
11
12
13/*****************************************************************************
14 * Includes *
15 *****************************************************************************/
16
17#include <odin.h>
18#include <odinwrap.h>
19#include <os2sel.h>
20
21#include <wchar.h>
22#include <wcstr.h>
23
24#define CINTERFACE
25
26//#include <os2win.h>
27#include <shellapi.h>
28#include <winnls.h>
29#include "shell32_main.h"
30#include "undocshell.h"
31#include <misc.h>
32#include <unicode.h>
33//#include <string.h>
34//#include "winbase.h"
35#include <heapstring.h>
36
37/*****************************************************************************
38 * Types & Defines *
39 *****************************************************************************/
40
41ODINDEBUGCHANNEL(SHELL32-MISC)
42
43
44/* exported via shell32_main.h */
45HRESULT (WINAPI* pOleInitialize)(LPVOID reserved);
46void (WINAPI* pOleUninitialize)(void);
47HRESULT (WINAPI* pRegisterDragDrop)(HWND hwnd, IDropTarget* pDropTarget);
48HRESULT (WINAPI* pRevokeDragDrop)(HWND hwnd);
49HRESULT (WINAPI* pDoDragDrop)(LPDATAOBJECT,LPDROPSOURCE,DWORD,DWORD*);
50void (WINAPI* pReleaseStgMedium)(STGMEDIUM* pmedium);
51HRESULT (WINAPI* pOleSetClipboard)(IDataObject* pDataObj);
52HRESULT (WINAPI* pOleGetClipboard)(IDataObject** ppDataObj);
53
54BOOL SHELL_OsIsUnicode(void)
55{
56 static version = 0;
57
58 if(version == 0) {
59 version = GetVersion();
60 }
61 /* if high-bit of version is 0, we are emulating NT */
62 return !(version & 0x80000000);
63}
64
65/*****************************************************************************
66 * Name : ExtractAssociatedIconExA
67 * Purpose : Return icon for given file (either from file itself or from associated
68 * executable) and patch parameters if needed.
69 * Parameters: ???
70 * Variables :
71 * Result :
72 * Remark : SHELL.150
73 * Status : UNTESTED UNKNOWN STUB
74 *
75 * Author : Christoph Bratschi [Fri, 1999/08/6 20:00]
76 *****************************************************************************/
77
78HICON WIN32API ExtractAssociatedIconExA(HINSTANCE hInst, LPSTR lpIconPath,
79 LPWORD lpiIcon)
80{
81 dprintf(("SHELL32: undoc ExtractAssociatedIconExA\n"));
82
83 return ExtractAssociatedIconA(hInst,lpIconPath,lpiIcon);
84}
85
86/*****************************************************************************
87 * Name : ExtractAssociatedIconW
88 * Purpose : Return icon for given file (either from file itself or from associated
89 * executable) and patch parameters if needed.
90 * Parameters:
91 * Variables :
92 * Result :
93 * Remark : SHELL.36
94 * Status : UNTESTED STUB
95 *
96 * Author : Patrick Haller [Sat, 1998/07/11 11:55]
97 *****************************************************************************/
98
99HICON WIN32API ExtractAssociatedIconW(HINSTANCE hInst, LPWSTR lpIconPath,
100 LPWORD lpiIcon)
101{
102 LPSTR lpIconPathAscii = UnicodeToAsciiString(lpIconPath);
103 HICON hIcon;
104
105 hIcon = ExtractAssociatedIconA(hInst,
106 lpIconPathAscii,
107 lpiIcon);
108
109 FreeAsciiString(lpIconPathAscii);
110
111 return (hIcon);
112}
113
114/*****************************************************************************
115 * Name : ExtractAssociatedIconExW
116 * Purpose : Return icon for given file (either from file itself or from associated
117 * executable) and patch parameters if needed.
118 * Parameters: ???
119 * Variables :
120 * Result :
121 * Remark : SHELL.186
122 * Status : UNTESTED UNKNOWN STUB
123 *
124 * Author : Christoph Bratschi [Fri, 1999/08/6 20:00]
125 *****************************************************************************/
126
127HICON WIN32API ExtractAssociatedIconExW(HINSTANCE hInst, LPWSTR lpIconPath,
128 LPWORD lpiIcon)
129{
130 dprintf(("SHELL32: undoc ExtractAssociatedIconExW\n"));
131
132 return ExtractAssociatedIconW(hInst,lpIconPath,lpiIcon);
133}
134
135
136/*****************************************************************************
137 * Name : OleStrToStrN
138 * Purpose :
139 * Parameters:
140 * Variables :
141 * Result :
142 * Remark : SHELL32.78
143 * Status : UNTESTED UNKNOWN STUB
144 *
145 * Author : Patrick Haller [Tue, 1998/06/15 03:00]
146 *****************************************************************************/
147
148BOOL WIN32API OleStrToStrN(LPSTR lpMulti, INT nMulti, LPCWSTR lpWide,
149 INT nWide)
150{
151 return WideCharToMultiByte (0,
152 0,
153 lpWide,
154 nWide,
155 lpMulti,
156 nMulti,
157 NULL,
158 NULL);
159}
160
161
162/*****************************************************************************
163 * Name : StrToOleStrN
164 * Purpose :
165 * Parameters:
166 * Variables :
167 * Result :
168 * Remark : SHELL32.79
169 * Status : UNTESTED UNKNOWN STUB
170 *
171 * Author : Patrick Haller [Tue, 1998/06/15 03:00]
172 *****************************************************************************/
173
174BOOL WIN32API StrToOleStrN(LPWSTR lpWide, INT nWide, LPCSTR lpMulti,
175 INT nMulti)
176{
177 return MultiByteToWideChar (0,
178 0,
179 lpMulti,
180 nMulti,
181 lpWide,
182 nWide);
183}
184
185
186/*****************************************************************************
187 * Name : SHELL32_654
188 * Purpose :
189 * Parameters:
190 * Variables :
191 * Result :
192 * Remark : SHELL32.654
193 * Status : UNTESTED UNKNOWN STUB
194 *
195 * Author : Patrick Haller [Tue, 1998/06/15 03:00]
196 *****************************************************************************/
197
198HRESULT WIN32API SHELL32_654(DWORD x, DWORD y)
199{
200 dprintf(("SHELL32: SHELL32_654(%08xh,%08xh) not implemented.\n",
201 x,
202 y));
203 return 0;
204}
205
206
207/*****************************************************************************
208 * Name : StrToOleStr
209 * Purpose :
210 * Parameters:
211 * Variables :
212 * Result :
213 * Remark : SHELL32.163
214 * Status : UNTESTED UNKNOWN STUB
215 *
216 * Author : Patrick Haller [Tue, 1998/06/15 03:00]
217 *****************************************************************************/
218
219int WIN32API StrToOleStr(LPWSTR lpWideCharStr, LPCSTR lpMultiByteString)
220{
221 return MultiByteToWideChar(0,
222 0,
223 lpMultiByteString,
224 -1,
225 lpWideCharStr,
226 MAX_PATH);
227}
228
229/*****************************************************************************
230 * Name : InternalExtractIconListA
231 * Purpose :
232 * Parameters: ???
233 * Variables :
234 * Result :
235 * Remark : SHELL32.221 - used by progman.exe
236 * Status : UNTESTED UNKNOWN STUB
237 *
238 * Author : Christoph Bratschi [Fri, 1999/08/6 19:00]
239 *****************************************************************************/
240
241DWORD WIN32API InternalExtractIconListA(DWORD dwArg1)
242{
243 dprintf(("SHELL32: undoc InternalExtractIconListA \n"));
244 return 0;
245}
246
247/*****************************************************************************
248 * Name : InternalExtractIconListW
249 * Purpose :
250 * Parameters: ???
251 * Variables :
252 * Result :
253 * Remark : SHELL32.222 - used by progman.exe
254 * Status : UNTESTED UNKNOWN STUB
255 *
256 * Author : Christoph Bratschi [Fri, 1999/08/6 19:00]
257 *****************************************************************************/
258
259DWORD WIN32API InternalExtractIconListW(DWORD dwArg1)
260{
261 dprintf(("SHELL32: undoc InternalExtractIconListW\n"));
262 return 0;
263}
264
265/*****************************************************************************
266 * Name : ExtractIconResInfoA
267 * Purpose :
268 * Parameters: ???
269 * Variables :
270 * Result :
271 * Remark : SHELL32.192 - used by progman.exe
272 * Status : UNTESTED UNKNOWN STUB
273 *
274 * Author : Christoph Bratschi [Fri, 1999/08/6 19:00]
275 *****************************************************************************/
276
277DWORD WIN32API ExtractIconResInfoA(DWORD dwArg1)
278{
279 dprintf(("SHELL32: undoc ExtractIconResInfoA\n"));
280 return 0;
281}
282
283/*****************************************************************************
284 * Name : ExtractIconResInfoW
285 * Purpose :
286 * Parameters: ???
287 * Variables :
288 * Result :
289 * Remark : SHELL32.193 - used by progman.exe
290 * Status : UNTESTED UNKNOWN STUB
291 *
292 * Author : Christoph Bratschi [Fri, 1999/08/6 19:00]
293 *****************************************************************************/
294
295DWORD WIN32API ExtractIconResInfoW( DWORD dwArg1)
296{
297 dprintf(("SHELL32: undoc ExtractIconResInfoW\n"));
298 return 0;
299}
300
301/*****************************************************************************
302 * Name : CheckEscapesA
303 * Purpose :
304 * Parameters: ???
305 * Variables :
306 * Result :
307 * Remark : SHELL32.3 - used by progman.exe
308 * Status : UNTESTED UNKNOWN STUB
309 *
310 * Author : Christoph Bratschi [Fri, 1999/08/6 19:00]
311 *****************************************************************************/
312
313void WIN32API CheckEscapesA(DWORD x1, DWORD x2)
314{
315 dprintf(("SHELL32: undoc CheckEscapesA\n"));
316}
317
318/*****************************************************************************
319 * Name : CheckEscapesW
320 * Purpose :
321 * Parameters: ???
322 * Variables :
323 * Result :
324 * Remark : SHELL32.6 - used by progman.exe
325 * Status : UNTESTED UNKNOWN STUB
326 *
327 * Author : Christoph Bratschi [Fri, 1999/08/6 19:00]
328 *****************************************************************************/
329
330void WIN32API CheckEscapesW(DWORD x1, DWORD x2)
331{
332 dprintf(("SHELL32: undoc CheckEscapesW\n"));
333}
334
335/*****************************************************************************
336 * Name : DuplicateIcon
337 * Purpose :
338 * Parameters: ???
339 * Variables :
340 * Result :
341 * Remark : SHELL32.138 - used by progman.exe
342 * Status : UNTESTED UNKNOWN STUB
343 *
344 * Author : Christoph Bratschi [Fri, 1999/08/6 19:00]
345 *****************************************************************************/
346
347DWORD WIN32API DuplicateIcon(DWORD x1)
348{
349 dprintf(("SHELL32: undoc DuplicateIcon\n"));
350
351 return 0;
352}
353
354
Note: See TracBrowser for help on using the repository browser.