4 * Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 extern DWORD WINAPI
BrowserThreadProc(LPVOID lpThreadParameter
);
25 /*************************************************************************
26 * InitOCHostClass [BROWSEUI.101]
28 extern "C" void WINAPI
InitOCHostClass(long param8
)
30 // forwards to shdocvw
33 /*************************************************************************
34 * SHOpenFolderWindow [BROWSEUI.102]
36 extern "C" long WINAPI
SHOpenFolderWindow(IEThreadParamBlock
*param8
)
41 /*************************************************************************
42 * SHCreateSavedWindows [BROWSEUI.105]
43 * Called to recreate explorer windows from previous session
45 extern "C" void WINAPI
SHCreateSavedWindows()
49 /*************************************************************************
50 * SHCreateFromDesktop [BROWSEUI.106]
51 * parameter is a FolderInfo
53 extern "C" long WINAPI
SHCreateFromDesktop(long param8
)
58 /*************************************************************************
59 * SHExplorerParseCmdLine [BROWSEUI.107]
61 extern "C" long WINAPI
SHExplorerParseCmdLine(LPCTSTR commandLine
)
66 /*************************************************************************
67 * UEMRegisterNotify [BROWSEUI.118]
69 extern "C" void WINAPI
UEMRegisterNotify(long param8
, long paramC
)
73 /*************************************************************************
74 * SHCreateBandForPidl [BROWSEUI.120]
76 extern "C" HRESULT WINAPI
SHCreateBandForPidl(LPCITEMIDLIST param8
, IUnknown
*paramC
, BOOL param10
)
81 /*************************************************************************
82 * SHPidlFromDataObject [BROWSEUI.121]
84 extern "C" HRESULT WINAPI
SHPidlFromDataObject(IDataObject
*param8
, long *paramC
, long param10
, FILEDESCRIPTORW
*param14
)
89 /*************************************************************************
90 * IDataObject_GetDeskBandState [BROWSEUI.122]
92 extern "C" long WINAPI
IDataObject_GetDeskBandState(long param8
)
97 /*************************************************************************
98 * SHCreateIETHREADPARAM [BROWSEUI.123]
100 extern "C" IEThreadParamBlock
*WINAPI
SHCreateIETHREADPARAM(
101 long param8
, long paramC
, IUnknown
*param10
, IUnknown
*param14
)
103 IEThreadParamBlock
*result
;
105 result
= (IEThreadParamBlock
*)LocalAlloc(LMEM_ZEROINIT
, 256);
108 result
->offset0
= param8
;
109 result
->offset8
= paramC
;
110 result
->offsetC
= param10
;
113 result
->offset14
= param14
;
119 /*************************************************************************
120 * SHCloneIETHREADPARAM [BROWSEUI.124]
122 extern "C" IEThreadParamBlock
*WINAPI
SHCloneIETHREADPARAM(IEThreadParamBlock
*param
)
124 IEThreadParamBlock
*result
;
126 result
= (IEThreadParamBlock
*)LocalAlloc(LMEM_FIXED
, 256);
129 memcpy(result
, param
, 0x40 * 4);
130 if (result
->directoryPIDL
!= NULL
)
131 result
->directoryPIDL
= ILClone(result
->directoryPIDL
);
132 if (result
->offset7C
!= NULL
)
133 result
->offset7C
= ILClone(result
->offset7C
);
134 if (result
->offset80
!= NULL
)
135 result
->offset80
= ILClone(result
->offset80
);
136 if (result
->offset70
!= NULL
)
137 result
->offset70
->AddRef();
139 if (result
->offsetC
!= NULL
)
140 result
->offsetC
->Method2C();
145 /*************************************************************************
146 * SHParseIECommandLine [BROWSEUI.125]
148 extern "C" long WINAPI
SHParseIECommandLine(long param8
, long paramC
)
153 /*************************************************************************
154 * SHDestroyIETHREADPARAM [BROWSEUI.126]
156 extern "C" void WINAPI
SHDestroyIETHREADPARAM(IEThreadParamBlock
*param
)
160 if (param
->directoryPIDL
!= NULL
)
161 ILFree(param
->directoryPIDL
);
162 if (param
->offset7C
!= NULL
)
163 ILFree(param
->offset7C
);
164 if ((param
->offset4
& 0x80000) == 0 && param
->offset80
!= NULL
)
165 ILFree(param
->offset80
);
166 if (param
->offset14
!= NULL
)
167 param
->offset14
->Release();
168 if (param
->offset70
!= NULL
)
169 param
->offset70
->Release();
170 if (param
->offset78
!= NULL
)
171 param
->offset78
->Release();
172 if (param
->offsetC
!= NULL
)
173 param
->offsetC
->Release();
174 if (param
->offsetF8
!= NULL
)
175 param
->offsetF8
->Release();
179 /*************************************************************************
180 * SHOnCWMCommandLine [BROWSEUI.127]
182 extern "C" HRESULT WINAPI
SHOnCWMCommandLine(long param8
)
187 /*************************************************************************
188 * Channel_GetFolderPidl [BROWSEUI.128]
190 extern "C" LPITEMIDLIST WINAPI
Channel_GetFolderPidl()
195 /*************************************************************************
196 * ChannelBand_Create [BROWSEUI.129]
198 extern "C" IUnknown
*WINAPI
ChannelBand_Create(LPITEMIDLIST pidl
)
203 /*************************************************************************
204 * Channels_SetBandInfoSFB [BROWSEUI.130]
206 extern "C" HRESULT WINAPI
Channels_SetBandInfoSFB(IUnknown
*param8
)
211 /*************************************************************************
212 * IUnknown_SetBandInfoSFB [BROWSEUI.131]
214 extern "C" HRESULT WINAPI
IUnknown_SetBandInfoSFB(IUnknown
*param8
, long paramC
)
219 /*************************************************************************
220 * Channel_QuickLaunch [BROWSEUI.133]
222 extern "C" HRESULT WINAPI
Channel_QuickLaunch()
227 /*************************************************************************
228 * SHGetNavigateTarget [BROWSEUI.134]
230 extern "C" HRESULT WINAPI
SHGetNavigateTarget(long param8
, long paramC
, long param10
, long param14
)
235 /*************************************************************************
236 * GetInfoTip [BROWSEUI.135]
238 extern "C" HRESULT WINAPI
GetInfoTip(IUnknown
*param8
, long paramC
, LPTSTR
*param10
, long cchMax
)
243 /*************************************************************************
244 * SHEnumClassesOfCategories [BROWSEUI.136]
246 extern "C" HRESULT WINAPI
SHEnumClassesOfCategories(long param8
, long paramC
, long param10
, long param14
, long param18
)
251 /*************************************************************************
252 * SHWriteClassesOfCategories [BROWSEUI.137]
254 extern "C" HRESULT WINAPI
SHWriteClassesOfCategories(long param8
, long paramC
, long param10
,
255 long param14
, long param18
, long param1C
, long param20
)
260 /*************************************************************************
261 * SHIsExplorerBrowser [BROWSEUI.138]
263 extern "C" BOOL WINAPI
SHIsExplorerBrowser()
270 // this function should handle creating a new process if needed, but I'm leaving that out for now
271 // this function always opens a new window - it does NOT check for duplicates
272 /*************************************************************************
273 * SHOpenNewFrame [BROWSEUI.103]
275 extern "C" HRESULT WINAPI
SHOpenNewFrame(LPITEMIDLIST pidl
, IUnknown
*paramC
, long param10
, long param14
)
277 IEThreadParamBlock
*parameters
;
281 parameters
= SHCreateIETHREADPARAM(0, 1, paramC
, NULL
);
282 if (parameters
== NULL
)
285 return E_OUTOFMEMORY
;
288 parameters
->offset10
= param10
;
289 parameters
->directoryPIDL
= pidl
;
290 parameters
->offset4
= param14
;
291 threadHandle
= CreateThread(NULL
, 0x10000, BrowserThreadProc
, parameters
, 0, &threadID
);
292 if (threadHandle
!= NULL
)
294 CloseHandle(threadHandle
);
297 SHDestroyIETHREADPARAM(parameters
);