Idelivery succeededd in winn...

新视野大学英语读写教程第二版第一册答案完整版[1]_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
新视野大学英语读写教程第二版第一册答案完整版[1]
上传于||暂无简介
阅读已结束,如果下载本文需要使用1下载券
想免费下载本文?
定制HR最喜欢的简历
下载文档到电脑,查找使用更方便
还剩20页未读,继续阅读
定制HR最喜欢的简历
你可能喜欢IWinHttpRequest::SetRequestHeader method (Windows)
MSDN Library
此内容没有您的语言版本,但有英语版本。
IWinHttpRequest::SetRequestHeader method
The SetRequestHeader method adds, changes, or deletes an HTTP request header.
HRESULT SetRequestHeader(
[in] BSTR Header,
[in] BSTR Value
Parameters
Header [in]
Specifies the name of the header to be set, for example, "depth". This parameter should not contain a colon and must be the actual text of the HTTP header.
Value [in]
Specifies the value of the header, for example, "infinity".
Return value
The return value is S_OK on success or an error value otherwise.
Headers are transferred across redirects. This can create a security vulnerability. To avoid having headers transferred if a redirect occurs, use the
callback to correct the specific headers when a
redirect occurs.
SetRequestHeader method enables the calling application to add or delete an HTTP request header prior to sending the request. The header name is given in
Header, and the header token or value is given in
Value. To add a header, supply a header name and value.
If another header already exists with this name, it is replaced.
To delete a header, set
Header to the name of the header to delete and set
Value to NULL.
The name and value of request headers added with this method are validated.
Headers must be well formed.
For more information about valid HTTP headers, see .
If an invalid header is used, an error occurs and the header is not added.
For Windows XP and Windows 2000, see the
section of the WinHTTP Start Page.
The following example shows how to open an HTTP connection, set a request header, send an HTTP request, and read the response text. This example must be run from a command prompt.
#include &windows.h&
#include &stdio.h&
#include &objbase.h&
#include "httprequest.h"
#pragma comment(lib, "ole32.lib")
#pragma comment(lib, "oleaut32.lib")
// IID for IWinHttpRequest.
const IID IID_IWinHttpRequest =
0x06f29373,
{0xb0, 0x25, 0x6e, 0xf1, 0xbf, 0x8a, 0xbf, 0x0e}
int main()
// Variable for return value
// Initialize COM.
hr = CoInitialize( NULL );
IWinHttpRequest *
pIWinHttpRequest = NULL;
bstrResponse = NULL;
VariantInit(&varFalse);
V_VT(&varFalse)
= VT_BOOL;
V_BOOL(&varFalse) = VARIANT_FALSE;
VariantInit(&varEmpty);
V_VT(&varEmpty) = VT_ERROR;
hr = CLSIDFromProgID(L"WinHttp.WinHttpRequest.5.1", &clsid);
if (SUCCEEDED(hr))
hr = CoCreateInstance(clsid, NULL,
CLSCTX_INPROC_SERVER,
IID_IWinHttpRequest,
(void **)&pIWinHttpRequest);
if (SUCCEEDED(hr))
// Open WinHttpRequest.
BSTR bstrMethod
= SysAllocString(L"GET");
BSTR bstrUrl = SysAllocString(L"");
hr = pIWinHttpRequest-&Open(bstrMethod, bstrUrl, varFalse);
SysFreeString(bstrMethod);
SysFreeString(bstrUrl);
if (SUCCEEDED(hr))
// Set request header.
BSTR bstrName
= SysAllocString(L"Date");
BSTR bstrValue = SysAllocString(L"Fri, 16 Mar :54 GMT");
hr = pIWinHttpRequest-&SetRequestHeader(bstrName, bstrValue);
SysFreeString(bstrName);
SysFreeString(bstrValue);
if (SUCCEEDED(hr))
// Send Request.
hr = pIWinHttpRequest-&Send(varEmpty);
if (SUCCEEDED(hr))
// Get Response headers.
hr = pIWinHttpRequest-&GetAllResponseHeaders(&bstrResponse);
if (SUCCEEDED(hr))
// Print the response to a console.
wprintf(L"%.256s",bstrResponse);
// Release memory.
if (pIWinHttpRequest)
pIWinHttpRequest-&Release();
if (bstrResponse)
SysFreeString(bstrResponse);
CoUninitialize();
The following scripting example shows how to open an HTTP connection, set a request header, and send an HTTP request.
// Instantiate a WinHttpRequest object.
var WinHttpReq = new ActiveXObject("WinHttp.WinHttpRequest.5.1");
// Initialize an HTTP request.
WinHttpReq.Open("GET", "", false);
// Add/replace a request header.
WinHttpReq.SetRequestHeader("Date", Date());
// Send the HTTP request.
WinHttpReq.Send();
Requirements
Minimum supported client
Windows XP, Windows 2000 Professional with SP3 [desktop apps only]
Minimum supported server
Windows Server 2003, Windows 2000 Server with SP3 [desktop apps only]
Redistributable
WinHTTP 5.0 and Internet Explorer 5.01 or later on Windows XP and Windows 2000.
HttpRequest.idl
Winhttp.lib
Winhttp.dll
此页面有帮助吗?
更多反馈?
1500 个剩余字符
我们非常感谢您的反馈。1、was it in 1969( that )the American astronaut succeeded in landing on the moon?为什么括号里用的是that而不是when2/I'm wondering ( who )he expects will win the gold medal in Men's single为什么只能用who不能用whom3 when he came to himself,he found himself( tied )to a tree,with his mouth filled with a towel关于found为什么用过去分词不用ing形式,什么时候用ing或过去分词形式相同的例子还有:their had their house broken,but nothing was found (missing)为什么此时括号里是ing形式4He was born in the year(when)the war broke out为什么括号里用when不能用which,二者分别在什么情况下用5he said he would pay (a)second visit为什么是a而不是the,什么时候用the?6there was (none) left为什么不能用nothing,二者区别是什么7this is the garden( I once paid a visit to)为什么括号里不能改用where I once paid a visit?
1.这是强调句的一般疑问句形式,was it .that.判断句子是否是强调句,可以将was it .that这三个词去掉,如果句子还是完整的,这句话就是强调句型.另外,如果句子是was it 1969( )the American astronaut succeeded in landing on the moon?这个时候填when,是定语从句.2.因为要填的词在宾语从句中做从句的主语,只能用who.he expects( who will win the gold medal in Men's single)3.found不是过去分词,而是过去式,时间状语从句,主从句时态要一致.heir had their house broken,but nothing was found (missing) 这句话中found是过去分词,因为是被动语态“被发现”,而missing在这里看作是形容词“丢失的”.过去分词表示被动、完成、现在分词表示主动、进行.4.这是定语从句问题,定语从句选关系代词还是关系副词要看从句语法上是否完整,( )the war broke out语法上是完整的,只能选关系副词when作状语.5.the +序数词表示“第几次”,强调次序.a+序数词表示“再一、又一”6.none = not any,not one 一点也没有;一个也没有,即数量概念.既可指人,也可指物,代指上文提到的事物,含特指概念.nothing= not anything,意为"没有任何东西;什么也没有",强调内容,只能指物,泛指.7.和第四题是相同的问题,看从句部分I once paid a visit to(?)从句部分是不完整的,to后面还应该有个宾语,所以只能填关系代词that或which,由于关系代词在从句中作宾语,可以省略.
以第4和第7句为例,怎样判断句子缺不缺成分?
从句中如果是及物动词,句子要有主谓宾才算完整;如果是不及物动词,有主谓语就是完整的。
the war (主语)broke out(谓语,不及物动词短语)完整
I (主语)once paid a visit to(谓语,及物动词短语)不完整
为您推荐:
其他类似问题
因为有in,如果是1969,就用when了who在wonder的宾语从句中作主语,he&expects做插入语不知道怎么解释,习惯了就这么用,missing=lost,两者都可以the&war&broke&out不缺成分,若缺主语、谓语。。。...
1. 化成陈述句来分析 it is in 1969 that...这是一个强调句,强调句中只能用that 故不能用when2. he expects 后面本来是可以用whom(宾格)的,但是这个要在后面的will win..句子中作主语,而who既能作宾格又能作主格,而whom只能作宾格,故用who不用whom3.这里的过去分词是表被动的,他发现自己被绑在树上,嘴巴被毛巾塞住了...
1 是所谓形式主语的东西,that引导真正的主语,it做的是形式上的主语,所以虽然从句在时间之后,事实上和时间没有一点关系 2 whom只能充当宾语,看这句话中he expects实际上是个插入语,可以不看,真正的从句是will win...从句中缺少的是主语,自然不能用whom了,以后再看到类似someone expects的在句中,其实都是插入语,做句子分析的时候盖住不要看...
1. 这是强调句的一般疑问句形式,was it ......that....判断句子是否是强调句,可以将was it 。。。that这三个词去掉,如果句子还是完整的,这句话就是强调句型。另外,如果句子是was it
1969( )the American astronaut succeeded in landing on the
moon? 这个时候填when,是定语从句。2. 因为...
从句中如果是及物动词,句子要有主谓宾才算完整;如果是不及物动词,有主谓语就是完整的。
the war (主语)broke out(谓语,不及物动词短语)完整
I (主语)once paid a visit to(谓语,及物动词短语)不完整
1.就是在1969年美国的宇航员登上了月球。这句话是一个强调句,it is/was 被强调部分 that从句是强调句的形式,这句话是疑问形式的强调句。怎么才能看出是强调句呢?将句中的it is/was和that去掉,如果句子不缺成份就是强调句,所以这句话用that 2.wonder是动词,而它后面没有宾语,所以这个句子是宾语从句,宾语从句属于名词性从句的一种,在名词性从句中,所有的whom都由wh...
扫描下载二维码

我要回帖

更多关于 delivery succeeded 的文章

 

随机推荐