43DEFINE_GUID(
GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
44DEFINE_GUID(
CLSID_IdentityUnmarshal,0x0000001b,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);
45DEFINE_GUID(
IID_IBindStatusCallbackHolder,0x79eac9cc,0xbaf9,0x11ce,0x8c,0x82,0x00,0xaa,0x00,0x4b,0xa9,0x0b);
48#define DEFINE_EXPECT(func) \
49 static BOOL expect_ ## func = FALSE, called_ ## func = FALSE
51#define SET_EXPECT(func) \
52 do { called_ ## func = FALSE; expect_ ## func = TRUE; } while(0)
54#define CHECK_EXPECT2(func) \
56 ok(expect_ ##func, "unexpected call " #func "\n"); \
57 called_ ## func = TRUE; \
60#define CHECK_EXPECT(func) \
62 CHECK_EXPECT2(func); \
63 expect_ ## func = FALSE; \
66#define CHECK_CALLED(func) \
68 ok(called_ ## func, "expected " #func "\n"); \
69 expect_ ## func = called_ ## func = FALSE; \
72#define CHECK_NOT_CALLED(func) \
74 ok(!called_ ## func, "unexpected " #func "\n"); \
75 expect_ ## func = called_ ## func = FALSE; \
78#define CHECK_CALLED_BROKEN(func) \
80 ok(called_ ## func || broken(!called_ ## func), "expected " #func "\n"); \
81 expect_ ## func = called_ ## func = FALSE; \
84#define CLEAR_CALLED(func) \
85 expect_ ## func = called_ ## func = FALSE
152 {
'h',
't',
't',
'p',
':',
'/',
'/',
't',
'e',
's',
't',
'.',
'w',
'i',
'n',
'e',
'h',
'q',
'.',
'o',
'r',
'g',
'/',
153 't',
'e',
's',
't',
's',
'/',
'd',
'a',
't',
'a',
'.',
'p',
'h',
'p',0};
154static const WCHAR about_blankW[] = {
'a',
'b',
'o',
'u',
't',
':',
'b',
'l',
'a',
'n',
'k',0};
158static WCHAR BSCBHolder[] = {
'_',
'B',
'S',
'C',
'B',
'_',
'H',
'o',
'l',
'd',
'e',
'r',
'_',0 };
160#define WINEHQ_IP "4.4.81.126"
164static const WCHAR cache_fileW[] = {
'c',
':',
'\\',
'c',
'a',
'c',
'h',
'e',
'.',
'h',
't',
'm',0};
246 "Expected CreateURLMoniker to return E_INVALIDARG, got 0x%08lx\n",
hr);
251 "Expected CreateURLMoniker to return E_INVALIDARG, got 0x%08lx\n",
hr);
252 ok(mon1 ==
NULL,
"Expected the output pointer to be NULL, got %p\n", mon1);
256 "Expected CreateURLMoniker to return E_INVALIDARG, got 0x%08lx\n",
hr);
261 "Expected CreateURLMoniker to return S_OK, got 0x%08lx\n",
hr);
262 if(mon1) IMoniker_Release(mon1);
265 ok(
hr ==
S_OK,
"failed to create moniker: 0x%08lx\n",
hr);
268 ok(
hr ==
S_OK,
"failed to create moniker: 0x%08lx\n",
hr);
270 if(mon1) IMoniker_Release(mon1);
271 if(mon2) IMoniker_Release(mon2);
276 static const WCHAR relativeW[] = {
'a',
'/',
'b',
'.',
't',
'x',
't',0};
282 static const WCHAR TEST_PART_URL_1[] = {
'/',
't',
'e',
's',
't',
's',
'/',
'd',
'a',
't',
'a',
'.',
'p',
'h',
'p',0};
286 mon = (
void*)0xdeadbeef;
293 stream = (
void*)0xdeadbeef;
294 hr = IMoniker_BindToStorage(mon, bctx,
NULL, &IID_IStream, (
void**)&
stream);
298 hr = IMoniker_BindToStorage(mon, bctx,
NULL, &IID_IStream,
NULL);
301 stream = (
void*)0xdeadbeef;
302 hr = IMoniker_BindToStorage(mon,
NULL,
NULL, &IID_IStream, (
void**)&
stream);
307 IMoniker_Release(mon);
309 mon = (
void*)0xdaedbeef;
313 stream = (
void*)0xdeadbeef;
314 hr = IMoniker_BindToStorage(mon,
NULL,
NULL, &IID_IStream, (
void**)&
stream);
319 hr = IMoniker_BindToStorage(mon, bctx,
NULL, &IID_IStream,
NULL);
322 IMoniker_Release(mon);
323 IBindCtx_Release(bctx);
328 ok(0,
"unexpected call\n");
345 ok(!nPriority,
"nPriority = %ld\n", nPriority);
351 ok(0,
"unexpected call\n");
403 static BOOL tested_switch_fail;
405 if(tested_switch_fail)
408 tested_switch_fail =
TRUE;
411 ok(
hres ==
S_OK,
"Could not get IInternetProtocolSink iface: %08lx\n",
hres);
465 BINDSTATUS_SENDINGREQUEST,
NULL);
481 ok(
hres ==
S_OK,
"ReportProgress(BINDSTATUS_REFIRECTING) failed: %08lx\n",
hres);
574 DWORD bind_info, bscf = BSCF_FIRSTDATANOTIFICATION | BSCF_LASTDATANOTIFICATION;
577 static const STGMEDIUM stgmed_zero = {0};
587 ok(pOIProtSink !=
NULL,
"pOIProtSink == NULL\n");
588 ok(pOIBindInfo !=
NULL,
"pOIBindInfo == NULL\n");
589 ok(grfPI == 0,
"grfPI=%ld, expected 0\n", grfPI);
603 memset(&bindinfo, 0,
sizeof(bindinfo));
605 hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &
bind_info, &bindinfo);
608 memset(&bindinfo, 0,
sizeof(bindinfo));
609 bindinfo.cbSize =
sizeof(bindinfo);
610 hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &
bind_info, &bindinfo);
613 ok(
bind_info & BINDF_FROMURLMON,
"BINDF_FROMURLMON is not set\n");
616 !(
bindf&BINDF_ASYNCSTORAGE) || !(
bindf&BINDF_PULLDATA))
617 ok(
bind_info & BINDF_NEEDFILE,
"BINDF_NEEDFILE is not set\n");
619 ok(!(
bind_info & BINDF_NEEDFILE),
"BINDF_NEEDFILE is set\n");
621 bind_info &= ~(BINDF_NEEDFILE|BINDF_FROMURLMON);
625 ok(
bind_info == (
bindf & ~(BINDF_NEEDFILE|BINDF_FROMURLMON)),
"bind_info = %lx, expected %lx\n",
628 ok(bindinfo.cbSize ==
sizeof(bindinfo),
"bindinfo.cbSize = %ld\n", bindinfo.cbSize);
629 ok(!bindinfo.szExtraInfo,
"bindinfo.szExtraInfo = %p\n", bindinfo.szExtraInfo);
630 ok(!
memcmp(&bindinfo.stgmedData, &stgmed_zero,
sizeof(STGMEDIUM)),
"wrong stgmedData\n");
631 ok(!bindinfo.grfBindInfoF,
"bindinfo.grfBindInfoF = %ld\n", bindinfo.grfBindInfoF);
632 ok(!bindinfo.dwBindVerb,
"bindinfo.dwBindVerb = %ld\n", bindinfo.dwBindVerb);
633 ok(!bindinfo.szCustomVerb,
"bindinfo.szCustomVerb = %p\n", bindinfo.szCustomVerb);
634 ok(!bindinfo.cbstgmedData,
"bindinfo.cbstgmedData = %ld\n", bindinfo.cbstgmedData);
635 ok(bindinfo.dwOptions == (
bind_to_object ? 0x100000 : 0),
"bindinfo.dwOptions = %lx\n", bindinfo.dwOptions);
636 ok(!bindinfo.dwOptionsFlags,
"bindinfo.dwOptionsFlags = %ld\n", bindinfo.dwOptionsFlags);
637 ok(!bindinfo.dwCodePage,
"bindinfo.dwCodePage = %ld\n", bindinfo.dwCodePage);
638 ok(!
memcmp(&bindinfo.securityAttributes, &sa_zero,
sizeof(sa_zero)),
"wrong bindinfo.securityAttributes\n");
640 ok(!bindinfo.pUnk,
"bindinfo.pUnk = %p\n", bindinfo.pUnk);
641 ok(!bindinfo.dwReserved,
"bindinfo.dwReserved = %ld\n", bindinfo.dwReserved);
648 hres = IInternetProtocolSink_ReportProgress(pOIProtSink,
649 BINDSTATUS_DIRECTBIND,
NULL);
651 "ReportProgress(BINDSTATUS_SENDINGREQUEST) failed: %08lx\n",
hres);
659 hres = IInternetProtocolSink_ReportProgress(pOIProtSink,
660 BINDSTATUS_SENDINGREQUEST,
emptyW);
662 "ReportProgress(BINDSTATUS_SENDINGREQUEST) failed: %08lx\n",
hres);
668 IInternetProtocolSink_AddRef(pOIProtSink);
685 static const WCHAR wszMimes[] = {
'*',
'/',
'*',0};
688 hres = IInternetBindInfo_GetBindString(pOIBindInfo, BINDSTRING_USER_AGENT,
693 "GetBindString(BINDSTRING_USER_AGETNT) failed: %08lx\n",
hres);
694 ok(fetched == 256,
"fetched = %ld, expected 254\n", fetched);
695 ok(ua == (
LPWSTR)0xdeadbeef,
"ua = %p\n", ua);
697 hres = IInternetBindInfo_GetBindString(pOIBindInfo, BINDSTRING_ACCEPT_MIMES,
698 accept_mimes, 256, &fetched);
700 "GetBindString(BINDSTRING_ACCEPT_MIMES) failed: %08lx\n",
hres);
701 ok(fetched == 1,
"fetched = %ld, expected 1\n", fetched);
702 ok(!
lstrcmpW(wszMimes, accept_mimes[0]),
"unexpected mimes\n");
705 hres = IInternetBindInfo_GetBindString(pOIBindInfo, BINDSTRING_ACCEPT_MIMES,
706 NULL, 256, &fetched);
708 "GetBindString(BINDSTRING_ACCEPT_MIMES) failed: %08lx\n",
hres);
710 hres = IInternetBindInfo_GetBindString(pOIBindInfo, BINDSTRING_ACCEPT_MIMES,
711 accept_mimes, 256,
NULL);
713 "GetBindString(BINDSTRING_ACCEPT_MIMES) failed: %08lx\n",
hres);
715 hres = IInternetBindInfo_QueryInterface(pOIBindInfo, &IID_IServiceProvider,
730 NULL, 0, &additional_headers);
737 ok(additional_headers ==
NULL,
"additional_headers=%p\n", additional_headers);
741 &IID_IHttpNegotiate2, (
void**)&http_negotiate2);
750 hres = IHttpNegotiate2_GetRootSecurityId(http_negotiate2, sec_id, &
size, 0);
755 IHttpNegotiate2_Release(http_negotiate2);
756 ok(
hres ==
E_FAIL,
"GetRootSecurityId failed: %08lx, expected E_FAIL\n",
hres);
773 IInternetProtocolSink_AddRef(pOIProtSink);
780 data.grfFlags = PI_FORCE_ASYNC;
782 hres = IInternetProtocolSink_Switch(pOIProtSink, &
data);
794 hres = IInternetProtocolSink_ReportProgress(pOIProtSink,
795 BINDSTATUS_CACHEFILENAMEAVAILABLE,
file_url+7);
797 "ReportProgress(BINDSTATUS_CACHEFILENAMEAVAILABLE) failed: %08lx\n",
hres);
803 hres = IInternetProtocolSink_ReportProgress(pOIProtSink,
804 BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE,
wszTextHtml);
806 "ReportProgress(BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE) failed: %08lx\n",
hres);
813 hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE,
wszTextHtml);
815 "ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE) failed: %08lx\n",
hres);
818 hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_MIMETYPEAVAILABLE,
wszTextHtml);
820 "ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE) failed: %08lx\n",
hres);
824 bscf |= BSCF_DATAFULLYAVAILABLE;
826 bscf = BSCF_FIRSTDATANOTIFICATION|BSCF_DATAFULLYAVAILABLE;
834 SET_EXPECT(Obj_OnProgress_CACHEFILENAMEAVAILABLE);
837 SET_EXPECT(Obj_OnProgress_BEGINSYNCOPERATION);
850 SET_EXPECT(OnProgress_CACHEFILENAMEAVAILABLE);
859 hres = IInternetProtocolSink_ReportData(pOIProtSink, bscf, 13, 13);
894 hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_BEGINDOWNLOADDATA,
NULL);
895 ok(
hres ==
S_OK,
"ReportProgress(BINDSTATUS_BEGINDOWNLOADDATA) failed: %08lx\n",
hres);
899 hres = IInternetProtocolSink_ReportData(pOIProtSink, bscf, 13, 13);
906 hres = IInternetProtocolSink_ReportResult(pOIProtSink,
S_OK, 0,
NULL);
915 PROTOCOLDATA *pProtocolData)
927 ok(pProtocolData !=
NULL,
"pProtocolData == NULL\n");
934 BINDSTATUS_SENDINGREQUEST,
NULL);
940 "ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE) failed: %08lx\n",
hres);
942 bscf |= BSCF_FIRSTDATANOTIFICATION|BSCF_INTERMEDIATEDATANOTIFICATION;
949 hres = IInternetProtocolSink_QueryInterface(
protocol_sink, &IID_IServiceProvider,
951 ok(
hres ==
S_OK,
"Could not get IServiceProvicder\n");
955 ok(
hres ==
S_OK,
"Could not get IHttpNegotiate\n");
971 ok(
hres ==
S_OK,
"ReportProgress(BINDSTATUS_ACCEPTRANGES) failed: %08lx\n",
hres);
977 "ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE) failed: %08lx\n",
hres);
981 ok(
hres ==
S_OK,
"ReportProgress(BINDSTATUS_CACHEFILENAMEAVAILABLE) failed: %08lx\n",
hres);
983 bscf |= BSCF_FIRSTDATANOTIFICATION;
988 bscf = BSCF_INTERMEDIATEDATANOTIFICATION;
1009 SET_EXPECT(Obj_OnProgress_MIMETYPEAVAILABLE);
1010 SET_EXPECT(Obj_OnProgress_BEGINDOWNLOADDATA);
1012 SET_EXPECT(Obj_OnProgress_BEGINSYNCOPERATION);
1052 ok(hrReason ==
E_ABORT,
"hrReason = %08lx\n", hrReason);
1079 ok(0,
"unexpected call\n");
1085 ok(0,
"unexpected call\n");
1094 static const char data[] =
"<HTML></HTML>";
1098 ok(pv !=
NULL,
"pv == NULL\n");
1099 ok(
cb != 0,
"cb == 0\n");
1100 ok(pcbRead !=
NULL,
"pcbRead == NULL\n");
1139 BSCF_LASTDATANOTIFICATION|BSCF_INTERMEDIATEDATANOTIFICATION, 2000, 2000);
1164 ok(*pcbRead == 0,
"*pcbRead=%ld, expected 0\n", *pcbRead);
1173 ok(0,
"unexpected call\n");
1218 ok(0,
"unexpected call\n");
1244 ok(pszAdditionalHeaders !=
NULL,
"pszAdditionalHeaders == NULL\n");
1245 if(pszAdditionalHeaders)
1246 ok(*pszAdditionalHeaders ==
NULL,
"*pszAdditionalHeaders != NULL\n");
1258 ok(dwResponseCode == 200,
"dwResponseCode=%ld, expected 200\n", dwResponseCode);
1259 ok(szResponseHeaders !=
NULL,
"szResponseHeaders == NULL\n");
1260 ok(szRequestHeaders ==
NULL,
"szRequestHeaders != NULL\n");
1262 ok(pszAdditionalRequestHeaders !=
NULL,
"pszAdditionalHeaders == NULL\n");
1263 if(pszAdditionalRequestHeaders)
1264 ok(*pszAdditionalRequestHeaders ==
NULL,
"*pszAdditionalHeaders != NULL\n");
1272 static const BYTE sec_id[] = {
'h',
't',
't',
'p',
':',
't',
'e',
's',
't',1,0,0,0};
1279 ok(pbSecurityId !=
NULL,
"pbSecurityId == NULL\n");
1280 ok(pcbSecurityId !=
NULL,
"pcbSecurityId == NULL\n");
1282 if(pbSecurityId == (
void*)0xdeadbeef)
1286 ok(*pcbSecurityId == 512,
"*pcbSecurityId=%ld, expected 512\n", *pcbSecurityId);
1287 *pcbSecurityId =
sizeof(sec_id);
1291 memcpy(pbSecurityId, sec_id,
sizeof(sec_id));
1309 ok(0,
"Unexpected call\n");
1319 ok(0,
"Unexpected interface requested.\n");
1338 else if(
IsEqualGUID(rguidReason, &IID_IWindowForBindingUI))
1340 else if(
IsEqualGUID(rguidReason, &IID_ICodeInstall))
1355 "Got problem: %ld\n", dwProblem);
1378 ok(0,
"unexpected call\n");
1396 trace(
"IServiceProvider::QueryService(service %s, iid %s)\n",
1399 if(
IsEqualGUID(&IID_IAuthenticate, guidService)) {
1404 if(
IsEqualGUID(&IID_IInternetProtocol, guidService)) {
1409 if(
IsEqualGUID(&IID_IInternetBindInfo, guidService)) {
1414 if(
IsEqualGUID(&IID_IWindowForBindingUI, guidService)) {
1420 if(
IsEqualGUID(&IID_IHttpSecurity, guidService)) {
1447 if(
progress == BINDSTATUS_SENDINGREQUEST)
1451 &&
progress!=BINDSTATUS_MIMETYPEAVAILABLE)
1570 ok(pib !=
NULL,
"pib should not be NULL\n");
1573 if(pib == (
void*)0xdeadbeef)
1578 hres = IBinding_QueryInterface(pib, &IID_IMoniker, (
void**)&mon);
1581 IMoniker_Release(mon);
1583 hres = IBinding_QueryInterface(pib, &IID_IWinInetHttpInfo, (
void**)&http_info);
1594 hres = IBinding_GetBindResult(pib, &
clsid, &
res, &res_str, (
void*)0xdeadbeef);
1598 ok(
hres ==
S_OK,
"GetBindResult failed: %08lx, expected S_OK\n",
hres);
1600 ok(!
res,
"incorrect res: %lx\n",
res);
1613 ok(0,
"unexpected call\n");
1619 ok(0,
"unexpected call\n");
1629 trace(
"IBindStatusCallbackEx::OnProgress(progress %lu/%lu, code %lu, text %s)\n",
1630 ulProgress, ulProgressMax, ulStatusCode,
debugstr_w(szStatusText));
1632 switch(ulStatusCode) {
1633 case BINDSTATUS_FINDINGRESOURCE:
1645 case BINDSTATUS_CONNECTING:
1657 case BINDSTATUS_REDIRECTING:
1668 case BINDSTATUS_SENDINGREQUEST:
1685 case BINDSTATUS_MIMETYPEAVAILABLE:
1695 case BINDSTATUS_BEGINDOWNLOADDATA:
1700 ok(szStatusText !=
NULL,
"szStatusText == NULL\n");
1713 case BINDSTATUS_DOWNLOADINGDATA:
1715 ok(iface != &
objbsc,
"unexpected call\n");
1732 case BINDSTATUS_ENDDOWNLOADDATA:
1737 ok(szStatusText !=
NULL,
"szStatusText == NULL\n");
1749 case BINDSTATUS_CACHEFILENAMEAVAILABLE:
1760 ok(szStatusText !=
NULL,
"szStatusText == NULL\n");
1764 case BINDSTATUS_CLASSIDAVAILABLE:
1769 ok(0,
"unexpected call\n");
1773 ok(
hr ==
S_OK,
"CLSIDFromString failed with error 0x%08lx\n",
hr);
1778 case BINDSTATUS_BEGINSYNCOPERATION:
1781 ok(0,
"unexpected call\n");
1782 ok(szStatusText ==
NULL,
"Expected szStatusText to be NULL\n");
1784 case BINDSTATUS_ENDSYNCOPERATION:
1787 ok(0,
"unexpected call\n");
1788 ok(szStatusText ==
NULL,
"Expected szStatusText to be NULL\n");
1790 case BINDSTATUS_PROXYDETECTING:
1791 case BINDSTATUS_COOKIE_SENT:
1792 case BINDSTATUS_DECODING:
1795 ok(0,
"unexpected code %ld\n", ulStatusCode);
1802 hres = IBinding_QueryInterface(
current_binding, &IID_IWinInetHttpInfo, (
void**)&http_info);
1804 ok(
hres ==
S_OK,
"Could not get IWinInetHttpInfo iface: %08lx\n",
hres);
1808 "QueryInterface(IID_IWinInetHttpInfo) returned: %08lx, expected E_NOINTERFACE\n",
hres);
1810 IWinInetHttpInfo_Release(http_info);
1839 ok(
SUCCEEDED(hresult),
"binding failed: %08lx\n", hresult);
1841 todo_wine ok(hresult ==
S_FALSE,
"binding failed: %08lx, expected S_FALSE\n", hresult);
1843 ok(hresult ==
E_ABORT,
"binding failed: %08lx, expected E_ABORT\n", hresult);
1846 ok(szError ==
NULL,
"szError should be NULL\n");
1855 ok(
hres ==
S_OK,
"GetBindResult failed: %08lx, expected S_OK\n",
hres);
1861 "incorrect protocol CLSID: %s, expected CLSID_NULL\n",
1865 "incorrect protocol CLSID: %s, expected CLSID_FtpProtocol\n",
1869 "incorrect protocol CLSID: %s, expected CLSID_FtpProtocol\n",
1873 "incorrect protocol CLSID: %s, expected CLSID_FileProtocol\n",
1877 "incorrect protocol CLSID: %s, expected CLSID_HttpProtocol\n",
1881 "incorrect protocol CLSID: %s, expected CLSID_HttpSProtocol\n",
1885 "incorrect protocol CLSID: %s, expected CLSID_AboutProtocol\n",
1921 cbSize = pbindinfo->cbSize;
1922 memset(pbindinfo, 0, cbSize);
1923 pbindinfo->cbSize = cbSize;
1936 hres = IStream_Seek(
stream,
pos, STREAM_SEEK_SET, &new_pos);
1938 ok(!new_pos.
QuadPart,
"new_pos.QuadPart != 0\n");
1942 hres = IStream_Seek(
stream,
pos, STREAM_SEEK_END, &new_pos);
1944 ok(new_pos.
QuadPart,
"new_pos.QuadPart = 0\n");
1950 ok(new_pos.
QuadPart == 0xdeadbeef,
"unexpected new_pos.QuadPart\n");
1954 DWORD dwSize, FORMATETC* pformatetc, STGMEDIUM* pstgmed)
1962 ok(0,
"unexpected call\n");
1969 "Download state was %d, expected DOWNLOADING or END_DOWNLOAD\n",
1974 ok(grfBSCF == (BSCF_FIRSTDATANOTIFICATION|BSCF_LASTDATANOTIFICATION),
"grfBSCF = %lx\n", grfBSCF);
1976 ok(pformatetc !=
NULL,
"pformatetc == NULL\n");
1983 ok(!
strcmp(clipfmt,
mime_type),
"clipformat %x != mime_type, \"%s\" != \"%s\"\n",
1984 pformatetc->cfFormat, clipfmt,
mime_type);
1986 ok(pformatetc->cfFormat == 0,
"clipformat=%x\n", pformatetc->cfFormat);
1988 ok(pformatetc->ptd ==
NULL,
"ptd = %p\n", pformatetc->ptd);
1989 ok(pformatetc->dwAspect == 1,
"dwAspect=%lu\n", pformatetc->dwAspect);
1990 ok(pformatetc->lindex == -1,
"lindex=%ld\n", pformatetc->lindex);
1991 ok(pformatetc->tymed ==
tymed,
"tymed=%lu, expected %lu\n", pformatetc->tymed,
tymed);
1994 ok(pstgmed !=
NULL,
"stgmeg == NULL\n");
1995 ok(pstgmed->tymed ==
tymed,
"tymed=%lu, expected %lu\n", pstgmed->tymed,
tymed);
1996 ok(pstgmed->pUnkForRelease !=
NULL,
"pUnkForRelease == NULL\n");
1998 switch(pstgmed->tymed) {
1999 case TYMED_ISTREAM: {
2004 if(grfBSCF & BSCF_FIRSTDATANOTIFICATION) {
2009 "Write failed: %08lx, expected STG_E_ACCESSDENIED\n",
hres);
2023 "stat.pwcsName = %s, cache_file_name = %s\n",
2026 ok(
stat.cbSize.LowPart == (
bindf&BINDF_ASYNCHRONOUS?0:6500),
2027 "stat.cbSize.LowPart = %lu\n",
stat.cbSize.LowPart);
2034 ok(
stat.type == STGTY_STREAM,
"stat.type = %lx\n",
stat.type);
2035 ok(
stat.cbSize.HighPart == 0,
"stat.cbSize.HighPart != 0\n");
2037 ok(
stat.grfLocksSupported == 0,
"stat.grfLocksSupported = %lx\n",
stat.grfLocksSupported);
2038 ok(
stat.grfStateBits == 0,
"stat.grfStateBits = %lx\n",
stat.grfStateBits);
2039 ok(
stat.reserved == 0,
"stat.reserved = %lx\n",
stat.reserved);
2058 "unexpected file name %s\n",
wine_dbgstr_w(pstgmed->lpszFileName));
2061 "unexpected file name %s\n",
wine_dbgstr_w(pstgmed->lpszFileName));
2065 ok(pstgmed->lpszFileName !=
NULL,
"lpszFileName == NULL\n");
2080 ok(0,
"unexpected call\n");
2093 ok(grfBINDF !=
NULL,
"grfBINDF == NULL\n");
2094 ok(grfBINDF2 !=
NULL,
"grfBINDF2 == NULL\n");
2095 ok(pbindinfo !=
NULL,
"pbindinfo == NULL\n");
2096 ok(pdwReserved !=
NULL,
"dwReserved == NULL\n");
2191 ok(0,
"unexpected call\n");
2197 ok(0,
"unexpected call\n");
2208 {
'C',
'B',
'i',
'n',
'd',
'i',
'n',
'g',
' ',
'C',
'o',
'n',
't',
'e',
'x',
't',0};
2214 ok(!fFullyAvailable,
"fFullyAvailable = %x\n", fFullyAvailable);
2216 ok(fFullyAvailable,
"fFullyAvailable = %x\n", fFullyAvailable);
2217 ok(pimkName !=
NULL,
"pimkName == NULL\n");
2218 ok(pibc !=
NULL,
"pibc == NULL\n");
2219 ok(grfMode == 0x12,
"grfMode = %lx\n", grfMode);
2222 ok(
hres ==
S_OK,
"GetObjectParam(CBinding Context) failed: %08lx\n",
hres);
2226 hres = IUnknown_QueryInterface(unk, &IID_IBinding, (
void**)&
binding);
2230 IUnknown_Release(unk);
2235 ok(
hres ==
S_OK,
"RegisterBindStatusCallback failed: %08lx\n",
hres);
2238 SET_EXPECT(QueryInterface_IBindStatusCallbackEx);
2245 SET_EXPECT(OnProgress_CACHEFILENAMEAVAILABLE);
2253 hres = IMoniker_BindToStorage(pimkName, pibc,
NULL, &IID_IStream, (
void**)&unk);
2272 IUnknown_Release(unk);
2279 ok(0,
"unexpected call\n");
2285 ok(0,
"unexpected call\n");
2291 ok(0,
"unexpected call\n");
2348 ok(0,
"unexpected call\n");
2409 ok(bctx == (
IBindCtx*)0x0ff00ff0,
"bctx should not be changed\n");
2419 bindopts.cbStruct =
sizeof(bindopts);
2420 hres = IBindCtx_GetBindOptions(bctx, &bindopts);
2421 ok(
hres ==
S_OK,
"IBindCtx_GetBindOptions failed: %08lx\n",
hres);
2422 ok(bindopts.grfFlags == BIND_MAYBOTHERUSER,
2423 "bindopts.grfFlags = %08lx, expected: BIND_MAYBOTHERUSER\n", bindopts.grfFlags);
2425 "bindopts.grfMode = %08lx, expected: STGM_READWRITE | STGM_SHARE_EXCLUSIVE\n",
2427 ok(bindopts.dwTickCountDeadline == 0,
2428 "bindopts.dwTickCountDeadline = %08lx, expected: 0\n", bindopts.dwTickCountDeadline);
2430 hres = IBindCtx_QueryInterface(bctx, &IID_IAsyncBindCtx, (
void**)&unk);
2433 IUnknown_Release(unk);
2435 ref = IBindCtx_Release(bctx);
2436 ok(
ref == 0,
"bctx should be destroyed here\n");
2448 if (!pCreateAsyncBindCtxEx) {
2449 win_skip(
"CreateAsyncBindCtxEx not present\n");
2460 bindopts.cbStruct =
sizeof(bindopts);
2461 hres = IBindCtx_GetBindOptions(bctx, &bindopts);
2462 ok(
hres ==
S_OK,
"IBindCtx_GetBindOptions failed: %08lx\n",
hres);
2463 ok(bindopts.grfFlags == BIND_MAYBOTHERUSER,
2464 "bindopts.grfFlags = %08lx, expected: BIND_MAYBOTHERUSER\n", bindopts.grfFlags);
2466 "bindopts.grfMode = %08lx, expected: STGM_READWRITE | STGM_SHARE_EXCLUSIVE\n",
2468 ok(bindopts.dwTickCountDeadline == 0,
2469 "bindopts.dwTickCountDeadline = %08lx, expected: 0\n", bindopts.dwTickCountDeadline);
2471 IBindCtx_Release(bctx);
2479 bindopts.cbStruct =
sizeof(bindopts);
2480 hres = IBindCtx_GetBindOptions(bctx, &bindopts);
2481 ok(
hres ==
S_OK,
"IBindCtx_GetBindOptions failed: %08lx\n",
hres);
2482 ok(bindopts.grfFlags == BIND_MAYBOTHERUSER,
2483 "bindopts.grfFlags = %08lx, expected: BIND_MAYBOTHERUSER\n", bindopts.grfFlags);
2485 "bindopts.grfMode = %08lx, expected: STGM_READWRITE | STGM_SHARE_EXCLUSIVE\n",
2487 ok(bindopts.dwTickCountDeadline == 0,
2488 "bindopts.dwTickCountDeadline = %08lx, expected: 0\n", bindopts.dwTickCountDeadline);
2490 IBindCtx_Release(bctx);
2493 IBindCtx_Release(bctx_arg);
2500 hres = IBindCtx_QueryInterface(bctx, &IID_IAsyncBindCtx, (
void**)&unk);
2501 ok(
hres ==
S_OK,
"QueryInterface(IID_IAsyncBindCtx) failed: %08lx\n",
hres);
2503 IUnknown_Release(unk);
2505 IBindCtx_Release(bctx);
2510 hres = pCreateAsyncBindCtxEx(bctx2, 0,
NULL,
NULL, &bctx, 0);
2516 hres = IBindCtx_GetObjectParam(bctx,
testW, &unk);
2520 IBindCtx_Release(bctx);
2521 IBindCtx_Release(bctx2);
2527 BINDINFO bindinfo = {
sizeof(bindinfo)};
2531 hres = IBindStatusCallback_QueryInterface(holder, &IID_IBindStatusCallbackEx, (
void**)&bscex);
2533 win_skip(
"IBindStatusCallbackEx not supported\n");
2540 SET_EXPECT(QueryInterface_IBindStatusCallbackEx);
2542 hres = IBindStatusCallback_GetBindInfo(holder, &
bindf, &bindinfo);
2548 SET_EXPECT(QueryInterface_IBindStatusCallbackEx);
2550 hres = IBindStatusCallbackEx_GetBindInfoEx(bscex, &
bindf, &bindinfo, &bindf2, &
dw);
2557 bindf = bindf2 =
dw = 0xdeadbeef;
2558 SET_EXPECT(QueryInterface_IBindStatusCallbackEx);
2560 hres = IBindStatusCallbackEx_GetBindInfoEx(bscex, &
bindf, &bindinfo, &bindf2, &
dw);
2564 ok(bindf2 == 0xdeadbeef,
"bindf2 = %lx\n", bindf2);
2565 ok(
dw == 0xdeadbeef,
"dw = %lx\n",
dw);
2567 IBindStatusCallbackEx_Release(bscex);
2578 BINDINFO bindinfo = {
sizeof(bindinfo)};
2584 hres = IBindStatusCallback_QueryInterface(holder, &IID_IServiceProvider, (
void**)&serv_prov);
2585 ok(
hres ==
S_OK,
"Could not get IServiceProvider interface: %08lx\n",
hres);
2588 SET_EXPECT(QueryInterface_IBindStatusCallbackEx);
2590 hres = IBindStatusCallback_GetBindInfo(holder, &
dw, &bindinfo);
2598 hres = IBindStatusCallback_OnStartBinding(holder, 0, (
void*)0xdeadbeef);
2602 hres = IBindStatusCallback_QueryInterface(holder, &IID_IHttpNegotiate, (
void**)&
http_negotiate);
2603 ok(
hres ==
S_OK,
"Could not get IHttpNegotiate interface: %08lx\n",
hres);
2606 hres = IServiceProvider_QueryService(serv_prov, &IID_IHttpNegotiate, &IID_IHttpNegotiate,
2607 (
void**)&http_negotiate_serv);
2608 ok(
hres ==
S_OK,
"Could not get IHttpNegotiate service: %08lx\n",
hres);
2611 ok(
http_negotiate == http_negotiate_serv,
"http_negotiate != http_negotiate_serv\n");
2613 wstr = (
void*)0xdeadbeef;
2620 ok(wstr ==
NULL,
"wstr = %p\n", wstr);
2622 IHttpNegotiate_Release(http_negotiate_serv);
2624 hres = IServiceProvider_QueryService(serv_prov, &IID_IHttpNegotiate, &IID_IHttpNegotiate,
2625 (
void**)&http_negotiate_serv);
2626 ok(
hres ==
S_OK,
"Could not get IHttpNegotiate service: %08lx\n",
hres);
2627 ok(
http_negotiate == http_negotiate_serv,
"http_negotiate != http_negotiate_serv\n");
2628 IHttpNegotiate_Release(http_negotiate_serv);
2630 hres = IBindStatusCallback_QueryInterface(holder, &IID_IHttpNegotiate2, (
void**)&http_negotiate2);
2635 hres = IServiceProvider_QueryService(serv_prov, &IID_IHttpNegotiate2, &IID_IHttpNegotiate2,
2636 (
void**)&http_negotiate2_serv);
2637 ok(
hres ==
S_OK,
"Could not get IHttpNegotiate2 service: %08lx\n",
hres);
2639 ok(http_negotiate2 == http_negotiate2_serv,
"http_negotiate != http_negotiate_serv\n");
2643 hres = IHttpNegotiate2_GetRootSecurityId(http_negotiate2, (
void*)0xdeadbeef, (
void*)0xdeadbeef, 0);
2648 IHttpNegotiate2_Release(http_negotiate2_serv);
2649 IHttpNegotiate2_Release(http_negotiate2);
2651 skip(
"Could not get IHttpNegotiate2\n");
2656 hres = IBindStatusCallback_OnProgress(holder, 0, 0, BINDSTATUS_FINDINGRESOURCE,
NULL);
2662 wstr = (
void*)0xdeadbeef;
2670 hres = IBindStatusCallback_QueryInterface(holder, &IID_IAuthenticate, (
void**)&authenticate);
2671 ok(
hres ==
S_OK,
"Could not get IAuthenticate interface: %08lx\n",
hres);
2675 hres = IServiceProvider_QueryService(serv_prov, &IID_IAuthenticate, &IID_IAuthenticate,
2676 (
void**)&authenticate_serv);
2677 ok(
hres ==
S_OK,
"Could not get IAuthenticate service: %08lx\n",
hres);
2680 ok(authenticate == authenticate_serv,
"authenticate != authenticate_serv\n");
2681 IAuthenticate_Release(authenticate_serv);
2683 hres = IServiceProvider_QueryService(serv_prov, &IID_IAuthenticate, &IID_IAuthenticate,
2684 (
void**)&authenticate_serv);
2685 ok(
hres ==
S_OK,
"Could not get IAuthenticate service: %08lx\n",
hres);
2686 ok(authenticate == authenticate_serv,
"authenticate != authenticate_serv\n");
2688 IAuthenticate_Release(authenticate);
2689 IAuthenticate_Release(authenticate_serv);
2691 hres = IBindStatusCallback_QueryInterface(holder, &IID_IInternetBindInfo, (
void**)&
bind_info);
2695 hres = IInternetBindInfo_GetBindString(
bind_info, BINDSTRING_USER_AGENT, &wstr, 1, &
dw);
2702 hres = IBindStatusCallback_OnStopBinding(holder,
S_OK,
NULL);
2706 SET_EXPECT(QueryInterface_IInternetProtocol);
2708 hres = IServiceProvider_QueryService(serv_prov, &IID_IInternetProtocol, &IID_IInternetProtocol,
2714 IServiceProvider_Release(serv_prov);
2736 SET_EXPECT(QueryInterface_IBindStatusCallback);
2737 SET_EXPECT(QueryInterface_IBindStatusCallbackHolder);
2738 prevbsc = (
void*)0xdeadbeef;
2740 ok(
hres ==
S_OK,
"RegisterBindStatusCallback failed: %08lx\n",
hres);
2743 CHECK_CALLED(QueryInterface_IBindStatusCallbackHolder);
2750 hres = IUnknown_QueryInterface(unk, &IID_IBindStatusCallback, (
void**)&clb);
2751 IUnknown_Release(unk);
2752 ok(
hres ==
S_OK,
"QueryInterface(IID_IBindStatusCallback) failed: %08lx\n",
hres);
2758 IBindStatusCallback_Release(clb);
2761 ok(
hres ==
S_OK,
"RevokeBindStatusCallback failed: %08lx\n",
hres);
2763 unk = (
void*)0xdeadbeef;
2766 ok(unk ==
NULL,
"unk != NULL\n");
2769 IUnknown_Release(unk);
2772 ok(
hres ==
S_OK,
"RevokeBindStatusCallback failed: %08lx\n",
hres);
2781 prevbsc = (
void*)0xdeadbeef;
2783 ok(
hres ==
S_OK,
"RegisterBindStatusCallback failed: %08lx\n",
hres);
2784 ok(!prevbsc,
"prevbsc=%p\n", prevbsc);
2790 hres = IUnknown_QueryInterface(unk, &IID_IBindStatusCallback, (
void**)&prev_clb);
2791 IUnknown_Release(unk);
2792 ok(
hres ==
S_OK,
"QueryInterface(IID_IBindStatusCallback) failed: %08lx\n",
hres);
2796 prevbsc = (
void*)0xdeadbeef;
2798 ok(
hres ==
S_OK,
"RegisterBindStatusCallback failed: %08lx\n",
hres);
2805 hres = IUnknown_QueryInterface(unk, &IID_IBindStatusCallback, (
void**)&clb);
2806 IUnknown_Release(unk);
2807 ok(
hres ==
S_OK,
"QueryInterface(IID_IBindStatusCallback) failed: %08lx\n",
hres);
2808 ok(prev_clb == clb,
"bsc != clb\n");
2810 IBindStatusCallback_Release(clb);
2811 IBindStatusCallback_Release(prev_clb);
2813 IBindCtx_Release(bindctx);
2819#define BINDTEST_EMULATE 0x0001
2820#define BINDTEST_TOOBJECT 0x0002
2821#define BINDTEST_FILEDWLAPI 0x0004
2822#define BINDTEST_HTTPRESPONSE 0x0008
2823#define BINDTEST_REDIRECT 0x0010
2824#define BINDTEST_USE_CACHE 0x0020
2825#define BINDTEST_NO_CALLBACK_READ 0x0040
2826#define BINDTEST_NO_CALLBACK 0x0080
2827#define BINDTEST_ABORT 0x0100
2828#define BINDTEST_INVALID_CN 0x0200
2829#define BINDTEST_ABORT_START 0x0400
2830#define BINDTEST_ABORT_PROGRESS 0x0800
2831#define BINDTEST_ASYNC_SWITCH 0x1000
2832#define BINDTEST_ALLOW_FINDINGRESOURCE 0x2000
2836 const char *url_a =
NULL;
2855 url_a =
"http://test.winehq.org/tests/post.php";
2860 url_a =
"about:blank";
2866 url_a =
"mk:@MSITStore:test.chm::/blank.html";
2869 url_a =
"its:test.chm::/blank.html";
2875 url_a =
"ftp://ftp.winehq.org/welcome%2emsg";
2878 url_a =
"winetest:test";
2906 {
L"https://test.winehq.org/",
L"/tests/hello.html",
L"https://test.winehq.org/tests/hello.html"},
2907 {
L"url1",
L"url2",
L"url2"},
2908 {
L"http://",
L"tests.winehq.org",
L"http:///tests.winehq.org"},
2909 {
L"http://a/b/c/d;p?q#f",
L"g",
L"http://a/b/c/g"},
2910 {
L"http://a/b/c/d;p?q#f",
L"./g",
L"http://a/b/c/g"},
2911 {
L"http://a/b/c/d;p?q#f",
L"g/",
L"http://a/b/c/g/"},
2912 {
L"http://a/b/c/d;p?q#f",
L"/g",
L"http://a/g"},
2913 {
L"http://a/b/c/d;p?q#f",
L"//g",
L"http://g/"},
2914 {
L"http://a/b/c/d;p?q#f",
L"?y",
L"http://a/b/c/d;p?y"},
2915 {
L"http://a/b/c/d;p?q#f",
L"g?y",
L"http://a/b/c/g?y"},
2916 {
L"http://a/b/c/d;p?q#f",
L"g?y/./x",
L"http://a/b/c/g?y/./x"},
2917 {
L"http://a/b/c/d;p?q#f",
L"#s",
L"http://a/b/c/d;p?q#s"},
2918 {
L"http://a/b/c/d;p?q#f",
L"g#s",
L"http://a/b/c/g#s"},
2919 {
L"http://a/b/c/d;p?q#f",
L"g#s/./x",
L"http://a/b/c/g#s/./x"},
2920 {
L"http://a/b/c/d;p?q#f",
L"g?y#s",
L"http://a/b/c/g?y#s"},
2921 {
L"http://a/b/c/d;p?q#f",
L";x",
L"http://a/b/c/;x"},
2922 {
L"http://a/b/c/d;p?q#f",
L"g;x",
L"http://a/b/c/g;x"},
2923 {
L"http://a/b/c/d;p?q#f",
L"g;x?y#s",
L"http://a/b/c/g;x?y#s"},
2924 {
L"http://a/b/c/d;p?q#f",
L".",
L"http://a/b/c/"},
2925 {
L"http://a/b/c/d;p?q#f",
L"./",
L"http://a/b/c/"},
2926 {
L"http://a/b/c/d;p?q#f",
L"..",
L"http://a/b/"},
2927 {
L"http://a/b/c/d;p?q#f",
L"../",
L"http://a/b/"},
2928 {
L"http://a/b/c/d;p?q#f",
L"../g",
L"http://a/b/g"},
2929 {
L"http://a/b/c/d;p?q#f",
L"../..",
L"http://a/"},
2930 {
L"http://a/b/c/d;p?q#f",
L"../../",
L"http://a/"},
2931 {
L"http://a/b/c/d;p?q#f",
L"../../g",
L"http://a/g"},
2932 {
L"http://a/b/c/d;p?q#f",
L"../../../g",
L"http://a/g"},
2933 {
L"http://a/b/c/d;p?q#f",
L"../../../../g",
L"http://a/g"},
2934 {
L"http://a/b/c/d;p?q#f",
L"/./g",
L"http://a/g"},
2935 {
L"http://a/b/c/d;p?q#f",
L"/../g",
L"http://a/g"},
2936 {
L"http://a/b/c/d;p?q#f",
L"g.",
L"http://a/b/c/g."},
2937 {
L"http://a/b/c/d;p?q#f",
L".g",
L"http://a/b/c/.g"},
2938 {
L"http://a/b/c/d;p?q#f",
L"g..",
L"http://a/b/c/g.."},
2939 {
L"http://a/b/c/d;p?q#f",
L"..g",
L"http://a/b/c/..g"},
2940 {
L"http://a/b/c/d;p?q#f",
L"./../g",
L"http://a/b/g"},
2941 {
L"http://a/b/c/d;p?q#f",
L"./g/.",
L"http://a/b/c/g/"},
2942 {
L"http://a/b/c/d;p?q#f",
L"g/./h",
L"http://a/b/c/g/h"},
2943 {
L"http://a/b/c/d;p?q#f",
L"g/../h",
L"http://a/b/c/h"},
2944 {
L"file://a/b/c/d;p?q#f",
L"http:g",
L"http:g"},
2945 {
L"http://a/b/c/d;p?q#f",
L"http://g/h",
L"http://g/h"},
2947 IMoniker *lmon, *rmon, *outmon, *filemon;
2961 hres = IMoniker_ComposeWith(lmon, rmon,
FALSE, &outmon);
2965 IMoniker_GetClassID(outmon, &
clsid);
2968 IMoniker_GetDisplayName(outmon,
bind,
NULL, &urlpath);
2972 IMoniker_Release(lmon);
2973 IMoniker_Release(rmon);
2974 IMoniker_Release(outmon);
2977 IBindCtx_Release(
bind);
2992 hres = IMoniker_ComposeWith(lmon, filemon,
TRUE, &outmon);
2994 hres = IMoniker_ComposeWith(lmon, filemon,
FALSE, &outmon);
2997 IMoniker_GetClassID(outmon, &
clsid);
3001 IMoniker_Release(lmon);
3002 IMoniker_Release(rmon);
3003 IMoniker_Release(filemon);
3004 IMoniker_Release(outmon);
3011 LPOLESTR display_name;
3016 BOOL allow_finding_resource;
3035 ok(
hres ==
S_OK,
"RegisterBindStatusCallback failed: %08lx\n",
hres);
3039 IBindStatusCallback_Release(previousclb);
3054 hres = IMoniker_QueryInterface(mon, &IID_IBinding, (
void**)&
bind);
3057 IBinding_Release(
bind);
3059 hres = IMoniker_GetDisplayName(mon, bctx,
NULL, &display_name);
3079 SET_EXPECT(QueryInterface_IBindStatusCallbackEx);
3081 SET_EXPECT(QueryInterface_IInternetProtocol);
3100 SET_EXPECT(QueryInterface_IWindowForBindingUI);
3101 SET_EXPECT(QueryService_IWindowForBindingUI);
3132 SET_EXPECT(OnProgress_CACHEFILENAMEAVAILABLE);
3147 skip(
"Network unreachable, skipping tests\n");
3157 ok(
hres == MK_S_ASYNCHRONOUS,
"IMoniker_BindToStorage failed: %08lx\n",
hres);
3161 ok(
hres ==
S_OK,
"IMoniker_BindToStorage failed: %08lx\n",
hres);
3162 ok(unk !=
NULL,
"unk == NULL\n");
3163 }
else if(!(
bindf & BINDF_ASYNCHRONOUS) &&
tymed == TYMED_FILE) {
3164 ok(
hres ==
S_OK,
"IMoniker_BindToStorage failed: %08lx\n",
hres);
3165 ok(unk ==
NULL,
"unk != NULL\n");
3168 ok(
hres == MK_S_ASYNCHRONOUS,
"IMoniker_BindToStorage failed: %08lx\n",
hres);
3169 ok(unk ==
NULL,
"istr should be NULL\n");
3172 "IMoniker_BindToStorage failed: %08lx, expected INET_E_DATA_NOT_AVAILABLE\n",
hres);
3173 ok(unk ==
NULL,
"istr should be NULL\n");
3176 ok(unk ==
NULL,
"Got %p\n", unk);
3178 ok(
hres ==
S_OK,
"IMoniker_BindToStorage failed: %08lx\n",
hres);
3179 ok(unk !=
NULL,
"unk == NULL\n");
3181 ok(0,
"Expected security problem to be ignored.\n");
3186 ok(
hres ==
S_OK,
"IMoniker_BindToStorage failed: %08lx\n",
hres);
3187 ok(unk !=
NULL,
"unk == NULL\n");
3190 IUnknown_Release(unk);
3228 if(
tymed == TYMED_FILE)
3261 if(allow_finding_resource)
3310 ok(IMoniker_Release(mon) == 0,
"mon should be destroyed here\n");
3312 ok(IBindCtx_Release(bctx) == 0,
"bctx should be destroyed here\n");
3325 hres = IUnknown_QueryInterface(unk, &IID_IStream, (
void**)&
stream);
3327 IUnknown_Release(unk);
3332 ok(
read != 0xdeadbeef,
"read = 0xdeadbeef\n");
3347 LPOLESTR display_name;
3371 IBindCtx_Release(bctx);
3375 hres = IMoniker_QueryInterface(mon, &IID_IBinding, (
void**)&
bind);
3378 IBinding_Release(
bind);
3380 hres = IMoniker_GetDisplayName(mon, bctx,
NULL, &display_name);
3385 SET_EXPECT(QueryInterface_IBindStatusCallbackEx);
3387 SET_EXPECT(QueryInterface_IInternetProtocol);
3409 SET_EXPECT(QueryInterface_IWindowForBindingUI);
3410 SET_EXPECT(QueryService_IWindowForBindingUI);
3419 SET_EXPECT(Obj_OnProgress_MIMETYPEAVAILABLE);
3420 SET_EXPECT(Obj_OnProgress_BEGINDOWNLOADDATA);
3422 SET_EXPECT(Obj_OnProgress_CACHEFILENAMEAVAILABLE);
3428 SET_EXPECT(Obj_OnProgress_BEGINSYNCOPERATION);
3430 SET_EXPECT(QueryInterface_IWindowForBindingUI);
3431 SET_EXPECT(QueryService_IWindowForBindingUI);
3445 skip(
"Network unreachable, skipping tests\n" );
3450 ok(
hres == exhres,
"BindToObject failed: %08lx, expected %08lx\n",
hres, exhres);
3451 ok(!unk,
"unk = %p, expected NULL\n", unk);
3452 }
else if(
bindf & BINDF_ASYNCHRONOUS) {
3453 ok(
hres == MK_S_ASYNCHRONOUS,
"IMoniker_BindToObject failed: %08lx\n",
hres);
3454 ok(unk ==
NULL,
"istr should be NULL\n");
3456 ok(
hres ==
S_OK,
"IMoniker_BindToStorage failed: %08lx\n",
hres);
3457 ok(unk !=
NULL,
"unk == NULL\n");
3462 IUnknown_Release(unk);
3464 while((
bindf & BINDF_ASYNCHRONOUS) &&
3536 ok(IMoniker_Release(mon) == 0,
"mon should be destroyed here\n");
3537 IBindCtx_Release(bctx);
3554 SET_EXPECT(QueryInterface_IInternetProtocol);
3570 SET_EXPECT(QueryInterface_IWindowForBindingUI);
3582 SET_EXPECT(OnProgress_CACHEFILENAMEAVAILABLE);
3656 SET_EXPECT(QueryInterface_IInternetProtocol);
3664 SET_EXPECT(QueryInterface_IWindowForBindingUI);
3670 ok(
hres ==
E_ABORT,
"URLDownloadToFile failed: %08lx, expected E_ABORT\n",
hres);
3689 SET_EXPECT(QueryInterface_IInternetProtocol);
3697 ok(
hres ==
E_ABORT,
"URLDownloadToFile failed: %08lx, expected E_ABORT\n",
hres);
3709 SET_EXPECT(QueryInterface_IInternetProtocol);
3717 SET_EXPECT(QueryInterface_IWindowForBindingUI);
3810 memset(curdir, 0,
sizeof(curdir));
3836 SET_EXPECT(QueryInterface_IBindStatusCallbackEx);
3838 SET_EXPECT(QueryInterface_IInternetProtocol);
3844 hres = IMoniker_BindToStorage(mon, bctx,
NULL, &IID_IStream, (
void**)&unk);
3846 ok(
hres ==
S_OK ||
hres == MK_S_ASYNCHRONOUS,
"BindToStorage failed: %08lx\n",
hres);
3848 ok(
hres == exhres ||
hres == MK_S_ASYNCHRONOUS,
3849 "BindToStorage failed: %08lx, expected %08lx or MK_S_ASYNCHRONOUS\n",
hres, exhres);
3859 ok(unk ==
NULL,
"unk=%p\n", unk);
3861 IBindCtx_Release(bctx);
3862 IMoniker_Release(mon);
3880 unk = (
void*)0xdeadbeef;
3881 hres = IMoniker_BindToStorage(mon, bctx,
NULL, &IID_IStream, (
void**)&unk);
3883 "hres=%08lx, expected MK_E_SYNTAX or INET_E_DATA_NOT_AVAILABLE\n",
hres);
3884 ok(unk ==
NULL,
"got %p\n", unk);
3886 IBindCtx_Release(bctx);
3888 IMoniker_Release(mon);
3897 LPOLESTR display_name;
3903 &IID_IMoniker, (
void**)&mon);
3904 ok(
hres ==
S_OK,
"Could not create IInternet instance: %08lx\n",
hres);
3908 hres = IMoniker_QueryInterface(mon, &IID_IAsyncMoniker, (
void**)&async_mon);
3909 ok(
hres ==
S_OK,
"Could not get IAsyncMoniker iface: %08lx\n",
hres);
3910 ok(mon == async_mon,
"mon != async_mon\n");
3911 IMoniker_Release(async_mon);
3913 hres = IMoniker_GetDisplayName(mon,
NULL,
NULL, &display_name);
3920 hres = IMoniker_QueryInterface(mon, &IID_IUriContainer, (
void**)&uri_container);
3921 ok(
hres ==
S_OK,
"Could not get IUriMoniker iface: %08lx\n",
hres);
3924 uri = (
void*)0xdeadbeef;
3925 hres = IUriContainer_GetIUri(uri_container, &
uri);
3927 ok(!
uri,
"uri = %p, expected NULL\n",
uri);
3929 IUriContainer_Release(uri_container);
3938 unk = (
void*)0xdeadbeef;
3939 hres = IMoniker_BindToStorage(mon, bctx,
NULL, &IID_IStream, (
void**)&unk);
3941 ok(!unk,
"unk = %p\n", unk);
3943 unk = (
void*)0xdeadbeef;
3946 ok(!unk,
"unk = %p\n", unk);
3949 IMoniker_Release(mon);
3957 static const WCHAR winetestW[] = {
'w',
'i',
'n',
'e',
't',
'e',
's',
't',0};
3968 IInternetSession_Release(
session);
3977 ok(ses !=
NULL,
"InternetOpen failed\n");
3981 ok(con !=
NULL,
"InternetConnect failed\n");
3985 ok(req !=
NULL,
"HttpOpenRequest failed\n");
4003 pCreateAsyncBindCtxEx = (
void*)
GetProcAddress(hurlmon,
"CreateAsyncBindCtxEx");
4023 trace(
"test CreateAsyncBindCtx...\n");
4026 trace(
"test CreateAsyncBindCtxEx...\n");
4029 trace(
"test RegisterBindStatusCallback...\n");
4031 trace(
"test BindToStorage failures...\n");
4034 trace(
"synchronous http test (COM not initialised)...\n");
4039 trace(
"test StdURLMoniker...\n");
4042 trace(
"test URLMonikerComposeWith...\n");
4045 trace(
"synchronous http test...\n");
4048 trace(
"emulated synchronous http test (to file)...\n");
4051 trace(
"synchronous http test (to object)...\n");
4054 trace(
"emulated synchronous http test (with cache)...\n");
4057 trace(
"emulated synchronous http test (with cache, no read)...\n");
4060 trace(
"synchronous http test (with cache, no read)...\n");
4063 trace(
"synchronous file test...\n");
4066 trace(
"emulated synchronous file test (to file)...\n");
4069 trace(
"synchronous file test (to object)...\n");
4072 trace(
"bind to an object of not registered MIME type...\n");
4073 create_file(
"test.winetest",
"\x01\x02\x03xxxxxxxxxxxxxxxxxxxxxxxxx");
4077 trace(
"file test (no callback)...\n");
4081 trace(
"synchronous https test (invalid CN, dialog)\n");
4086 bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA;
4088 trace(
"asynchronous https test (invalid CN, fail)\n");
4092 trace(
"asynchronous https test (invalid CN, accept)\n");
4096 trace(
"asynchronous https test (invalid CN, dialog 2)\n");
4101 trace(
"asynchronous https test...\n");
4104 win_skip(
"Skipping https tests\n");
4107 bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA;
4109 trace(
"winetest test (async switch)...\n");
4112 trace(
"about test (no read)...\n");
4115 trace(
"http test...\n");
4118 trace(
"http test (to file)...\n");
4121 trace(
"http test (to object)...\n");
4124 trace(
"http test (short response)...\n");
4127 trace(
"http test (short response, to object)...\n");
4130 trace(
"http test (abort start binding E_NOTIMPL)...\n");
4134 trace(
"http test (abort start binding E_ABORT)...\n");
4138 trace(
"http test (abort progress)...\n");
4141 trace(
"emulated http test...\n");
4144 trace(
"emulated http test (to object)...\n");
4147 trace(
"emulated http test (to object, redirect)...\n");
4150 trace(
"emulated http test (to file)...\n");
4153 trace(
"emulated http test (redirect)...\n");
4156 trace(
"emulated http test (with cache)...\n");
4159 trace(
"winetest test (no callback)...\n");
4162 trace(
"emulated https test...\n");
4165 trace(
"about test...\n");
4168 trace(
"about test (to file)...\n");
4171 trace(
"about test (to object)...\n");
4174 trace(
"emulated about test...\n");
4177 trace(
"emulated about test (to file)...\n");
4180 trace(
"emulated about test (to object)...\n");
4183 trace(
"emulated test reporting result in read...\n");
4186 trace(
"file test...\n");
4189 trace(
"file test (to file)...\n");
4192 trace(
"file test (to object)...\n");
4195 trace(
"emulated file test...\n");
4198 trace(
"emulated file test (to file)...\n");
4201 trace(
"emulated file test (to object)...\n");
4204 trace(
"emulated its test...\n");
4207 trace(
"emulated its test (to file)...\n");
4210 trace(
"emulated mk test...\n");
4213 trace(
"test URLDownloadToFile for file protocol...\n");
4216 trace(
"test URLDownloadToFile for emulated file protocol...\n");
4219 trace(
"test URLDownloadToFile for http protocol...\n");
4222 trace(
"test URLDownloadToFile abort...\n");
4225 trace(
"test emulated http abort...\n");
4228 bindf |= BINDF_NOWRITECACHE;
4230 trace(
"ftp test...\n");
4234 win_skip(
"Skipping test_BindToStorage(FTP_TEST, 0, TYMED_ISTREAM) because it doesn't progress.");
4240 trace(
"test failures...\n");
4243 bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE;
4246 trace(
"check emulated http protocol arguments...\n");
const GUID IID_IClassFactory
static WCHAR cbinding_contextW[]
#define RegCloseKey(hKey)
const CLSID CLSID_IdentityUnmarshal
static const WCHAR proxy_enable[]
static const WCHAR internet_settings[]
LONG WINAPI RegOpenKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD ulOptions, _In_ REGSAM samDesired, _Out_ PHKEY phkResult)
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
HRESULT WINAPI DECLSPEC_HOTPATCH CoRevokeClassObject(DWORD cookie)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
HRESULT WINAPI CLSIDFromString(LPCOLESTR str, LPCLSID clsid)
HRESULT WINAPI CoRegisterClassObject(REFCLSID rclsid, IUnknown *object, DWORD clscontext, DWORD flags, DWORD *cookie)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
void WINAPI CoTaskMemFree(void *ptr)
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
#define FILE_ATTRIBUTE_NORMAL
#define WideCharToMultiByte
#define MultiByteToWideChar
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
BOOL WINAPI WriteFile(_In_ HANDLE hFile, _In_reads_bytes_opt_(nNumberOfBytesToWrite) LPCVOID lpBuffer, _In_ DWORD nNumberOfBytesToWrite, _Out_opt_ LPDWORD lpNumberOfBytesWritten, _Inout_opt_ LPOVERLAPPED lpOverlapped)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
DWORD WINAPI GetCurrentDirectoryA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
HRESULT WINAPI UrlUnescapeW(WCHAR *url, WCHAR *unescaped, DWORD *unescaped_len, DWORD flags)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
_ACRTIMP size_t __cdecl strlen(const char *)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
HRESULT WINAPI CoInternetGetSession(DWORD dwSessionMode, IInternetSession **ppIInternetSession, DWORD dwReserved)
HINTERNET WINAPI HttpOpenRequestA(HINTERNET hHttpSession, LPCSTR lpszVerb, LPCSTR lpszObjectName, LPCSTR lpszVersion, LPCSTR lpszReferrer, LPCSTR *lpszAcceptTypes, DWORD dwFlags, DWORD_PTR dwContext)
BOOL WINAPI HttpSendRequestA(HINTERNET hHttpRequest, LPCSTR lpszHeaders, DWORD dwHeaderLength, LPVOID lpOptional, DWORD dwOptionalLength)
HINTERNET WINAPI InternetOpenA(LPCSTR lpszAgent, DWORD dwAccessType, LPCSTR lpszProxy, LPCSTR lpszProxyBypass, DWORD dwFlags)
BOOL WINAPI InternetCloseHandle(HINTERNET hInternet)
HINTERNET WINAPI InternetConnectA(HINTERNET hInternet, LPCSTR lpszServerName, INTERNET_PORT nServerPort, LPCSTR lpszUserName, LPCSTR lpszPassword, DWORD dwService, DWORD dwFlags, DWORD_PTR dwContext)
PVOID LockRequest(PIRP Irp, PIO_STACK_LOCATION IrpSp, BOOLEAN Output, KPROCESSOR_MODE *LockMode)
VOID UnlockRequest(PIRP Irp, PIO_STACK_LOCATION IrpSp)
HRESULT WINAPI CreateFileMoniker(LPCOLESTR lpszPathName, IMoniker **ppmk)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLdouble GLdouble GLdouble r
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
REFIID LPVOID DWORD_PTR dw
static CInternetFolder * CreateInstance(void)
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
LPSTR WINAPI lstrcatA(LPSTR lpString1, LPCSTR lpString2)
#define todo_wine_if(is_todo)
#define memcpy(s1, s2, n)
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
#define create_file(name, size)
static IServiceProvider service_provider
static void test_BindToObject(void)
static IInternetBindInfo bind_info
static const WCHAR testW[]
static RPC_BINDING_HANDLE binding
static const WCHAR url1[]
static const WCHAR url2[]
static PROTOCOLDATA protocoldata
static IHttpSecurity http_security
static IHttpNegotiate2 http_negotiate
static IInternetProtocolSink * binding_sink
static void test_CreateURLMoniker(void)
static const WCHAR about_blankW[]
static HRESULT WINAPI ServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService, REFIID riid, void **ppv)
static BOOL strict_bsc_qi
static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
static IInternetPriority InternetPriority
static HRESULT WINAPI PersistMoniker_GetClassID(IPersistMoniker *iface, CLSID *pClassID)
#define BINDTEST_ABORT_START
#define BINDTEST_USE_CACHE
static HRESULT WINAPI statusclb_GetBindInfo(IBindStatusCallbackEx *iface, DWORD *grfBINDF, BINDINFO *pbindinfo)
static HRESULT WINAPI Protocol_Read(IInternetProtocol *iface, void *pv, ULONG cb, ULONG *pcbRead)
static IBinding * current_binding
#define BINDTEST_NO_CALLBACK
#define CLEAR_CALLED(func)
#define BINDTEST_HTTPRESPONSE
static HRESULT WINAPI statusclb_OnStopBinding(IBindStatusCallbackEx *iface, HRESULT hresult, LPCWSTR szError)
static const IClassFactoryVtbl ProtocolCFVtbl
static HANDLE complete_event2
static void test_MonikerComposeWith(void)
CLSID CLSID_AboutProtocol
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL dolock)
static BOOL is_async_prot
static HRESULT WINAPI Priority_SetPriority(IInternetPriority *iface, LONG nPriority)
static BOOL can_do_https(void)
static IClassFactory mime_cf
static DWORD security_problem
static ULONG WINAPI ServiceProvider_Release(IServiceProvider *iface)
static HRESULT WINAPI Protocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserved)
#define BINDTEST_NO_CALLBACK_READ
static HRESULT WINAPI HttpNegotiate_OnResponse(IHttpNegotiate2 *iface, DWORD dwResponseCode, LPCWSTR szResponseHeaders, LPCWSTR szRequestHeaders, LPWSTR *pszAdditionalRequestHeaders)
static void test_ReportResult(HRESULT exhres)
static const WCHAR wszWineHQIP[]
static HANDLE complete_event
static HRESULT WINAPI PersistMoniker_Save(IPersistMoniker *iface, IMoniker *pimkName, LPBC pbc, BOOL fRemember)
static HRESULT abort_hres
static HRESULT WINAPI statusclb_OnObjectAvailable(IBindStatusCallbackEx *iface, REFIID riid, IUnknown *punk)
static WCHAR file_url[INTERNET_MAX_URL_LENGTH]
static HRESULT WINAPI HttpSecurity_QueryInterface(IHttpSecurity *iface, REFIID riid, void **ppv)
#define BINDTEST_TOOBJECT
static HRESULT WINAPI MonikerProp_PutProperty(IMonikerProp *iface, MONIKERPROPERTY mkp, LPCWSTR val)
static BOOL bind_to_object
static const WCHAR dwl_htmlW[]
static const WCHAR winetest_data_urlW[]
static HRESULT WINAPI Protocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv)
#define BINDTEST_FILEDWLAPI
static void test_URLDownloadToFile_abort(void)
static HRESULT WINAPI statusclb_OnLowResource(IBindStatusCallbackEx *iface, DWORD reserved)
static const IClassFactoryVtbl ClassFactoryVtbl
static HRESULT WINAPI Protocol_Suspend(IInternetProtocol *iface)
static ULONG WINAPI MonikerProp_AddRef(IMonikerProp *iface)
static HRESULT WINAPI Protocol_Terminate(IInternetProtocol *iface, DWORD dwOptions)
static ULONG WINAPI PersistMoniker_Release(IPersistMoniker *iface)
static HRESULT WINAPI PersistMoniker_IsDirty(IPersistMoniker *iface)
static ULONG WINAPI HttpNegotiate_Release(IHttpNegotiate2 *iface)
static const IPersistMonikerVtbl PersistMonikerVtbl
static BOOL test_bscholder(IBindStatusCallback *holder)
static HRESULT WINAPI HttpSecurity_GetWindow(IHttpSecurity *iface, REFGUID rguidReason, HWND *phwnd)
static IBindStatusCallbackEx bsc2
static void test_create(void)
#define BINDTEST_INVALID_CN
static BOOL stopped_binding
static IServiceProvider ServiceProvider
#define CHECK_EXPECT(func)
static HRESULT binding_hres
static void test_GetBindInfoEx(IBindStatusCallback *holder)
#define BINDTEST_REDIRECT
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
#define DEFINE_EXPECT(func)
static const CHAR test_txtA[]
static BOOL emulate_protocol
static BOOL only_check_prot_args
static void test_CreateAsyncBindCtx(void)
#define BINDTEST_ALLOW_FINDINGRESOURCE
static HRESULT WINAPI statusclb_OnStartBinding(IBindStatusCallbackEx *iface, DWORD dwReserved, IBinding *pib)
static HRESULT WINAPI statusclb_QueryInterface(IBindStatusCallbackEx *iface, REFIID riid, void **ppv)
static IHttpNegotiate2Vtbl HttpNegotiateVtbl
static IHttpSecurity HttpSecurity
static ULONG WINAPI HttpSecurity_Release(IHttpSecurity *iface)
static IMonikerProp MonikerProp
#define BINDTEST_ASYNC_SWITCH
static HRESULT WINAPI ProtocolCF_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
static ULONG WINAPI Priority_AddRef(IInternetPriority *iface)
static enum @1885 test_protocol
static BOOL abort_progress
static HRESULT WINAPI HttpSecurity_OnSecurityProblem(IHttpSecurity *iface, DWORD dwProblem)
static const IMonikerPropVtbl MonikerPropVtbl
static const CHAR dwl_htmlA[]
static void test_BindToStorage_fail(void)
static ULONG WINAPI Protocol_AddRef(IInternetProtocol *iface)
static DWORD WINAPI thread_proc(PVOID arg)
static enum @1886 download_state
static BOOL callback_read
static IHttpNegotiate2 HttpNegotiate
static HRESULT WINAPI HttpNegotiate_GetRootSecurityId(IHttpNegotiate2 *iface, BYTE *pbSecurityId, DWORD *pcbSecurityId, DWORD_PTR dwReserved)
static const WCHAR cache_fileW[]
static void test_WinInetHttpInfo(IWinInetHttpInfo *http_info, DWORD progress)
static HRESULT WINAPI statusclb_GetBindInfoEx(IBindStatusCallbackEx *iface, DWORD *grfBINDF, BINDINFO *pbindinfo, DWORD *grfBINDF2, DWORD *pdwReserved)
static IPersistMoniker PersistMoniker
static BOOL have_IHttpNegotiate2
static void register_protocols(void)
static HRESULT WINAPI MonikerProp_QueryInterface(IMonikerProp *iface, REFIID riid, void **ppv)
#define CHECK_EXPECT2(func)
static HRESULT WINAPI HttpNegotiate_BeginningTransaction(IHttpNegotiate2 *iface, LPCWSTR szURL, LPCWSTR szHeaders, DWORD dwReserved, LPWSTR *pszAdditionalHeaders)
static HRESULT WINAPI statusclb_OnProgress(IBindStatusCallbackEx *iface, ULONG ulProgress, ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText)
static HRESULT WINAPI PersistMoniker_GetCurMoniker(IPersistMoniker *iface, IMoniker **pimkName)
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
static const IHttpSecurityVtbl HttpSecurityVtbl
static HRESULT WINAPI Priority_QueryInterface(IInternetPriority *iface, REFIID riid, void **ppv)
static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAvailable, IMoniker *pimkName, LPBC pibc, DWORD grfMode)
static HRESULT WINAPI PersistMoniker_SaveCompleted(IPersistMoniker *iface, IMoniker *pimkName, LPBC pibc)
static const WCHAR emptyW[]
static void create_html_file(void)
static ULONG WINAPI Protocol_Release(IInternetProtocol *iface)
static BOOL test_RegisterBindStatusCallback(void)
static const CHAR wszIndexHtmlA[]
static HRESULT WINAPI ProtocolCF_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
static HRESULT WINAPI statusclb_GetPriority(IBindStatusCallbackEx *iface, LONG *pnPriority)
static DWORD bindtest_flags
static ULONG WINAPI Priority_Release(IInternetPriority *iface)
static ULONG WINAPI statusclb_AddRef(IBindStatusCallbackEx *iface)
static ULONG WINAPI statusclb_Release(IBindStatusCallbackEx *iface)
static BOOL http_is_first
#define CHECK_CALLED(func)
static void set_file_url(char *path)
static HRESULT WINAPI Protocol_Resume(IInternetProtocol *iface)
static HRESULT WINAPI Protocol_UnlockRequest(IInternetProtocol *iface)
static const WCHAR * reported_url
static HRESULT WINAPI Protocol_Abort(IInternetProtocol *iface, HRESULT hrReason, DWORD dwOptions)
static void test_StdURLMoniker(void)
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
static const char * test_file
static ULONG WINAPI HttpNegotiate_AddRef(IHttpNegotiate2 *iface)
static BOOL stopped_obj_binding
static IInternetProtocolSink * protocol_sink
static BOOL invalid_cn_accepted
static BOOL is_urlmon_protocol(int prot)
#define BINDTEST_ABORT_PROGRESS
static void init_bind_test(int protocol, DWORD flags, DWORD t)
static ULONG WINAPI PersistMoniker_AddRef(IPersistMoniker *iface)
static const IInternetPriorityVtbl InternetPriorityVtbl
static void test_CreateAsyncBindCtxEx(void)
static WCHAR BSCBHolder[]
static void test_BindToStorage(int protocol, DWORD flags, DWORD t)
static HRESULT WINAPI statusclb_OnDataAvailable(IBindStatusCallbackEx *iface, DWORD grfBSCF, DWORD dwSize, FORMATETC *pformatetc, STGMEDIUM *pstgmed)
static HRESULT WINAPI HttpNegotiate_QueryInterface(IHttpNegotiate2 *iface, REFIID riid, void **ppv)
static HRESULT onsecurityproblem_hres
static HRESULT WINAPI ServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, void **ppv)
static HRESULT WINAPI Protocol_LockRequest(IInternetProtocol *iface, DWORD dwOptions)
static ULONG WINAPI MonikerProp_Release(IMonikerProp *iface)
static IInternetProtocol Protocol
static WCHAR current_url[INTERNET_MAX_URL_LENGTH]
static IClassFactory protocol_cf
static const IBindStatusCallbackExVtbl BindStatusCallbackVtbl
static IServiceProviderVtbl ServiceProviderVtbl
static HRESULT WINAPI Priority_GetPriority(IInternetPriority *iface, LONG *pnPriority)
static ULONG WINAPI ServiceProvider_AddRef(IServiceProvider *iface)
static HRESULT WINAPI Protocol_Continue(IInternetProtocol *iface, PROTOCOLDATA *pProtocolData)
#define CHECK_NOT_CALLED(func)
static IBindStatusCallbackEx objbsc
static void test_stream_seek(IStream *stream)
static void create_cache_file(void)
static BOOL test_redirect
static HRESULT WINAPI Protocol_Seek(IInternetProtocol *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
#define CHECK_CALLED_BROKEN(func)
static WCHAR cache_file_name[MAX_PATH]
static void test_URLDownloadToFile(DWORD prot, BOOL emul)
static HRESULT WINAPI PersistMoniker_QueryInterface(IPersistMoniker *iface, REFIID riid, void **ppv)
static BOOL proxy_active(void)
static void test_switch_fail(void)
static ULONG WINAPI HttpSecurity_AddRef(IHttpSecurity *iface)
static const WCHAR wszWineHQSite[]
static BOOL data_available
static const WCHAR wszTextHtml[]
static BOOL use_cache_file
static CHAR mime_type[512]
static WCHAR http_cache_file[MAX_PATH]
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
#define FILE_SHARE_DELETE
#define STGM_SHARE_EXCLUSIVE
interface IBindCtx * LPBC
HRESULT WINAPI CreateBindCtx(DWORD reserved, IBindCtx **bind_context)
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
#define IsEqualGUID(rguid1, rguid2)
#define DEFINE_OLEGUID(name, l, w1, w2)
#define IsEqualCLSID(rclsid1, rclsid2)
#define URL_UNESCAPE_INPLACE
static __inline const char * wine_dbgstr_guid(const GUID *id)
static const WCHAR winetestW[]
INT WSAAPI bind(IN SOCKET s, IN CONST struct sockaddr *name, IN INT namelen)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
BOOL WINAPI DECLSPEC_HOTPATCH ResetEvent(IN HANDLE hEvent)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
HRESULT WINAPI CreateURLMoniker(IMoniker *pmkContext, LPCWSTR szURL, IMoniker **ppmk)
HRESULT WINAPI RevokeBindStatusCallback(IBindCtx *pbc, IBindStatusCallback *pbsc)
HRESULT WINAPI RegisterBindStatusCallback(IBindCtx *pbc, IBindStatusCallback *pbsc, IBindStatusCallback **ppbscPrevious, DWORD dwReserved)
IID IID_IBindStatusCallbackHolder
HRESULT WINAPI CreateAsyncBindCtx(DWORD reserved, IBindStatusCallback *callback, IEnumFORMATETC *format, IBindCtx **pbind)
HRESULT WINAPI URLDownloadToFileW(LPUNKNOWN pCaller, LPCWSTR szURL, LPCWSTR szFileName, DWORD dwReserved, LPBINDSTATUSCALLBACK lpfnCB)
DWORD WINAPI GetLastError(void)
DWORD WINAPI GetCurrentThreadId(void)
#define REGDB_E_CLASSNOTREG
#define INET_E_DATA_NOT_AVAILABLE
#define INET_E_INVALID_CERTIFICATE
static HRESULT HRESULT_FROM_WIN32(unsigned int x)
#define ERROR_SHARING_VIOLATION
#define INET_E_SECURITY_PROBLEM
#define STG_E_ACCESSDENIED
#define INET_E_UNKNOWN_PROTOCOL
#define INTERNET_DEFAULT_HTTPS_PORT
#define INTERNET_HANDLE_TYPE_HTTP_REQUEST
#define ERROR_INTERNET_SEC_CERT_CN_INVALID
#define INTERNET_MAX_URL_LENGTH
#define ERROR_INTERNET_SECURITY_CHANNEL_ERROR
#define HTTP_QUERY_FLAG_NUMBER
#define INTERNET_FLAG_SECURE
#define HTTP_QUERY_STATUS_CODE
#define INTERNET_OPEN_TYPE_PRECONFIG
#define ERROR_INTERNET_CANNOT_CONNECT
#define ERROR_INTERNET_NAME_NOT_RESOLVED
#define INTERNET_OPTION_HANDLE_TYPE
#define INTERNET_HANDLE_TYPE_FTP_FILE
#define ERROR_INTERNET_SEC_CERT_ERRORS
#define INTERNET_SERVICE_HTTP
#define HKEY_CURRENT_USER
LRESULT WINAPI DispatchMessageA(_In_ const MSG *)
BOOL WINAPI TranslateMessage(_In_ const MSG *)
int WINAPI GetClipboardFormatNameA(_In_ UINT format, _Out_writes_(cchMaxCount) LPSTR lpszFormatName, _In_ int cchMaxCount)
BOOL WINAPI GetMessageA(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)