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(long param8
, long paramC
, IUnknown
*param10
, IUnknown
*param14
)
102 IEThreadParamBlock
*result
;
104 result
= (IEThreadParamBlock
*)LocalAlloc(LMEM_ZEROINIT
, 256);
107 result
->offset0
= param8
;
108 result
->offset8
= paramC
;
109 result
->offsetC
= param10
;
112 result
->offset14
= param14
;
118 /*************************************************************************
119 * SHCloneIETHREADPARAM [BROWSEUI.124]
121 extern "C" IEThreadParamBlock
*WINAPI
SHCloneIETHREADPARAM(IEThreadParamBlock
*param
)
123 IEThreadParamBlock
*result
;
125 result
= (IEThreadParamBlock
*)LocalAlloc(LMEM_FIXED
, 256);
128 memcpy(result
, param
, 0x40 * 4);
129 if (result
->directoryPIDL
!= NULL
)
130 result
->directoryPIDL
= ILClone(result
->directoryPIDL
);
131 if (result
->offset7C
!= NULL
)
132 result
->offset7C
= ILClone(result
->offset7C
);
133 if (result
->offset80
!= NULL
)
134 result
->offset80
= ILClone(result
->offset80
);
135 if (result
->offset70
!= NULL
)
136 result
->offset70
->AddRef();
138 if (result
->offsetC
!= NULL
)
139 result
->offsetC
->Method2C();
144 /*************************************************************************
145 * SHParseIECommandLine [BROWSEUI.125]
147 extern "C" long WINAPI
SHParseIECommandLine(long param8
, long paramC
)
152 /*************************************************************************
153 * SHDestroyIETHREADPARAM [BROWSEUI.126]
155 extern "C" void WINAPI
SHDestroyIETHREADPARAM(IEThreadParamBlock
*param
)
159 if (param
->directoryPIDL
!= NULL
)
160 ILFree(param
->directoryPIDL
);
161 if (param
->offset7C
!= NULL
)
162 ILFree(param
->offset7C
);
163 if ((param
->offset4
& 0x80000) == 0 && param
->offset80
!= NULL
)
164 ILFree(param
->offset80
);
165 if (param
->offset14
!= NULL
)
166 param
->offset14
->Release();
167 if (param
->offset70
!= NULL
)
168 param
->offset70
->Release();
169 if (param
->offset78
!= NULL
)
170 param
->offset78
->Release();
171 if (param
->offsetC
!= NULL
)
172 param
->offsetC
->Release();
173 if (param
->offsetF8
!= NULL
)
174 param
->offsetF8
->Release();
178 /*************************************************************************
179 * SHOnCWMCommandLine [BROWSEUI.127]
181 extern "C" HRESULT WINAPI
SHOnCWMCommandLine(long param8
)
186 /*************************************************************************
187 * Channel_GetFolderPidl [BROWSEUI.128]
189 extern "C" LPITEMIDLIST WINAPI
Channel_GetFolderPidl()
194 /*************************************************************************
195 * ChannelBand_Create [BROWSEUI.129]
197 extern "C" IUnknown
*WINAPI
ChannelBand_Create(LPITEMIDLIST pidl
)
202 /*************************************************************************
203 * Channels_SetBandInfoSFB [BROWSEUI.130]
205 extern "C" HRESULT WINAPI
Channels_SetBandInfoSFB(IUnknown
*param8
)
210 /*************************************************************************
211 * IUnknown_SetBandInfoSFB [BROWSEUI.131]
213 extern "C" HRESULT WINAPI
IUnknown_SetBandInfoSFB(IUnknown
*param8
, long paramC
)
218 /*************************************************************************
219 * Channel_QuickLaunch [BROWSEUI.133]
221 extern "C" HRESULT WINAPI
Channel_QuickLaunch()
226 /*************************************************************************
227 * SHGetNavigateTarget [BROWSEUI.134]
229 extern "C" HRESULT WINAPI
SHGetNavigateTarget(long param8
, long paramC
, long param10
, long param14
)
234 /*************************************************************************
235 * GetInfoTip [BROWSEUI.135]
237 extern "C" HRESULT WINAPI
GetInfoTip(IUnknown
*param8
, long paramC
, LPTSTR
*param10
, long cchMax
)
242 /*************************************************************************
243 * SHEnumClassesOfCategories [BROWSEUI.136]
245 extern "C" HRESULT WINAPI
SHEnumClassesOfCategories(long param8
, long paramC
, long param10
, long param14
, long param18
)
250 /*************************************************************************
251 * SHWriteClassesOfCategories [BROWSEUI.137]
253 extern "C" HRESULT WINAPI
SHWriteClassesOfCategories(long param8
, long paramC
, long param10
, long param14
, long param18
, long param1C
, long param20
)
258 /*************************************************************************
259 * SHIsExplorerBrowser [BROWSEUI.138]
261 extern "C" BOOL WINAPI
SHIsExplorerBrowser()
268 // this function should handle creating a new process if needed, but I'm leaving that out for now
269 // this function always opens a new window - it does NOT check for duplicates
270 /*************************************************************************
271 * SHOpenNewFrame [BROWSEUI.103]
273 extern "C" HRESULT WINAPI
SHOpenNewFrame(LPITEMIDLIST pidl
, IUnknown
*paramC
, long param10
, long param14
)
275 IEThreadParamBlock
*parameters
;
279 parameters
= SHCreateIETHREADPARAM(0, 1, paramC
, NULL
);
280 if (parameters
== NULL
)
283 return E_OUTOFMEMORY
;
286 parameters
->offset10
= param10
;
287 parameters
->directoryPIDL
= pidl
;
288 parameters
->offset4
= param14
;
289 threadHandle
= CreateThread(NULL
, 0x10000, BrowserThreadProc
, parameters
, 0, &threadID
);
290 if (threadHandle
!= NULL
)
292 CloseHandle(threadHandle
);
295 SHDestroyIETHREADPARAM(parameters
);