欢迎来到天天文库
浏览记录
ID:9802314
大小:46.00 KB
页数:11页
时间:2018-05-10
《httpsendrequestex发送大文件》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、SUMMARYThissampledemonstratesproperusageoftheHttpSendRequestExfunctionintroducedintheInternetExplorer4.0WinInet.dllanddocumentedintheInternetClientSDK.TheoriginalHttpSendRequestfunctionhasasignificantlimitation:allthedatafortherequesthastobeprovidedinasinglebufferwhenthefunctioniscalle
2、d.Thisisofteninconvenient,leadstopoorperformanceincertainclientapplications,andmaymakeitimpossibletouploadlargeamountsofdatafromclientmachineswithlimitedmemory.ThenewHttpSendRequestExfunctionallowsaprogramtostartarequest,sendoutthedatainsmallpiecesasavailable,thenendtherequestonceallth
3、edatahasbeensent.InternetExplorer4.0mustbeinstalledonthecomputerinorderforthisfunctiontowork.ThefollowingfileisavailablefordownloadfromtheMicrosoftDownloadCenter:Hsrex.exe(http://download.microsoft.com/download/ie4095/hsrex/1/win98/en-us/hsrex.exe)Foradditionalinformationabouthowtodown
4、loadMicrosoftSupportfiles,clickthefollowingarticlenumbertoviewthearticleintheMicrosoftKnowledgeBase:119591 (http://support.microsoft.com/kb/119591/EN-US/)HowtoObtainMicrosoftSupportFilesfromOnlineServicesMicrosoftscannedthisfileforviruses.Microsoftusedthemostcurrentvirus-detectionsoftw
5、arethatwasavailableonthedatethatthefilewasposted.Thefileisstoredonsecurity-enhancedserversthathelptopreventanyunauthorizedchangestothefile.MOREINFORMATIONTheprogramisrunasfollows:BigPostForexample,thefollowingwouldPOST1megabyte(1024KB)tohttp://yourserver/scripts/Rea
6、dAll.asp:BigPost1024yourserver/scripts/ReadAll.aspTheoutputfromthiswouldbeasfollows:TestofPOSTing1024KBwithWinInet1048576bytessent.Thefollowingwasreturnedbytheserver:1048576byteswereread.Finished.NOTES·WhenusingHttpSendRequestEx,theflagINTERNET_FLAG_NO_CACHE_WRITEshouldbeusedinthecallt
7、oHttpOpenRequest,asshowninthefollowinglinefromBigPost.cpp:·HINTERNEThRequest=HttpOpenRequest(hConnect,"POST",argv[3],NULL,·NULL,NULL,INTERNET_FLAG_NO_CACHE_WRITE,0);·ThefunctionalitydemonstratedinthissamplerepresentsthefullimplementationofHttpSendRequestExatthistime.Theotherflagsandp
此文档下载收益归作者所有