42 *
ppv = &
This->IInternetProtocolInfo_iface;
44 TRACE(
"(%p)->(IID_IInternetProtocolInfo %p)\n",
This,
ppv);
45 *
ppv = &
This->IInternetProtocolInfo_iface;
48 *
ppv = &
This->IClassFactory_iface;
56 IInternetProtocolInfo_AddRef(iface);
62 TRACE(
"(%p)\n", iface);
68 TRACE(
"(%p)\n", iface);
77 debugstr_w(pwzRelativeUrl), dwCombineFlags, pwzResult, cchResult,
80 return INET_E_USE_DEFAULT_PROTOCOLHANDLER;
98 return IInternetProtocolInfo_QueryInterface(&
This->IInternetProtocolInfo_iface,
riid,
ppv);
104 return IInternetProtocolInfo_AddRef(&
This->IInternetProtocolInfo_iface);
110 return IInternetProtocolInfo_Release(&
This->IInternetProtocolInfo_iface);
115 TRACE(
"(%p)->(%x)\n", iface, dolock);
147 TRACE(
"(%p)->(IID_IUnknown %p)\n", iface,
ppv);
149 return IUnknown_QueryInterface(
This->pUnkOuter,
riid,
ppv);
150 *
ppv = &
This->IInternetProtocol_iface;
152 TRACE(
"(%p)->(IID_IInternetProtocolRoot %p)\n", iface,
ppv);
153 *
ppv = &
This->IInternetProtocol_iface;
155 TRACE(
"(%p)->(IID_IInternetProtocol %p)\n", iface,
ppv);
156 *
ppv = &
This->IInternetProtocol_iface;
158 FIXME(
"IServiceProvider is not implemented\n");
167 IInternetProtocol_AddRef(iface);
176 return This->pUnkOuter ? IUnknown_AddRef(
This->pUnkOuter) :
ref;
192 return pUnkOuter ? IUnknown_Release(pUnkOuter) :
ref;
207 static const WCHAR html_begin[] = {0xfeff,
'<',
'H',
'T',
'M',
'L',
'>',0};
208 static const WCHAR html_end[] = {
'<',
'/',
'H',
'T',
'M',
'L',
'>',0};
209 static const WCHAR wszBlank[] = {
'b',
'l',
'a',
'n',
'k',0};
223 memset(&bindinfo, 0,
sizeof(bindinfo));
224 bindinfo.cbSize =
sizeof(BINDINFO);
225 hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &grfBINDF, &bindinfo);
230 TRACE(
"bindf %x\n", grfBINDF);
238 data_len =
sizeof(html_begin)+
sizeof(html_end)-
sizeof(
WCHAR)
246 This->data_len = data_len;
248 memcpy(
This->data, html_begin,
sizeof(html_begin));
255 IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_MIMETYPEAVAILABLE,
wszTextHtml);
257 IInternetProtocolSink_ReportData(pOIProtSink,
258 BSCF_FIRSTDATANOTIFICATION | BSCF_LASTDATANOTIFICATION | BSCF_DATAFULLYAVAILABLE,
261 IInternetProtocolSink_ReportResult(pOIProtSink,
S_OK, 0,
NULL);
269 FIXME(
"(%p)->(%p)\n",
This, pProtocolData);
306 TRACE(
"(%p)->(%p %u %p)\n",
This, pv,
cb, pcbRead);
317 This->cur += *pcbRead;
326 FIXME(
"(%p)->(%d %d %p)\n",
This, dlibMove.
u.LowPart, dwOrigin, plibNewPosition);
379 ret->pUnkOuter = pUnkOuter;
384 *
ppv = &
ret->IInternetProtocol_iface;
388 hres = IInternetProtocol_QueryInterface(&
ret->IInternetProtocol_iface,
riid,
ppv);
401 TRACE(
"%p)->(%s %d %08x %p %d %p %d)\n", iface,
debugstr_w(pwzUrl), ParseAction,
402 dwParseFlags, pwzResult, cchResult, pcchResult,
dwReserved);
404 if(ParseAction == PARSE_SECURITY_URL) {
415 if(ParseAction == PARSE_DOMAIN) {
420 *pcchResult =
strlenW(pwzUrl)+1;
426 return INET_E_DEFAULT_ACTION;
436 switch(QueryOption) {
437 case QUERY_CAN_NAVIGATE:
438 return INET_E_USE_DEFAULT_PROTOCOLHANDLER;
440 case QUERY_USES_NETWORK:
446 *pcbBuf =
sizeof(
DWORD);
450 case QUERY_IS_CACHED:
451 FIXME(
"Unsupported option QUERY_IS_CACHED\n");
453 case QUERY_IS_INSTALLEDENTRY:
454 FIXME(
"Unsupported option QUERY_IS_INSTALLEDENTRY\n");
456 case QUERY_IS_CACHED_OR_MAPPED:
457 FIXME(
"Unsupported option QUERY_IS_CACHED_OR_MAPPED\n");
459 case QUERY_IS_SECURE:
460 FIXME(
"Unsupported option QUERY_IS_SECURE\n");
463 FIXME(
"Unsupported option QUERY_IS_SAFE\n");
465 case QUERY_USES_HISTORYFOLDER:
466 FIXME(
"Unsupported option QUERY_USES_HISTORYFOLDER\n");
468 case QUERY_IS_CACHED_AND_USABLE_OFFLINE:
469 FIXME(
"Unsupported option QUERY_IS_CACHED_AND_USABLE_OFFLINE\n");
528 TRACE(
"(%p)->(IID_IUnknown %p)\n", iface,
ppv);
531 *
ppv = &
This->IInternetProtocol_iface;
533 TRACE(
"(%p)->(IID_IInternetProtocolRoot %p)\n", iface,
ppv);
534 *
ppv = &
This->IInternetProtocol_iface;
536 TRACE(
"(%p)->(IID_IInternetProtocol %p)\n", iface,
ppv);
537 *
ppv = &
This->IInternetProtocol_iface;
539 FIXME(
"IServiceProvider is not implemented\n");
548 IInternetProtocol_AddRef(iface);
557 return This->pUnkOuter ? IUnknown_AddRef(
This->pUnkOuter) :
ref;
573 return pUnkOuter ? IUnknown_Release(pUnkOuter) :
ref;
588 static const WCHAR wszRes[] = {
'r',
'e',
's',
':',
'/',
'/'};
593 memset(&bindinfo, 0,
sizeof(bindinfo));
594 bindinfo.cbSize =
sizeof(BINDINFO);
595 hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &grfBINDF, &bindinfo);
604 WARN(
"CoInternetParseUrl failed: %08x\n",
hres);
606 IInternetProtocolSink_ReportResult(pOIProtSink,
hres, 0,
NULL);
618 if(!(res_type =
strchrW(url_dll,
'/'))) {
626 if ((url_file =
strchrW(res_type,
'/'))) {
636 if(*url_file && (
ptr =
strchrW(url_file+1,
'#')))
657 WARN(
"Could not find resource\n");
658 IInternetProtocolSink_ReportResult(pOIProtSink,
666 WARN(
"data already loaded\n");
680 IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_MIMETYPEAVAILABLE,
mime);
684 IInternetProtocolSink_ReportData(pOIProtSink,
685 BSCF_FIRSTDATANOTIFICATION | BSCF_LASTDATANOTIFICATION | BSCF_DATAFULLYAVAILABLE,
688 IInternetProtocolSink_ReportResult(pOIProtSink,
S_OK, 0,
NULL);
696 FIXME(
"(%p)->(%p)\n",
This, pProtocolData);
736 TRACE(
"(%p)->(%p %u %p)\n",
This, pv,
cb, pcbRead);
747 This->cur += *pcbRead;
756 FIXME(
"(%p)->(%d %d %p)\n",
This, dlibMove.
u.LowPart, dwOrigin, plibNewPosition);
810 ret->pUnkOuter = pUnkOuter;
815 *
ppv = &
ret->IInternetProtocol_iface;
819 hres = IInternetProtocol_QueryInterface(&
ret->IInternetProtocol_iface,
riid,
ppv);
832 TRACE(
"%p)->(%s %d %x %p %d %p %d)\n", iface,
debugstr_w(pwzUrl), ParseAction,
833 dwParseFlags, pwzResult, cchResult, pcchResult,
dwReserved);
835 if(ParseAction == PARSE_SECURITY_URL) {
840 static const WCHAR wszFile[] = {
'f',
'i',
'l',
'e',
':',
'/',
'/'};
841 static const WCHAR wszRes[] = {
'r',
'e',
's',
':',
'/',
'/'};
851 if(
len >=
sizeof(file_part)/
sizeof(
WCHAR)) {
852 FIXME(
"Too long URL\n");
888 if(ParseAction == PARSE_DOMAIN) {
893 *pcchResult =
strlenW(pwzUrl)+1;
899 return INET_E_DEFAULT_ACTION;
909 switch(QueryOption) {
910 case QUERY_USES_NETWORK:
916 *pcbBuf =
sizeof(
DWORD);
919 case QUERY_IS_SECURE:
920 FIXME(
"QUERY_IS_SECURE not supported\n");
923 FIXME(
"QUERY_IS_SAFE not supported\n");
926 return INET_E_USE_DEFAULT_PROTOCOLHANDLER;
970 TRACE(
"%p)->(%s %d %x %p %d %p %d)\n", iface,
debugstr_w(pwzUrl), ParseAction,
971 dwParseFlags, pwzResult, cchResult, pcchResult,
dwReserved);
973 switch(ParseAction) {
974 case PARSE_SECURITY_URL:
975 FIXME(
"PARSE_SECURITY_URL\n");
978 FIXME(
"PARSE_DOMAIN\n");
981 return INET_E_DEFAULT_ACTION;
994 switch(QueryOption) {
995 case QUERY_USES_NETWORK:
1001 *pcbBuf =
sizeof(
DWORD);
1004 case QUERY_IS_SECURE:
1005 FIXME(
"QUERY_IS_SECURE not supported\n");
1009 return INET_E_USE_DEFAULT_PROTOCOLHANDLER;
1054 return IInternetProtocolInfo_QueryInterface(&
cf->IInternetProtocolInfo_iface,
riid,
ppv);
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#define InterlockedIncrement
#define InterlockedDecrement
const GUID IID_IClassFactory
IInternetProtocol IInternetProtocol_iface
IInternetProtocol IInternetProtocol_iface
static MimeHtmlProtocol * impl_from_IInternetProtocolInfo(IInternetProtocolInfo *iface)
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryExW(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
DWORD WINAPI SearchPathW(IN LPCWSTR lpPath OPTIONAL, IN LPCWSTR lpFileName, IN LPCWSTR lpExtension OPTIONAL, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart OPTIONAL)
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
DWORD WINAPI SizeofResource(HINSTANCE hModule, HRSRC hRsrc)
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
HRESULT ProtocolFactory_Create(REFCLSID rclsid, REFIID riid, void **ppv)
static HRESULT WINAPI ResProtocol_UnlockRequest(IInternetProtocol *iface)
static ResProtocol * ResProtocol_from_IInternetProtocol(IInternetProtocol *iface)
static HRESULT WINAPI ResProtocol_Read(IInternetProtocol *iface, void *pv, ULONG cb, ULONG *pcbRead)
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL dolock)
static const IClassFactoryVtbl JSProtocolFactoryVtbl
static ProtocolFactory JSProtocolFactory
static HRESULT WINAPI ResProtocolInfo_ParseUrl(IInternetProtocolInfo *iface, LPCWSTR pwzUrl, PARSEACTION ParseAction, DWORD dwParseFlags, LPWSTR pwzResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved)
static HRESULT WINAPI AboutProtocol_Resume(IInternetProtocol *iface)
static const IInternetProtocolVtbl AboutProtocolVtbl
static HRESULT WINAPI AboutProtocol_Read(IInternetProtocol *iface, void *pv, ULONG cb, ULONG *pcbRead)
static HRESULT WINAPI AboutProtocol_Seek(IInternetProtocol *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
static HRESULT WINAPI ResProtocol_Resume(IInternetProtocol *iface)
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
static HRESULT WINAPI ResProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserved)
static ProtocolFactory * impl_from_IClassFactory(IClassFactory *iface)
static const IClassFactoryVtbl ResProtocolFactoryVtbl
static ULONG WINAPI ResProtocol_AddRef(IInternetProtocol *iface)
static HRESULT WINAPI ResProtocol_Terminate(IInternetProtocol *iface, DWORD dwOptions)
static HRESULT WINAPI InternetProtocolInfo_CompareUrl(IInternetProtocolInfo *iface, LPCWSTR pwzUrl1, LPCWSTR pwzUrl2, DWORD dwCompareFlags)
static const IInternetProtocolVtbl ResProtocolVtbl
static HRESULT WINAPI AboutProtocol_Continue(IInternetProtocol *iface, PROTOCOLDATA *pProtocolData)
static const IInternetProtocolInfoVtbl AboutProtocolInfoVtbl
static HRESULT WINAPI InternetProtocolInfo_CombineUrl(IInternetProtocolInfo *iface, LPCWSTR pwzBaseUrl, LPCWSTR pwzRelativeUrl, DWORD dwCombineFlags, LPWSTR pwzResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved)
static HRESULT WINAPI AboutProtocol_Terminate(IInternetProtocol *iface, DWORD dwOptions)
static AboutProtocol * AboutProtocol_from_IInternetProtocol(IInternetProtocol *iface)
static HRESULT WINAPI AboutProtocolFactory_CreateInstance(IClassFactory *iface, IUnknown *pUnkOuter, REFIID riid, void **ppv)
static ULONG WINAPI InternetProtocolInfo_AddRef(IInternetProtocolInfo *iface)
static ProtocolFactory ResProtocolFactory
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
static const IInternetProtocolInfoVtbl ResProtocolInfoVtbl
static ULONG WINAPI ResProtocol_Release(IInternetProtocol *iface)
static const IClassFactoryVtbl AboutProtocolFactoryVtbl
static ProtocolFactory AboutProtocolFactory
static HRESULT WINAPI AboutProtocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv)
static HRESULT WINAPI AboutProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserved)
static HRESULT WINAPI ResProtocol_Continue(IInternetProtocol *iface, PROTOCOLDATA *pProtocolData)
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
static ULONG WINAPI InternetProtocolInfo_Release(IInternetProtocolInfo *iface)
static HRESULT WINAPI JSProtocolFactory_CreateInstance(IClassFactory *iface, IUnknown *pUnkOuter, REFIID riid, void **ppv)
static HRESULT WINAPI ResProtocolInfo_QueryInfo(IInternetProtocolInfo *iface, LPCWSTR pwzUrl, QUERYOPTION QueryOption, DWORD dwQueryFlags, LPVOID pBuffer, DWORD cbBuffer, DWORD *pcbBuf, DWORD dwReserved)
static ULONG WINAPI AboutProtocol_Release(IInternetProtocol *iface)
static const IInternetProtocolInfoVtbl JSProtocolInfoVtbl
static HRESULT WINAPI InternetProtocolInfo_QueryInterface(IInternetProtocolInfo *iface, REFIID riid, void **ppv)
static HRESULT WINAPI JSProtocolInfo_QueryInfo(IInternetProtocolInfo *iface, LPCWSTR pwzUrl, QUERYOPTION QueryOption, DWORD dwQueryFlags, LPVOID pBuffer, DWORD cbBuffer, DWORD *pcbBuf, DWORD dwReserved)
static HRESULT WINAPI ResProtocol_Abort(IInternetProtocol *iface, HRESULT hrReason, DWORD dwOptions)
static HRESULT WINAPI ResProtocol_LockRequest(IInternetProtocol *iface, DWORD dwOptions)
static HRESULT WINAPI AboutProtocolInfo_ParseUrl(IInternetProtocolInfo *iface, LPCWSTR pwzUrl, PARSEACTION ParseAction, DWORD dwParseFlags, LPWSTR pwzResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved)
static HRESULT WINAPI ResProtocol_Suspend(IInternetProtocol *iface)
static ULONG WINAPI AboutProtocol_AddRef(IInternetProtocol *iface)
static HRESULT WINAPI JSProtocolInfo_ParseUrl(IInternetProtocolInfo *iface, LPCWSTR pwzUrl, PARSEACTION ParseAction, DWORD dwParseFlags, LPWSTR pwzResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved)
static HRESULT WINAPI ResProtocolFactory_CreateInstance(IClassFactory *iface, IUnknown *pUnkOuter, REFIID riid, void **ppv)
static HRESULT WINAPI AboutProtocol_Abort(IInternetProtocol *iface, HRESULT hrReason, DWORD dwOptions)
static HRESULT WINAPI ResProtocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv)
static HRESULT WINAPI AboutProtocol_LockRequest(IInternetProtocol *iface, DWORD dwOptions)
static HRESULT WINAPI AboutProtocol_Suspend(IInternetProtocol *iface)
static HRESULT WINAPI AboutProtocolInfo_QueryInfo(IInternetProtocolInfo *iface, LPCWSTR pwzUrl, QUERYOPTION QueryOption, DWORD dwQueryFlags, LPVOID pBuffer, DWORD cbBuffer, DWORD *pcbBuf, DWORD dwReserved)
static HRESULT WINAPI ResProtocol_Seek(IInternetProtocol *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
static HRESULT WINAPI AboutProtocol_UnlockRequest(IInternetProtocol *iface)
HRESULT WINAPI CoInternetParseUrl(LPCWSTR pwzUrl, PARSEACTION ParseAction, DWORD dwFlags, LPWSTR pszResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
VOID WINAPI CoTaskMemFree(LPVOID ptr)
HRESULT WINAPI FindMimeFromData(LPBC pBC, LPCWSTR pwzUrl, LPVOID pBuffer, DWORD cbSize, LPCWSTR pwzMimeProposed, DWORD dwMimeFlags, LPWSTR *ppwzMimeOut, DWORD dwReserved)
#define memcpy(s1, s2, n)
static HMODULE MODULEINFO DWORD cb
static const WCHAR wszRes[]
static const WCHAR wszAbout[]
CLSID CLSID_AboutProtocol
static const WCHAR wszTextHtml[]
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
#define IsEqualGUID(rguid1, rguid2)
IInternetProtocolInfo IInternetProtocolInfo_iface
IClassFactory IClassFactory_iface
#define CONTAINING_RECORD(address, type, field)
struct _LARGE_INTEGER::@2299 u
void WINAPI ReleaseBindInfo(BINDINFO *pbindinfo)
static const WCHAR wszFile[]
DWORD WINAPI GetLastError(void)
#define LOAD_LIBRARY_AS_DATAFILE
#define HRESULT_FROM_WIN32(x)
#define CLASS_E_CLASSNOTAVAILABLE
#define MAKEINTRESOURCEW(i)