WSARecv function (Windows).html 130 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606
  1. <!DOCTYPE html>
  2. <!-- saved from url=(0083)https://msdn.microsoft.com/en-us/library/windows/desktop/ms741688%28v=vs.85%29.aspx -->
  3. <html dir="ltr" xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="canonical" href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741688(v=vs.85).aspx">
  4. <title>WSARecv function (Windows)</title>
  5. <meta name="DCS.dcsuri" content="/en-us/library/windows/desktop/ms741688(d=default,l=en-us,v=vs.85).aspx">
  6. <meta name="NormalizedUrl" content="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741688(d=default,l=en-us,v=vs.85).aspx">
  7. <meta name="ms.normalizedurl" content="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741688(d=default,l=en-us,v=vs.85).aspx">
  8. <meta name="VotingContextUrl" content="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741688(d=default,l=en-us,v=vs.85).aspx">
  9. <meta name="MN" content="9DDD8834-4:36:33 PM">
  10. <meta name="Search.ShortId" content="ms741688">
  11. <meta name="ms.shortidmsdn" content="ms741688">
  12. <meta name="Ms.Locale" content="en-us">
  13. <meta name="ms.prodver" content="VS.85">
  14. <meta name="ms.contentlang" content="EN">
  15. <meta name="ms.lang" content="EN">
  16. <meta name="ms.loc" content="US">
  17. <meta name="ms.sitever" content="2015.01.20.2">
  18. <meta name="ms.assetid" content="bfe66e11-e9a7-4321-ad55-3141113e9a03">
  19. <meta name="ms.auth" content="0">
  20. <link rel="shortcut icon" href="https://msdn.microsoft.com/Areas/Epx/Themes/Windows/Content/Winlogo_favicon.ico">
  21. <link rel="stylesheet" type="text/css" href="./WSARecv function (Windows)_files/Combined.css"><style type="text/css"></style><script type="text/javascript" async="" src="./WSARecv function (Windows)_files/ms.js"></script><script type="text/javascript" src="./WSARecv function (Windows)_files/ai.js" async=""></script><script class="mtps-injected">try {
  22. /**/
  23. (window.MTPS || (window.MTPS = {})).cdnDomains || (window.MTPS.cdnDomains = {
  24. "image": "https://i-msdn.sec.s-msft.com",
  25. "js": "https://i2-msdn.sec.s-msft.com",
  26. "css": "https://i-msdn.sec.s-msft.com",
  27. "": "https://",
  28. "xap": "https://msdn.microsoft.com"
  29. });
  30. /**/
  31. } finally { MTPS._injectNextScript_0 && MTPS._injectNextScript_0(); }</script><script class="mtps-injected" src="./WSARecv function (Windows)_files/jquery-1.8.2.min.js"></script><script class="mtps-injected">try {
  32. //
  33. var literalNormalizedUrl = '/en-us/library/windows/desktop/ms741688(l=en-us,v=vs.85).aspx';
  34. var wt_nvr_ru = 'WT_NVR_RU';
  35. var wt_fpcdom = '.microsoft.com';
  36. var wt_domlist = 'msdn.microsoft.com';
  37. var wt_pathlist = '';
  38. var wt_paramlist = 'DCSext.mtps_devcenter';
  39. var wt_siteid = 'MSDN';
  40. var gDomain = 'm.webtrends.com';
  41. var gDcsId = 'dcsmgru7m99k7mqmgrhudo0k8_8c6m';
  42. var gFpc = 'WT_FPC';
  43. if (document.cookie.indexOf(gFpc + "=") == -1) {
  44. var wtidJs = document.createElement("script");
  45. wtidJs.src = "//" + gDomain + "/" + gDcsId + "/wtid.js";
  46. document.getElementsByTagName("head")[0].appendChild(wtidJs);
  47. }
  48. var detectedLocale = 'en-us';
  49. var wtsp = '_msdn_';
  50. var gTrackEvents = '0';
  51. /**/
  52. } finally { MTPS._injectNextScript_2 && MTPS._injectNextScript_2(); }</script><script class="mtps-injected">try {
  53. /**/
  54. var omni_guid = "c068ae2d-a675-46b7-b3a6-29fe9df23e5e";
  55. /**/
  56. } finally { MTPS._injectNextScript_3 && MTPS._injectNextScript_3(); }</script><script class="mtps-injected">try {
  57. //
  58. window.appInsightsId = '60854590-027a-4ae4-98be-2741a40f355f';
  59. //
  60. } finally { MTPS._injectNextScript_4 && MTPS._injectNextScript_4(); }</script><script class="mtps-injected" src="./WSARecv function (Windows)_files/Combined.js"></script><meta name="ms.Center" content="windows desktop"><meta name="ms.Section" content="windows desktop: learn"><meta name="ms.ShortId" content="ms741688"><meta name="ms.TOC" content="windows desktop: learn: ms741688"><script class="mtps-injected" src="./WSARecv function (Windows)_files/SearchBox.jss"></script><script class="mtps-injected" src="./WSARecv function (Windows)_files/Combined(1).js"></script><script class="mtps-injected" src="./WSARecv function (Windows)_files/jquery.tmpl.min.js"></script><script class="mtps-injected" src="./WSARecv function (Windows)_files/Combined(2).js"></script><script src="./WSARecv function (Windows)_files/broker.js"></script><script class="mtps-injected">try {
  61. $(document).ready(function() {
  62. try {
  63. var token = $("#globalRequestVerification input[name='__RequestVerificationToken']").clone();
  64. $("#siteFeedbackForm").append(token);
  65. } catch(err) {
  66. }
  67. });
  68. } finally { MTPS._injectNextScript_10 && MTPS._injectNextScript_10(); }</script><link href="./WSARecv function (Windows)_files/PrintView.css" rel="stylesheet" type="text/css" media="print"></head>
  69. <body class="library Chrome">
  70. <div id="page">
  71. <div id="ux-header" class="ltr en-us">
  72. <div id="headerContainer">
  73. <div id="logoAndSearchBox">
  74. <div id="logo">
  75. <a href="https://msdn.microsoft.com/windows/desktop" title="Windows"><img alt="Windows" src="./WSARecv function (Windows)_files/Windows_logo.png"></a>
  76. </div>
  77. <div id="selectedTab">
  78. <a class="dropDownToggle" href="javascript:void(0);">Dev Center - Desktop</a>
  79. </div>
  80. <div id="toclevel1_menu" style="display: none; left: 125px; top: 57px;">
  81. <ul>
  82. <li><a href="http://dev.windows.com/" title="Windows">Windows</a></li>
  83. <li><a href="http://msdn.microsoft.com/windows/desktop/" title="Desktop">Desktop</a></li>
  84. <li><a href="http://msdn.microsoft.com/windows/hardware/" title="Hardware">Hardware</a></li>
  85. <li><a href="http://msdn.microsoft.com/ie/" title="Internet Explorer">Internet Explorer</a></li>
  86. </ul>
  87. <div style="clear: both"></div>
  88. </div>
  89. <div class="SearchBox">
  90. <form id="HeaderSearchForm" name="HeaderSearchForm" method="get" onsubmit="return Epx.Controls.SearchBox.searchBoxOnSubmit(this);">
  91. <input id="HeaderSearchTextBox" name="query" type="text" maxlength="200" onfocus="Epx.Controls.SearchBox.watermarkFocus(event, this.title)" onblur="Epx.Controls.SearchBox.watermarkBlur(event, this.title)" autocomplete="off">
  92. <button id="HeaderSearchButton" value="" type="submit" class="header-search-button" title="Search"></button>
  93. <div id="SearchFlyoutContainer" style="display: none; text-align: left; border: 1px solid buttonshadow; position: absolute; z-index: 1000; padding: 2px; color: rgb(0, 0, 0); font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);"><div id="SuggestionContainer"><ul style="list-style: none; padding: 4px 2px 0px 1px; cursor: pointer; margin: 1px; white-space: nowrap;"></ul></div></div></form>
  94. </div>
  95. <div class="Clear"></div>
  96. </div>
  97. <div class="Clear"></div>
  98. <div class="ux-internav">
  99. <div class="toclevel2">
  100. <a class="normal" href="https://sysdev.microsoft.com/en-us/desktop/" title="Dashboard">Dashboard</a>
  101. <a class="normal" href="http://msdn.microsoft.com/windows/desktop/bg161546.aspx" title="Get started">Get started</a>
  102. <a class="normal" href="http://msdn.microsoft.com/windows/desktop/aa511258.aspx" title="Design">Design</a>
  103. <a class="active" href="http://msdn.microsoft.com/windows/desktop/aa904962.aspx" title="Develop">Develop</a>
  104. <a class="normal" href="http://msdn.microsoft.com/windows/desktop/dn553326.aspx" title="Test and deploy">Test and deploy</a>
  105. <a class="normal" href="http://msdn.microsoft.com/windows/desktop/jj134964.aspx" title="Certify">Certify</a>
  106. </div>
  107. <div class="clear"></div>
  108. </div>
  109. <div id="signIn">
  110. <a class="scarabLink" href="https://login.live.com/login.srf?wa=wsignin1.0&rpsnv=12&ct=1422059793&rver=6.0.5276.0&wp=MCMBI&wlcxt=MSDN%24MSDN%24MSDN&wreply=https%3a%2f%2fmsdn.microsoft.com%2fen-us%2flibrary%2fwindows%2fdesktop%2fms741688%2528v%3dvs.85%2529.aspx&lc=1033&id=254354&mkt=en-US" title="Sign in">Sign in</a></div>
  111. </div>
  112. <div id="blackBar">
  113. <div class="toclevel3">
  114. <a class="active" href="http://msdn.microsoft.com/en-us/library/windows/desktop/bg126469.aspx" title="Desktop technologies" style="opacity: 1; left: 0px;">Desktop technologies</a>
  115. <a class="normal" href="http://msdn.microsoft.com/en-us/library/windows/desktop/bg125390.aspx" title="Server and system " style="opacity: 1; left: 0px;">Server and system </a>
  116. <a class="normal" href="http://msdn.microsoft.com/en-us/library/windows/desktop/hh920508(vs.85).aspx" title="API index" style="opacity: 1; left: 0px;">API index</a>
  117. <a class="normal" href="http://code.msdn.microsoft.com/windowsdesktop/" title="Samples" style="opacity: 1; left: 0px;">Samples</a>
  118. <a class="normal" href="http://msdn.microsoft.com/windows/desktop/aa904945.aspx" title="Community" style="opacity: 1; left: 0px;">Community</a>
  119. </div>
  120. <div class="clear"></div>
  121. </div>
  122. </div>
  123. <div id="body">
  124. <div id="leftNav" style="width: 228.5px; max-width: 480px; min-height: 13005px; height: 4158px;">
  125. <div id="tocnav" style="width: 229px; position: fixed; top: -2170px;">
  126. <div class="toclevel0" data-toclevel="0" style="padding-left: 0px;">
  127. <a class="toc_collapsed" href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741688%28v=vs.85%29.aspx#"></a><a data-tochassubtree="true" href="https://msdn.microsoft.com/en-us/library/windows/desktop/ee663286(v=vs.85).aspx" id="bg126531_VS.85_en-us" mtpsaliasid="" mtpsassetid="f80bf168-4936-4736-bc62-d0a557b3cd58_VS.85_en-us" mtpsshortid="ee663286_VS.85_en-us" title="Networking and Internet">Networking and Internet</a> </div>
  128. <div class="toclevel0" data-toclevel="0" style="padding-left: 0px;">
  129. <a class="toc_collapsed" href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741688%28v=vs.85%29.aspx#"></a><a data-tochassubtree="true" href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740673(v=vs.85).aspx" id="ms767900_VS.85_en-us" mtpsaliasid="" mtpsassetid="1ec8758a-40fd-4c98-b839-c2409ef712d6_VS.85_en-us" mtpsshortid="ms740673_VS.85_en-us" title="Windows Sockets 2">Windows Sockets 2</a> </div>
  130. <div class="toclevel0" data-toclevel="0" style="padding-left: 0px;">
  131. <a class="toc_collapsed" href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741688%28v=vs.85%29.aspx#"></a><a data-tochassubtree="true" href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741416(v=vs.85).aspx" id="ms768062_VS.85_en-us" mtpsaliasid="" mtpsassetid="baae2bf9-f505-4365-b60e-e3247a0218c8_VS.85_en-us" mtpsshortid="ms741416_VS.85_en-us" title="Winsock Reference">Winsock Reference</a> </div>
  132. <div class="toclevel1" data-toclevel="1" data-childrenloaded="true" style="padding-left: 13px;">
  133. <a class="toc_expanded" href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741688%28v=vs.85%29.aspx#"></a><a data-tochassubtree="true" href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741394(v=vs.85).aspx" id="ms768130_VS.85_en-us" mtpsaliasid="" mtpsassetid="edafb5f9-09fe-4f8e-9651-4002b6f622f4_VS.85_en-us" mtpsshortid="ms741394_VS.85_en-us" title="Winsock Functions">Winsock Functions</a> </div>
  134. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  135. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms737526(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="accept">accept</a> </div>
  136. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  137. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms737524(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="AcceptEx">AcceptEx</a> </div>
  138. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  139. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms737550(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="bind">bind</a> </div>
  140. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  141. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms737582(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="closesocket">closesocket</a> </div>
  142. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  143. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms737625(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="connect">connect</a> </div>
  144. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  145. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms737606(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="ConnectEx">ConnectEx</a> </div>
  146. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  147. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms737757(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="DisconnectEx">DisconnectEx</a> </div>
  148. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  149. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms737823(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="EnumProtocols">EnumProtocols</a> </div>
  150. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  151. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms737931(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="freeaddrinfo">freeaddrinfo</a> </div>
  152. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  153. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms737906(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="FreeAddrInfoEx">FreeAddrInfoEx</a> </div>
  154. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  155. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms737912(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="FreeAddrInfoW">FreeAddrInfoW</a> </div>
  156. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  157. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms738514(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="gai_strerror">gai_strerror</a> </div>
  158. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  159. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms738516(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="GetAcceptExSockaddrs">GetAcceptExSockaddrs</a> </div>
  160. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  161. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms738517(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="GetAddressByName">GetAddressByName</a> </div>
  162. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  163. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms738520(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="getaddrinfo">getaddrinfo</a> </div>
  164. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  165. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms738518(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="GetAddrInfoEx">GetAddrInfoEx</a> </div>
  166. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  167. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/hh448782(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="GetAddrInfoExCancel">GetAddrInfoExCancel</a> </div>
  168. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  169. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/hh448783(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="GetAddrInfoExOverlappedResult">GetAddrInfoExOverlappedResult</a> </div>
  170. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  171. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms738519(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="GetAddrInfoW">GetAddrInfoW</a> </div>
  172. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  173. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms738521(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="gethostbyaddr">gethostbyaddr</a> </div>
  174. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  175. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms738524(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="gethostbyname">gethostbyname</a> </div>
  176. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  177. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms738527(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="gethostname">gethostname</a> </div>
  178. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  179. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/dn793576(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="GetHostNameW">GetHostNameW</a> </div>
  180. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  181. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms738530(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="GetNameByType">GetNameByType</a> </div>
  182. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  183. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms738532(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="getnameinfo">getnameinfo</a> </div>
  184. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  185. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/dn798956(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="getipv4sourcefilter">getipv4sourcefilter</a> </div>
  186. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  187. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms738531(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="GetNameInfoW">GetNameInfoW</a> </div>
  188. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  189. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms738533(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="getpeername">getpeername</a> </div>
  190. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  191. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms738534(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="getprotobyname">getprotobyname</a> </div>
  192. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  193. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms738537(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="getprotobynumber">getprotobynumber</a> </div>
  194. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  195. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms738538(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="getservbyname">getservbyname</a> </div>
  196. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  197. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms738541(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="getservbyport">getservbyport</a> </div>
  198. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  199. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms738542(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="GetService">GetService</a> </div>
  200. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  201. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms738543(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="getsockname">getsockname</a> </div>
  202. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  203. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms738544(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="getsockopt">getsockopt</a> </div>
  204. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  205. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/dn798957(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="getsourcefilter">getsourcefilter</a> </div>
  206. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  207. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms738546(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="GetTypeByName">GetTypeByName</a> </div>
  208. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  209. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/jj710197(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="htond">htond</a> </div>
  210. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  211. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/jj710198(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="htonf">htonf</a> </div>
  212. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  213. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms738556(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="htonl">htonl</a> </div>
  214. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  215. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/jj710199(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="htonll">htonll</a> </div>
  216. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  217. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms738557(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="htons">htons</a> </div>
  218. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  219. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms738563(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="inet_addr">inet_addr</a> </div>
  220. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  221. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms738564(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="inet_ntoa">inet_ntoa</a> </div>
  222. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  223. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/cc805843(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="InetNtop">InetNtop</a> </div>
  224. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  225. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/cc805844(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="InetPton">InetPton</a> </div>
  226. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  227. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms738573(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="ioctlsocket">ioctlsocket</a> </div>
  228. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  229. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms739168(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="listen">listen</a> </div>
  230. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  231. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/jj710200(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="ntohd">ntohd</a> </div>
  232. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  233. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/jj710201(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="ntohf">ntohf</a> </div>
  234. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  235. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740069(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="ntohl">ntohl</a> </div>
  236. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  237. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/jj710202(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="ntohll">ntohll</a> </div>
  238. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  239. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740075(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="ntohs">ntohs</a> </div>
  240. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  241. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740121(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="recv">recv</a> </div>
  242. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  243. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740120(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="recvfrom">recvfrom</a> </div>
  244. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  245. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/hh448837(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="RIOCloseCompletionQueue">RIOCloseCompletionQueue</a> </div>
  246. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  247. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/hh448841(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="RIOCreateCompletionQueue">RIOCreateCompletionQueue</a> </div>
  248. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  249. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/hh448843(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="RIOCreateRequestQueue">RIOCreateRequestQueue</a> </div>
  250. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  251. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/hh448845(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="RIODequeueCompletion">RIODequeueCompletion</a> </div>
  252. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  253. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/hh448847(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="RIODeregisterBuffer">RIODeregisterBuffer</a> </div>
  254. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  255. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/hh437191(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="RIONotify">RIONotify</a> </div>
  256. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  257. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/hh437193(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="RIOReceive">RIOReceive</a> </div>
  258. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  259. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/hh437196(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="RIOReceiveEx">RIOReceiveEx</a> </div>
  260. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  261. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/hh437199(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="RIORegisterBuffer">RIORegisterBuffer</a> </div>
  262. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  263. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/hh437202(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="RIOResizeCompletionQueue">RIOResizeCompletionQueue</a> </div>
  264. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  265. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/hh437204(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="RIOResizeRequestQueue">RIOResizeRequestQueue</a> </div>
  266. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  267. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/hh437213(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="RIOSend">RIOSend</a> </div>
  268. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  269. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/hh437216(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="RIOSendEx">RIOSendEx</a> </div>
  270. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  271. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740141(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="select">select</a> </div>
  272. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  273. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740149(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="send">send</a> </div>
  274. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  275. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740148(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="sendto">sendto</a> </div>
  276. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  277. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740473(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="SetAddrInfoEx">SetAddrInfoEx</a> </div>
  278. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  279. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/dn798958(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="setipv4sourcefilter">setipv4sourcefilter</a> </div>
  280. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  281. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740475(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="SetService">SetService</a> </div>
  282. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  283. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/hh994468(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="SetSocketMediaStreamingMode">SetSocketMediaStreamingMode</a> </div>
  284. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  285. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740476(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="setsockopt">setsockopt</a> </div>
  286. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  287. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/dn798959(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="setsourcefilter">setsourcefilter</a> </div>
  288. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  289. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740481(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="shutdown">shutdown</a> </div>
  290. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  291. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740506(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="socket">socket</a> </div>
  292. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  293. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740565(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="TransmitFile">TransmitFile</a> </div>
  294. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  295. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740566(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="TransmitPackets">TransmitPackets</a> </div>
  296. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  297. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741513(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAAccept">WSAAccept</a> </div>
  298. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  299. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741516(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAAddressToString">WSAAddressToString</a> </div>
  300. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  301. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741519(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAAsyncGetHostByAddr">WSAAsyncGetHostByAddr</a> </div>
  302. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  303. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741522(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAAsyncGetHostByName">WSAAsyncGetHostByName</a> </div>
  304. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  305. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741526(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAAsyncGetProtoByName">WSAAsyncGetProtoByName</a> </div>
  306. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  307. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741529(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAAsyncGetProtoByNumber">WSAAsyncGetProtoByNumber</a> </div>
  308. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  309. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741533(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAAsyncGetServByName">WSAAsyncGetServByName</a> </div>
  310. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  311. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741536(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAAsyncGetServByPort">WSAAsyncGetServByPort</a> </div>
  312. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  313. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741540(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAAsyncSelect">WSAAsyncSelect</a> </div>
  314. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  315. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741544(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSACancelAsyncRequest">WSACancelAsyncRequest</a> </div>
  316. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  317. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741547(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSACancelBlockingCall">WSACancelBlockingCall</a> </div>
  318. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  319. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741549(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSACleanup">WSACleanup</a> </div>
  320. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  321. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741551(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSACloseEvent">WSACloseEvent</a> </div>
  322. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  323. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741559(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAConnect">WSAConnect</a> </div>
  324. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  325. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741554(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAConnectByList">WSAConnectByList</a> </div>
  326. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  327. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741557(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAConnectByName">WSAConnectByName</a> </div>
  328. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  329. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741561(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSACreateEvent">WSACreateEvent</a> </div>
  330. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  331. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/bb394816(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSADeleteSocketPeerTargetName">WSADeleteSocketPeerTargetName</a> </div>
  332. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  333. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741565(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSADuplicateSocket">WSADuplicateSocket</a> </div>
  334. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  335. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741570(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAEnumNameSpaceProviders">WSAEnumNameSpaceProviders</a> </div>
  336. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  337. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741568(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAEnumNameSpaceProvidersEx">WSAEnumNameSpaceProvidersEx</a> </div>
  338. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  339. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741572(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAEnumNetworkEvents">WSAEnumNetworkEvents</a> </div>
  340. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  341. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741574(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAEnumProtocols">WSAEnumProtocols</a> </div>
  342. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  343. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741576(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAEventSelect">WSAEventSelect</a> </div>
  344. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  345. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741578(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="__WSAFDIsSet">__WSAFDIsSet</a> </div>
  346. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  347. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741580(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAGetLastError">WSAGetLastError</a> </div>
  348. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  349. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741582(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAGetOverlappedResult">WSAGetOverlappedResult</a> </div>
  350. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  351. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741587(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAGetQOSByName">WSAGetQOSByName</a> </div>
  352. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  353. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741592(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAGetServiceClassInfo">WSAGetServiceClassInfo</a> </div>
  354. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  355. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741598(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAGetServiceClassNameByClassId">WSAGetServiceClassNameByClassId</a> </div>
  356. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  357. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741604(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAHtonl">WSAHtonl</a> </div>
  358. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  359. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741609(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAHtons">WSAHtons</a> </div>
  360. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  361. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/bb394817(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAImpersonateSocketPeer">WSAImpersonateSocketPeer</a> </div>
  362. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  363. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741616(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAInstallServiceClass">WSAInstallServiceClass</a> </div>
  364. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  365. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741621(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAIoctl">WSAIoctl</a> </div>
  366. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  367. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741625(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAIsBlocking">WSAIsBlocking</a> </div>
  368. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  369. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741628(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAJoinLeaf">WSAJoinLeaf</a> </div>
  370. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  371. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741633(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSALookupServiceBegin">WSALookupServiceBegin</a> </div>
  372. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  373. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741637(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSALookupServiceEnd">WSALookupServiceEnd</a> </div>
  374. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  375. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741641(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSALookupServiceNext">WSALookupServiceNext</a> </div>
  376. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  377. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741658(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSANSPIoctl">WSANSPIoctl</a> </div>
  378. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  379. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741660(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSANtohl">WSANtohl</a> </div>
  380. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  381. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741663(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSANtohs">WSANtohs</a> </div>
  382. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  383. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741669(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAPoll">WSAPoll</a> </div>
  384. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  385. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/bb394820(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAQuerySocketSecurity">WSAQuerySocketSecurity</a> </div>
  386. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  387. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741677(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAProviderConfigChange">WSAProviderConfigChange</a> </div>
  388. <div class="toclevel2 current" data-toclevel="2" style="padding-left: 26px;">
  389. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741688(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSARecv">WSARecv</a> </div>
  390. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  391. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741682(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSARecvDisconnect">WSARecvDisconnect</a> </div>
  392. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  393. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741684(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSARecvEx">WSARecvEx</a> </div>
  394. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  395. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741686(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSARecvFrom">WSARecvFrom</a> </div>
  396. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  397. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741687(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSARecvMsg">WSARecvMsg</a> </div>
  398. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  399. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741689(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSARemoveServiceClass">WSARemoveServiceClass</a> </div>
  400. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  401. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741690(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAResetEvent">WSAResetEvent</a> </div>
  402. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  403. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/bb394821(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSARevertImpersonation">WSARevertImpersonation</a> </div>
  404. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  405. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms742203(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSASend">WSASend</a> </div>
  406. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  407. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741691(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSASendDisconnect">WSASendDisconnect</a> </div>
  408. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  409. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741692(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSASendMsg">WSASendMsg</a> </div>
  410. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  411. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741693(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSASendTo">WSASendTo</a> </div>
  412. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  413. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms742205(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSASetBlockingHook">WSASetBlockingHook</a> </div>
  414. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  415. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms742208(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSASetEvent">WSASetEvent</a> </div>
  416. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  417. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms742209(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSASetLastError">WSASetLastError</a> </div>
  418. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  419. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms742211(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSASetService">WSASetService</a> </div>
  420. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  421. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/bb394822(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSASetSocketPeerTargetName">WSASetSocketPeerTargetName</a> </div>
  422. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  423. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/bb394823(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSASetSocketSecurity">WSASetSocketSecurity</a> </div>
  424. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  425. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms742212(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSASocket">WSASocket</a> </div>
  426. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  427. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms742213(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAStartup">WSAStartup</a> </div>
  428. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  429. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms742214(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAStringToAddress">WSAStringToAddress</a> </div>
  430. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  431. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms742217(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAUnhookBlockingHook">WSAUnhookBlockingHook</a> </div>
  432. <div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
  433. <span class="toc_empty"></span><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms742219(v=vs.85).aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSAWaitForMultipleEvents">WSAWaitForMultipleEvents</a> </div>
  434. </div>
  435. <div id="toc-resizable-ew" class="toc-resizable-ew"></div>
  436. <a id="NavigationResize" href="javascript:void(0)" style="left: 229px; display: inline-block;">
  437. <img class="cl_nav_resize_open" src="./WSARecv function (Windows)_files/ImageSprite.png" title="Expand" alt="Expand">
  438. <img class="cl_nav_resize_close" src="./WSARecv function (Windows)_files/ImageSprite.png" title="Minimize" alt="Minimize" style="display: none;">
  439. </a>
  440. </div>
  441. <div id="content" class="content" style="margin-left: 229px; width: auto;">
  442. <div class="topic" xmlns="http://www.w3.org/1999/xhtml">
  443. <h1 class="title">WSARecv function</h1>
  444. <div id="mainSection">
  445. <div class="clsServerSDKContent">
  446. </div>
  447. <p>The
  448. <strong>WSARecv</strong> function receives data from a connected socket or a bound connectionless socket.</p>
  449. <h2>Syntax</h2>
  450. <div id="code-snippet-1" class="codeSnippetContainer" xmlns="">
  451. <div class="codeSnippetContainerTabs">
  452. <div class="codeSnippetContainerTabSingle" dir="ltr"><a>C++</a></div>
  453. </div>
  454. <div class="codeSnippetContainerCodeContainer">
  455. <div class="codeSnippetToolBar">
  456. <div class="codeSnippetToolBarText">
  457. <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if (window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_2e54befe-65ab-45a0-b21e-47c9b9e54248');">Copy</a>
  458. </div>
  459. </div>
  460. <div id="CodeSnippetContainerCode_2e54befe-65ab-45a0-b21e-47c9b9e54248" class="codeSnippetContainerCode" dir="ltr">
  461. <div style="color:Black;"><pre>
  462. <span style="color:Blue;">int</span> WSARecv(
  463. _In_&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SOCKET s,
  464. _Inout_&nbsp;&nbsp;LPWSABUF lpBuffers,
  465. _In_&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DWORD dwBufferCount,
  466. _Out_&nbsp;&nbsp;&nbsp;&nbsp;LPDWORD lpNumberOfBytesRecvd,
  467. _Inout_&nbsp;&nbsp;LPDWORD lpFlags,
  468. _In_&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LPWSAOVERLAPPED lpOverlapped,
  469. _In_&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
  470. );
  471. </pre></div>
  472. </div>
  473. </div>
  474. </div>
  475. <h2>Parameters</h2>
  476. <dl>
  477. <dt><em>s</em> [in]</dt>
  478. <dd>
  479. <p>A descriptor identifying a connected socket.</p>
  480. </dd>
  481. <dt><em>lpBuffers</em> [in, out]</dt>
  482. <dd>
  483. <p>A pointer to an array of
  484. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741542(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">WSABUF</strong></a> structures. Each
  485. <strong>WSABUF</strong> structure contains a pointer to a buffer and the length, in bytes, of the buffer.</p>
  486. </dd>
  487. <dt><em>dwBufferCount</em> [in]</dt>
  488. <dd>
  489. <p>The number of
  490. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741542(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">WSABUF</strong></a> structures in the <em>lpBuffers</em> array.</p>
  491. </dd>
  492. <dt><em>lpNumberOfBytesRecvd</em> [out]</dt>
  493. <dd>
  494. <p>A pointer to the number, in bytes, of data received by this call if the receive operation completes immediately. </p>
  495. <p>Use <strong>NULL</strong> for this parameter if the <em>lpOverlapped</em> parameter is not <strong>NULL</strong> to avoid potentially erroneous results. This parameter can be <strong>NULL</strong> only if the <em>lpOverlapped</em> parameter is not <strong>NULL</strong>.</p>
  496. </dd>
  497. <dt><em>lpFlags</em> [in, out]</dt>
  498. <dd>
  499. <p>A pointer to flags used to modify the behavior of the
  500. <strong>WSARecv</strong> function call. For more information, see the Remarks section.</p>
  501. </dd>
  502. <dt><em>lpOverlapped</em> [in]</dt>
  503. <dd>
  504. <p>A pointer to a
  505. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741665(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">WSAOVERLAPPED</strong></a> structure (ignored for nonoverlapped sockets).</p>
  506. </dd>
  507. <dt><em>lpCompletionRoutine</em> [in]</dt>
  508. <dd>
  509. <p>A pointer to the completion routine called when the receive operation has been completed (ignored for nonoverlapped sockets).</p>
  510. </dd>
  511. </dl>
  512. <h2>Return value</h2>
  513. <p>If no error occurs and the receive operation has completed immediately,
  514. <strong>WSARecv</strong> returns zero. In this case, the completion routine will have already been scheduled to be called once the calling thread is in the alertable state. Otherwise, a value of <strong>SOCKET_ERROR</strong> is returned, and a specific error code can be retrieved by calling
  515. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741580(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">WSAGetLastError</strong></a>. The error code
  516. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSA_IO_PENDING">WSA_IO_PENDING</a> indicates that the overlapped operation has been successfully initiated and that completion will be indicated at a later time. Any other error code indicates that the overlapped operation was not successfully initiated and no completion indication will occur.</p>
  517. <table>
  518. <tbody><tr><th>Error code</th><th>Meaning</th></tr>
  519. <tr><td>
  520. <dl>
  521. <dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAECONNABORTED">WSAECONNABORTED</a></strong></dt>
  522. </dl>
  523. </td><td>
  524. <p>The virtual circuit was terminated due to a time-out or other failure.</p>
  525. </td></tr>
  526. <tr><td>
  527. <dl>
  528. <dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAECONNRESET">WSAECONNRESET</a></strong></dt>
  529. </dl>
  530. </td><td>
  531. <p>For a stream socket, the virtual circuit was reset by the remote side. The application should close the socket as it is no longer usable. For a UDP datagram socket, this error would indicate that a previous send operation resulted in an ICMP "Port Unreachable" message.</p>
  532. </td></tr>
  533. <tr><td>
  534. <dl>
  535. <dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAEDISCON">WSAEDISCON</a></strong></dt>
  536. </dl>
  537. </td><td>
  538. <p>Socket <em>s</em> is message oriented and the virtual circuit was gracefully closed by the remote side.</p>
  539. </td></tr>
  540. <tr><td>
  541. <dl>
  542. <dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAEFAULT">WSAEFAULT</a></strong></dt>
  543. </dl>
  544. </td><td>
  545. <p>The <em>lpBuffers</em> parameter is not completely contained in a valid part of the user address space.</p>
  546. </td></tr>
  547. <tr><td>
  548. <dl>
  549. <dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAEINPROGRESS">WSAEINPROGRESS</a></strong></dt>
  550. </dl>
  551. </td><td>
  552. <p>A blocking Windows Sockets 1.1 call is in progress, or the service provider is still processing a callback function.</p>
  553. </td></tr>
  554. <tr><td>
  555. <dl>
  556. <dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAEINTR">WSAEINTR</a></strong></dt>
  557. </dl>
  558. </td><td>
  559. <p>The (blocking) call was canceled by the <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741547(v=vs.85).aspx">WSACancelBlockingCall</a> function.</p>
  560. </td></tr>
  561. <tr><td>
  562. <dl>
  563. <dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAEINVAL">WSAEINVAL</a></strong></dt>
  564. </dl>
  565. </td><td>
  566. <p>The socket has not been bound (for example, with
  567. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms737550(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">bind</strong></a>).</p>
  568. </td></tr>
  569. <tr><td>
  570. <dl>
  571. <dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAEMSGSIZE">WSAEMSGSIZE</a></strong></dt>
  572. </dl>
  573. </td><td>
  574. <p>The message was too large to fit into the specified buffer and (for unreliable protocols only) any trailing portion of the message that did not fit into the buffer has been discarded.</p>
  575. </td></tr>
  576. <tr><td>
  577. <dl>
  578. <dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAENETDOWN">WSAENETDOWN</a></strong></dt>
  579. </dl>
  580. </td><td>
  581. <p>The network subsystem has failed.</p>
  582. </td></tr>
  583. <tr><td>
  584. <dl>
  585. <dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAENETRESET">WSAENETRESET</a></strong></dt>
  586. </dl>
  587. </td><td>
  588. <p>For a connection-oriented socket, this error indicates that the connection has been broken due to <em>keep-alive</em> activity that detected a failure while the operation was in progress. For a datagram socket, this error indicates that the time to live has expired.</p>
  589. </td></tr>
  590. <tr><td>
  591. <dl>
  592. <dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAENOTCONN">WSAENOTCONN</a></strong></dt>
  593. </dl>
  594. </td><td>
  595. <p>The socket is not connected.</p>
  596. </td></tr>
  597. <tr><td>
  598. <dl>
  599. <dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAENOTSOCK">WSAENOTSOCK</a></strong></dt>
  600. </dl>
  601. </td><td>
  602. <p>The descriptor is not a socket.</p>
  603. </td></tr>
  604. <tr><td>
  605. <dl>
  606. <dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAEOPNOTSUPP">WSAEOPNOTSUPP</a></strong></dt>
  607. </dl>
  608. </td><td>
  609. <p><strong>MSG_OOB</strong> was specified, but the socket is not stream-style such as type SOCK_STREAM, OOB data is not supported in the communication domain associated with this socket, or the socket is unidirectional and supports only send operations.</p>
  610. </td></tr>
  611. <tr><td>
  612. <dl>
  613. <dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAESHUTDOWN">WSAESHUTDOWN</a></strong></dt>
  614. </dl>
  615. </td><td>
  616. <p>The socket has been shut down; it is not possible to call
  617. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741688(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">WSARecv</strong></a> on a socket after
  618. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740481(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">shutdown</strong></a> has been invoked with <em>how</em> set to <strong>SD_RECEIVE</strong> or <strong>SD_BOTH</strong>.</p>
  619. </td></tr>
  620. <tr><td>
  621. <dl>
  622. <dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAETIMEDOUT">WSAETIMEDOUT</a></strong></dt>
  623. </dl>
  624. </td><td>
  625. <p>The connection has been dropped because of a network failure or because the peer system failed to respond.</p>
  626. </td></tr>
  627. <tr><td>
  628. <dl>
  629. <dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAEWOULDBLOCK">WSAEWOULDBLOCK</a></strong></dt>
  630. </dl>
  631. </td><td>
  632. <p>
  633. </p><p><strong>Windows&nbsp;NT:&nbsp;&nbsp;</strong>Overlapped sockets: there are too many outstanding overlapped I/O requests. Nonoverlapped sockets: The socket is marked as nonblocking and the receive operation cannot be completed immediately.</p>
  634. </td></tr>
  635. <tr><td>
  636. <dl>
  637. <dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSANOTINITIALISED">WSANOTINITIALISED</a></strong></dt>
  638. </dl>
  639. </td><td>
  640. <p>A successful
  641. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms742213(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">WSAStartup</strong></a> call must occur before using this function.</p>
  642. </td></tr>
  643. <tr><td>
  644. <dl>
  645. <dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSA_IO_PENDING">WSA_IO_PENDING</a></strong></dt>
  646. </dl>
  647. </td><td>
  648. <p>An overlapped operation was successfully initiated and completion will be indicated at a later time.</p>
  649. </td></tr>
  650. <tr><td>
  651. <dl>
  652. <dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSA_OPERATION_ABORTED">WSA_OPERATION_ABORTED</a></strong></dt>
  653. </dl>
  654. </td><td>
  655. <p>The overlapped operation has been canceled due to the closure of the socket.</p>
  656. </td></tr>
  657. </tbody></table>
  658. <p>&nbsp;</p>
  659. <h2>Remarks</h2>
  660. <p>The
  661. <strong>WSARecv</strong> function provides some additional features compared with the standard
  662. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740121(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">recv</strong></a> function in three important areas:</p>
  663. <ul>
  664. <li>It can be used in conjunction with overlapped sockets to perform overlapped
  665. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740121(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">recv</strong></a> operations.</li>
  666. <li>It allows multiple receive buffers to be specified making it applicable to the scatter/gather type of I/O.</li>
  667. <li>The <em>lpFlags</em> parameter is used both on input and returned on output, allowing applications to sense the output state of the <strong>MSG_PARTIAL</strong> flag bit. However, the <strong>MSG_PARTIAL</strong> flag bit is not supported by all protocols.</li>
  668. </ul>
  669. <p>The
  670. <strong>WSARecv</strong> function is used on connected sockets or bound connectionless sockets specified by the <em>s</em> parameter and is used to read incoming data. The socket's local address must be known. For server applications, this is usually done explicitly through
  671. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms737550(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">bind</strong></a> or implicitly through
  672. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms737526(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">accept</strong></a> or
  673. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741513(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">WSAAccept</strong></a>. Explicit binding is discouraged for client applications. For client applications the socket can become bound implicitly to a local address through
  674. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms737625(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">connect</strong></a>,
  675. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741559(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">WSAConnect</strong></a>,
  676. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740148(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">sendto</strong></a>,
  677. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741693(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">WSASendTo</strong></a>, or
  678. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741628(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">WSAJoinLeaf</strong></a>.</p>
  679. <p>For connected, connectionless sockets, this function restricts the addresses from which received messages are accepted. The function only returns messages from the remote address specified in the connection. Messages from other addresses are (silently) discarded.</p>
  680. <p>For overlapped sockets,
  681. <strong>WSARecv</strong> is used to post one or more buffers into which incoming data will be placed as it becomes available, after which the application-specified completion indication (invocation of the completion routine or setting of an event object) occurs. If the operation does not complete immediately, the final completion status is retrieved through the completion routine or
  682. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741582(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">WSAGetOverlappedResult</strong></a>.</p>
  683. <p class="note"><strong>Note</strong>&nbsp;&nbsp;All I/O initiated by a given thread is canceled when that thread exits. For overlapped sockets, pending asynchronous operations can fail if the thread is closed before the operations complete. See <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms682659(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">ExitThread</strong></a> for more information.</p>
  684. <p>If both <em>lpOverlapped</em> and <em>lpCompletionRoutine</em> are <strong>NULL</strong>, the socket in this function will be treated as a nonoverlapped socket.</p>
  685. <p>For nonoverlapped sockets, the blocking semantics are identical to that of the standard
  686. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740121(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">recv</strong></a> function and the <em>lpOverlapped</em> and <em>lpCompletionRoutine</em> parameters are ignored. Any data that has already been received and buffered by the transport will be copied into the specified user buffers. In the case of a blocking socket with no data currently having been received and buffered by the transport, the call will block until data is received. Windows Sockets 2 does not define any standard blocking time-out mechanism for this function. For protocols acting as byte-stream protocols the stack tries to return as much data as possible subject to the available buffer space and amount of received data available. However, receipt of a single byte is sufficient to unblock the caller. There is no guarantee that more than a single byte will be returned. For protocols acting as message-oriented, a full message is required to unblock the caller.</p>
  687. <p class="note"><strong>Note</strong>&nbsp;&nbsp;The socket options <strong>SO_RCVTIMEO</strong> and <strong>SO_SNDTIMEO</strong> apply only to blocking sockets.</p>
  688. <p>Whether or not a protocol is acting as byte stream is determined by the setting of XP1_MESSAGE_ORIENTED and XP1_PSEUDO_STREAM in its
  689. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741675(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">WSAPROTOCOL_INFO</strong></a> structure and the setting of the MSG_PARTIAL flag passed in to this function (for protocols that support it). The following table lists relevant combinations, (an asterisk (*) indicates that the setting of this bit does not matter in this case).</p>
  690. <p>
  691. </p><table>
  692. <tbody><tr><th>XP1_MESSAGE_ORIENTED</th><th>XP1_PSEUDO_STREAM</th><th>MSG_PARTIAL</th><th>Acts as</th></tr>
  693. <tr><td>not set</td><td>*</td><td>*</td><td>Byte stream</td></tr>
  694. <tr><td>*</td><td>Set</td><td>*</td><td>Byte stream</td></tr>
  695. <tr><td>set</td><td>Not set</td><td>set</td><td>Byte stream</td></tr>
  696. <tr><td>set</td><td>Not set</td><td>not set</td><td>Message oriented</td></tr>
  697. </tbody></table>
  698. <p>&nbsp;</p>
  699. <p>The buffers are filled in the order in which they appear in the array pointed to by <em>lpBuffers</em>, and the buffers are packed so that no holes are created.</p>
  700. <p>If this function is completed in an overlapped manner, it is the Winsock service provider's responsibility to capture the
  701. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741542(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">WSABUF</strong></a> structures before returning from this call. This enables applications to build stack-based
  702. <strong>WSABUF</strong> arrays pointed to by the <em>lpBuffers</em> parameter.</p>
  703. <p>For byte stream-style sockets (for example, type <strong>SOCK_STREAM</strong>), incoming data is placed into the buffers until the buffers are filled, the connection is closed, or the internally buffered data is exhausted. Regardless of whether or not the incoming data fills all the buffers, the completion indication occurs for overlapped sockets.</p>
  704. <p>For message-oriented sockets (for example, type <strong>SOCK_DGRAM</strong>), an incoming message is placed into the buffers up to the total size of the buffers, and the completion indication occurs for overlapped sockets. If the message is larger than the buffers, the buffers are filled with the first part of the message. If the <strong>MSG_PARTIAL</strong> feature is supported by the underlying service provider, the <strong>MSG_PARTIAL</strong> flag is set in <em>lpFlags</em> and subsequent receive operations will retrieve the rest of the message. If <strong>MSG_PARTIAL</strong> is not supported but the protocol is reliable,
  705. <strong>WSARecv</strong> generates the error
  706. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAEMSGSIZE">WSAEMSGSIZE</a> and a subsequent receive operation with a larger buffer can be used to retrieve the entire message. Otherwise, (that is, the protocol is unreliable and does not support <strong>MSG_PARTIAL</strong>), the excess data is lost, and
  707. <strong>WSARecv</strong> generates the error WSAEMSGSIZE.</p>
  708. <p>For connection-oriented sockets,
  709. <strong>WSARecv</strong> can indicate the graceful termination of the virtual circuit in one of two ways that depend on whether the socket is byte stream or message oriented. For byte streams, zero bytes having been read (as indicated by a zero return value to indicate success, and <em>lpNumberOfBytesRecvd</em> value of zero) indicates graceful closure and that no more bytes will ever be read. For message-oriented sockets, where a zero byte message is often allowable, a failure with an error code of
  710. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAEDISCON">WSAEDISCON</a> is used to indicate graceful closure. In any case a return error code of
  711. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAECONNRESET">WSAECONNRESET</a> indicates an abortive close has occurred.</p>
  712. <p>The <em>lpFlags</em> parameter can be used to influence the behavior of the function invocation beyond the options specified for the associated socket. That is, the semantics of this function are determined by the socket options and the <em>lpFlags</em> parameter. The latter is constructed by using the bitwise OR operator with any of the values listed in the following table.</p>
  713. <p>
  714. </p><table>
  715. <tbody><tr><th>Value</th><th>Meaning</th></tr>
  716. <tr><td>MSG_PEEK</td><td>
  717. <p>Peeks at the incoming data. The data is copied into the buffer, but is not removed from the input queue.</p>
  718. <p>This flag is valid only for nonoverlapped sockets.</p>
  719. </td></tr>
  720. <tr><td>MSG_OOB</td><td>Processes OOB data.</td></tr>
  721. <tr><td>MSG_PARTIAL</td><td>
  722. <p>This flag is for message-oriented sockets only. On output, this flag indicates that the data specified is a portion of the message transmitted by the sender. Remaining portions of the message will be specified in subsequent receive operations. A subsequent receive operation with the <strong>MSG_PARTIAL</strong> flag cleared indicates end of sender's message.</p>
  723. <p>As an input parameter, this flag indicates that the receive operation should complete even if only part of a message has been received by the transport provider.</p>
  724. </td></tr>
  725. <tr><td>MSG_PUSH_IMMEDIATE</td><td>
  726. <p>This flag is for stream-oriented sockets only. This flag allows an application that uses stream sockets to tell the transport provider not to delay completion of partially filled pending receive requests. This is a hint to the transport provider that the application is willing to receive any incoming data as soon as possible without necessarily waiting for the remainder of the data that might still be in transit. What constitutes a partially filled pending receive request is a transport-specific matter. </p>
  727. <p>In the case of TCP, this refers to the case of incoming TCP segments being placed into the receive request data buffer where none of the TCP segments indicated a PUSH bit value of 1. In this case, TCP may hold the partially filled receive request a little longer to allow the remainder of the data to arrive with a TCP segment that has the PUSH bit set to 1. This flag tells TCP not to hold the receive request but to complete it immediately.</p>
  728. <p> Using this flag for large block transfers is not recommended since processing partial blocks is often not optimal. This flag is useful only for cases where receiving and processing the partial data immediately helps decrease processing latency.</p>
  729. <p>This flag is a hint rather than an actual guarantee.</p>
  730. <p>This flag is supported on Windows&nbsp;8.1, Windows Server&nbsp;2012&nbsp;R2, and later.</p>
  731. </td></tr>
  732. <tr><td>MSG_WAITALL</td><td>
  733. <p>The receive request will complete only when one of the following events occurs:</p><ul>
  734. <li>The buffer supplied by the caller is completely full.</li>
  735. <li>The connection has been closed.</li>
  736. <li>The request has been canceled or an error occurred.</li>
  737. </ul>
  738. <p>Be aware that if the underlying transport provider does not support <strong>MSG_WAITALL</strong>, or if the socket is in a non-blocking mode, then this call will fail with <strong>WSAEOPNOTSUPP</strong>. Also, if <strong>MSG_WAITALL</strong> is specified along with <strong>MSG_OOB</strong>, <strong>MSG_PEEK</strong>, or <strong>MSG_PARTIAL</strong>, then this call will fail with <strong>WSAEOPNOTSUPP</strong>.</p>
  739. <p>This flag is not supported on datagram sockets or message-oriented sockets.</p>
  740. </td></tr>
  741. </tbody></table>
  742. <p>&nbsp;</p>
  743. <p>For message-oriented sockets, the <strong>MSG_PARTIAL</strong> bit is set in the <em>lpFlags</em> parameter if a partial message is received. If a complete message is received, <strong>MSG_PARTIAL</strong> is cleared in <em>lpFlags</em>. In the case of delayed completion, the value pointed to by <em>lpFlags</em> is not updated. When completion has been indicated, the application should call
  744. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741582(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">WSAGetOverlappedResult</strong></a> and examine the flags indicated by the <em>lpdwFlags</em> parameter.</p>
  745. <p class="note"><strong>Note</strong>&nbsp;&nbsp;When issuing a blocking Winsock call such as <strong>WSARecv</strong> with the <em>lpOverlapped</em> parameter set to NULL, Winsock may need to wait for a network event before the call can complete. Winsock performs an alertable wait in this situation, which can be interrupted by an asynchronous procedure call (APC) scheduled on the same thread. Issuing another blocking Winsock call inside an APC that interrupted an ongoing blocking Winsock call on the same thread will lead to undefined behavior, and must never be attempted by Winsock clients. </p>
  746. <h3><a id="Overlapped_Socket_I_O"></a><a id="overlapped_socket_i_o"></a><a id="OVERLAPPED_SOCKET_I_O"></a>Overlapped Socket I/O</h3>
  747. <p>If an overlapped operation completes immediately,
  748. <strong>WSARecv</strong> returns a value of zero and the <em>lpNumberOfBytesRecvd</em> parameter is updated with the number of bytes received and the flag bits indicated by the <em>lpFlags</em> parameter are also updated. If the overlapped operation is successfully initiated and will complete later,
  749. <strong>WSARecv</strong> returns <strong>SOCKET_ERROR</strong> and indicates error code
  750. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSA_IO_PENDING">WSA_IO_PENDING</a>. In this case, <em>lpNumberOfBytesRecvd</em> and <em>lpFlags</em> are not updated. When the overlapped operation completes, the amount of data transferred is indicated either through the <em>cbTransferred</em> parameter in the completion routine (if specified), or through the <em>lpcbTransfer</em> parameter in
  751. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741582(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">WSAGetOverlappedResult</strong></a>. Flag values are obtained by examining the <em>lpdwFlags</em> parameter of
  752. <strong>WSAGetOverlappedResult</strong>.</p>
  753. <p>The
  754. <strong>WSARecv</strong> function using overlapped I/O can be called from within the completion routine of a previous
  755. <strong>WSARecv</strong>,
  756. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741686(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">WSARecvFrom</strong></a>,
  757. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms742203(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">WSASend</strong></a> or
  758. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741693(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">WSASendTo</strong></a> function. For a given socket, I/O completion routines will not be nested. This permits time-sensitive data transmissions to occur entirely within a preemptive context.</p>
  759. <p>The <em>lpOverlapped</em> parameter must be valid for the duration of the overlapped operation. If multiple I/O operations are simultaneously outstanding, each must reference a separate
  760. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741665(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">WSAOVERLAPPED</strong></a> structure.</p>
  761. <p>If the <em>lpCompletionRoutine</em> parameter is <strong>NULL</strong>, the <em>hEvent</em> parameter of <em>lpOverlapped</em> is signaled when the overlapped operation completes if it contains a valid event object handle. An application can use
  762. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms742219(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">WSAWaitForMultipleEvents</strong></a> or
  763. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741582(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">WSAGetOverlappedResult</strong></a> to wait or poll on the event object.</p>
  764. <p>If <em>lpCompletionRoutine</em> is not <strong>NULL</strong>, the <em>hEvent</em> parameter is ignored and can be used by the application to pass context information to the completion routine. A caller that passes a non-<strong>NULL</strong> <em>lpCompletionRoutine</em> and later calls
  765. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741582(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">WSAGetOverlappedResult</strong></a> for the same overlapped I/O request may not set the <em>fWait</em> parameter for that invocation of
  766. <strong>WSAGetOverlappedResult</strong> to <strong>TRUE</strong>. In this case the usage of the <em>hEvent</em> parameter is undefined, and attempting to wait on the <em>hEvent</em> parameter would produce unpredictable results.</p>
  767. <p>The completion routine follows the same rules as stipulated for Windows file I/O completion routines. The completion routine will not be invoked until the thread is in an alertable wait state such as can occur when the function
  768. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms742219(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">WSAWaitForMultipleEvents</strong></a> with the <em>fAlertable</em> parameter set to <strong>TRUE</strong> is invoked.</p>
  769. <p>The prototype of the completion routine is as follows:</p>
  770. <div id="code-snippet-2" class="codeSnippetContainer" xmlns="">
  771. <div class="codeSnippetContainerTabs">
  772. <div class="codeSnippetContainerTabSingle" dir="ltr"><a>C++</a></div>
  773. </div>
  774. <div class="codeSnippetContainerCodeContainer">
  775. <div class="codeSnippetToolBar">
  776. <div class="codeSnippetToolBarText">
  777. <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if (window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_a0414305-023f-4c45-b7fa-9d2fb0645dd7');">Copy</a>
  778. </div>
  779. </div>
  780. <div id="CodeSnippetContainerCode_a0414305-023f-4c45-b7fa-9d2fb0645dd7" class="codeSnippetContainerCode" dir="ltr">
  781. <div style="color:Black;"><pre>
  782. <span style="color:Blue;">void</span> CALLBACK CompletionROUTINE(
  783. IN DWORD dwError,
  784. IN DWORD cbTransferred,
  785. IN LPWSAOVERLAPPED lpOverlapped,
  786. IN DWORD dwFlags
  787. );
  788. </pre></div>
  789. </div>
  790. </div>
  791. </div>
  792. <p>CompletionRoutine is a placeholder for an application-defined or library-defined function name. The <em>dwError</em> specifies the completion status for the overlapped operation as indicated by <em>lpOverlapped</em>. The <em>cbTransferred</em> parameter specifies the number of bytes received. The <em>dwFlags</em> parameter contains information that would have appeared in <em>lpFlags</em> if the receive operation had completed immediately. This function does not return a value.</p>
  793. <p>Returning from this function allows invocation of another pending completion routine for this socket. When using
  794. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms742219(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">WSAWaitForMultipleEvents</strong></a>, all waiting completion routines are called before the alertable thread's wait is satisfied with a return code of <strong>WSA_IO_COMPLETION</strong>. The completion routines can be called in any order, not necessarily in the same order the overlapped operations are completed. However, the posted buffers are guaranteed to be filled in the same order in which they are specified.</p>
  795. <p>If you are using I/O completion ports, be aware that the order of calls made to <strong>WSARecv</strong> is also the order in which the buffers are populated. <strong>WSARecv</strong> should not be called on the same socket simultaneously from different threads, because it can result in an unpredictable buffer order.</p>
  796. <h3><a id="Example_Code"></a><a id="example_code"></a><a id="EXAMPLE_CODE"></a>Example Code</h3>
  797. <p>The following example shows how to use the <strong>WSARecv</strong> function in overlapped I/O mode.</p>
  798. <div id="code-snippet-3" class="codeSnippetContainer" xmlns="">
  799. <div class="codeSnippetContainerTabs">
  800. <div class="codeSnippetContainerTabSingle" dir="ltr"><a>C++</a></div>
  801. </div>
  802. <div class="codeSnippetContainerCodeContainer">
  803. <div class="codeSnippetToolBar">
  804. <div class="codeSnippetToolBarText">
  805. <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if (window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_f1cafd4c-b1a2-4b97-ac42-d0961fd0071d');">Copy</a>
  806. </div>
  807. </div>
  808. <div id="CodeSnippetContainerCode_f1cafd4c-b1a2-4b97-ac42-d0961fd0071d" class="codeSnippetContainerCode" dir="ltr">
  809. <div style="color:Black;"><pre>
  810. #ifndef UNICODE
  811. #define UNICODE
  812. #endif
  813. #ifndef WIN32_LEAN_AND_MEAN
  814. #define WIN32_LEAN_AND_MEAN
  815. #endif
  816. #include &lt;Windows.h&gt;
  817. #include &lt;winsock2.h&gt;
  818. #include &lt;ws2tcpip.h&gt;
  819. #include &lt;stdio.h&gt;
  820. #include &lt;stdlib.h&gt;
  821. <span style="color:Green;">// Need to link with Ws2_32.lib</span>
  822. #pragma comment(lib, <span style="color:#A31515;">"ws2_32.lib"</span>)
  823. #pragma warning(disable: 4127) <span style="color:Green;">// Conditional expression is a constant</span>
  824. #define DATA_BUFSIZE 4096
  825. <span style="color:Blue;">int</span> __cdecl main(<span style="color:Blue;">int</span> argc, <span style="color:Blue;">char</span> **argv)
  826. {
  827. WSADATA wsd;
  828. <span style="color:Blue;">struct</span> addrinfo *result = NULL, *ptr = NULL, hints;
  829. WSAOVERLAPPED RecvOverlapped;
  830. SOCKET ConnSocket = INVALID_SOCKET;
  831. WSABUF DataBuf;
  832. DWORD RecvBytes, Flags;
  833. <span style="color:Blue;">char</span> buffer[DATA_BUFSIZE];
  834. <span style="color:Blue;">int</span> err = 0;
  835. <span style="color:Blue;">int</span> rc;
  836. <span style="color:Blue;">if</span> (argc != 2) {
  837. wprintf(L<span style="color:#A31515;">"usage: %s server-name\n"</span>, argv[0]);
  838. <span style="color:Blue;">return</span> 1;
  839. }
  840. <span style="color:Green;">// Load Winsock</span>
  841. rc = WSAStartup(MAKEWORD(2, 2), &amp;wsd);
  842. <span style="color:Blue;">if</span> (rc != 0) {
  843. wprintf(L<span style="color:#A31515;">"Unable to load Winsock: %d\n"</span>, rc);
  844. <span style="color:Blue;">return</span> 1;
  845. }
  846. <span style="color:Green;">// Make sure the hints struct is zeroed out</span>
  847. SecureZeroMemory((PVOID) &amp; hints, <span style="color:Blue;">sizeof</span> (<span style="color:Blue;">struct</span> addrinfo));
  848. <span style="color:Green;">// Initialize the hints to retrieve the server address for IPv4</span>
  849. hints.ai_family = AF_INET;
  850. hints.ai_socktype = SOCK_STREAM;
  851. hints.ai_protocol = IPPROTO_TCP;
  852. rc = getaddrinfo(argv[1], <span style="color:#A31515;">"27015"</span>, &amp;hints, &amp;result);
  853. <span style="color:Blue;">if</span> (rc != 0) {
  854. wprintf(L<span style="color:#A31515;">"getaddrinfo failed with error: %d\n"</span>, rc);
  855. <span style="color:Blue;">return</span> 1;
  856. }
  857. <span style="color:Blue;">for</span> (ptr = result; ptr != NULL; ptr = ptr-&gt;ai_next) {
  858. ConnSocket = socket(ptr-&gt;ai_family, ptr-&gt;ai_socktype, ptr-&gt;ai_protocol);
  859. <span style="color:Blue;">if</span> (ConnSocket == INVALID_SOCKET) {
  860. wprintf(L<span style="color:#A31515;">"socket failed with error: %d\n"</span>, WSAGetLastError());
  861. freeaddrinfo(result);
  862. <span style="color:Blue;">return</span> 1;
  863. }
  864. rc = connect(ConnSocket, ptr-&gt;ai_addr, (<span style="color:Blue;">int</span>) ptr-&gt;ai_addrlen);
  865. <span style="color:Blue;">if</span> (rc == SOCKET_ERROR) {
  866. <span style="color:Blue;">if</span> (WSAECONNREFUSED == (err = WSAGetLastError())) {
  867. closesocket(ConnSocket);
  868. ConnSocket = INVALID_SOCKET;
  869. <span style="color:Blue;">continue</span>;
  870. }
  871. wprintf(L<span style="color:#A31515;">"connect failed with error: %d\n"</span>, err);
  872. freeaddrinfo(result);
  873. closesocket(ConnSocket);
  874. <span style="color:Blue;">return</span> 1;
  875. }
  876. <span style="color:Blue;">break</span>;
  877. }
  878. <span style="color:Blue;">if</span> (ConnSocket == INVALID_SOCKET) {
  879. wprintf(L<span style="color:#A31515;">"Unable to establish connection with the server!\n"</span>);
  880. freeaddrinfo(result);
  881. <span style="color:Blue;">return</span> 1;
  882. }
  883. wprintf(L<span style="color:#A31515;">"Client connected...\n"</span>);
  884. <span style="color:Green;">// Make sure the RecvOverlapped struct is zeroed out</span>
  885. SecureZeroMemory((PVOID) &amp; RecvOverlapped, <span style="color:Blue;">sizeof</span> (WSAOVERLAPPED));
  886. <span style="color:Green;">// Create an event handle and setup an overlapped structure.</span>
  887. RecvOverlapped.hEvent = WSACreateEvent();
  888. <span style="color:Blue;">if</span> (RecvOverlapped.hEvent == NULL) {
  889. wprintf(L<span style="color:#A31515;">"WSACreateEvent failed: %d\n"</span>, WSAGetLastError());
  890. freeaddrinfo(result);
  891. closesocket(ConnSocket);
  892. <span style="color:Blue;">return</span> 1;
  893. }
  894. DataBuf.len = DATA_BUFSIZE;
  895. DataBuf.buf = buffer;
  896. <span style="color:Green;">// Call WSARecv until the peer closes the connection</span>
  897. <span style="color:Green;">// or until an error occurs</span>
  898. <span style="color:Blue;">while</span> (1) {
  899. Flags = 0;
  900. rc = WSARecv(ConnSocket, &amp;DataBuf, 1, &amp;RecvBytes, &amp;Flags, &amp;RecvOverlapped, NULL);
  901. <span style="color:Blue;">if</span> ((rc == SOCKET_ERROR) &amp;&amp; (WSA_IO_PENDING != (err = WSAGetLastError()))) {
  902. wprintf(L<span style="color:#A31515;">"WSARecv failed with error: %d\n"</span>, err);
  903. <span style="color:Blue;">break</span>;
  904. }
  905. rc = WSAWaitForMultipleEvents(1, &amp;RecvOverlapped.hEvent, TRUE, INFINITE, TRUE);
  906. <span style="color:Blue;">if</span> (rc == WSA_WAIT_FAILED) {
  907. wprintf(L<span style="color:#A31515;">"WSAWaitForMultipleEvents failed with error: %d\n"</span>, WSAGetLastError());
  908. <span style="color:Blue;">break</span>;
  909. }
  910. rc = WSAGetOverlappedResult(ConnSocket, &amp;RecvOverlapped, &amp;RecvBytes, FALSE, &amp;Flags);
  911. <span style="color:Blue;">if</span> (rc == FALSE) {
  912. wprintf(L<span style="color:#A31515;">"WSARecv operation failed with error: %d\n"</span>, WSAGetLastError());
  913. <span style="color:Blue;">break</span>;
  914. }
  915. wprintf(L<span style="color:#A31515;">"Read %d bytes\n"</span>, RecvBytes);
  916. WSAResetEvent(RecvOverlapped.hEvent);
  917. <span style="color:Green;">// If 0 bytes are received, the connection was closed</span>
  918. <span style="color:Blue;">if</span> (RecvBytes == 0)
  919. <span style="color:Blue;">break</span>;
  920. }
  921. WSACloseEvent(RecvOverlapped.hEvent);
  922. closesocket(ConnSocket);
  923. freeaddrinfo(result);
  924. WSACleanup();
  925. <span style="color:Blue;">return</span> 0;
  926. }
  927. </pre></div>
  928. </div>
  929. </div>
  930. </div>
  931. <p><strong>Windows&nbsp;Phone&nbsp;8:</strong> This function is supported for Windows Phone Store apps on Windows&nbsp;Phone&nbsp;8 and later.</p>
  932. <p><strong>Windows&nbsp;8.1</strong> and <strong>Windows Server&nbsp;2012&nbsp;R2</strong>: This function is supported for Windows Store apps on Windows&nbsp;8.1, Windows Server&nbsp;2012&nbsp;R2, and later.</p>
  933. <h2>Requirements</h2>
  934. <table>
  935. <tbody><tr><th>
  936. <p>Minimum supported client</p>
  937. </th><td>Windows&nbsp;8.1, Windows&nbsp;Vista [desktop apps only]</td></tr>
  938. <tr><th>
  939. <p>Minimum supported server</p>
  940. </th><td>Windows Server&nbsp;2003 [desktop apps only]</td></tr>
  941. <tr><th>
  942. <p>Minimum supported phone</p>
  943. </th><td>Windows Phone 8</td></tr>
  944. <tr><th>
  945. <p>Header</p>
  946. </th><td>
  947. <dl>
  948. <dt>Winsock2.h</dt>
  949. </dl>
  950. </td></tr>
  951. <tr><th>
  952. <p>Library</p>
  953. </th><td>
  954. <dl>
  955. <dt>Ws2_32.lib</dt>
  956. </dl>
  957. </td></tr>
  958. <tr><th>
  959. <p>DLL</p>
  960. </th><td>
  961. <dl>
  962. <dt>Ws2_32.dll</dt>
  963. </dl>
  964. </td></tr>
  965. </tbody></table>
  966. <h2><a id="see_also"></a>See also</h2>
  967. <dl>
  968. <dt>
  969. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741416(v=vs.85).aspx">Winsock Reference</a>
  970. </dt>
  971. <dt>
  972. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741394(v=vs.85).aspx">Winsock Functions</a>
  973. </dt>
  974. <dt>
  975. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740121(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">recv</strong></a>
  976. </dt>
  977. <dt>
  978. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741551(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">WSACloseEvent</strong></a>
  979. </dt>
  980. <dt>
  981. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741561(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">WSACreateEvent</strong></a>
  982. </dt>
  983. <dt>
  984. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741542(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">WSABUF</strong></a>
  985. </dt>
  986. <dt>
  987. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741582(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">WSAGetOverlappedResult</strong></a>
  988. </dt>
  989. <dt>
  990. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741665(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">WSAOVERLAPPED</strong></a>
  991. </dt>
  992. <dt>
  993. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms742212(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">WSASocket</strong></a>
  994. </dt>
  995. <dt>
  996. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms742219(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">WSAWaitForMultipleEvents</strong></a>
  997. </dt>
  998. </dl>
  999. <p>&nbsp;</p>
  1000. <p>&nbsp;</p>
  1001. </div>
  1002. </div>
  1003. <script id="CommentTemplate" type="text/x-jquery-tmpl">
  1004. <div class="communityContentAnnotation">
  1005. <a name="${Index}"></a>
  1006. <h3>
  1007. ${Title}
  1008. </h3>
  1009. <div class="communityContentAnnotationBody">
  1010. {{html Body}}
  1011. </div>
  1012. <div class="communityContentAnnotationInfo">
  1013. <div class="communityContentAnnotationAvatarContainer">
  1014. <a href="${UserAvatar.Href}" title="${UserAvatar.ToolTip}" class="communityContentAnnotationAvatar"><img src="${UserAvatar.ImageUrl}" alt="${UserAvatar.ImageAltText}" width="34" height="34" /></a>
  1015. </div>
  1016. <div class="communityContentAnnotationUserDateContainer">
  1017. <div class="communityContentAnnotationUserContainer">
  1018. <a href="${UserAvatar.Href}">
  1019. ${User}
  1020. </a>
  1021. </div>
  1022. <div class="communityContentAnnotationDateContainer">
  1023. <span>${Date}</span>
  1024. {{if EditLink}}
  1025. <span>
  1026. <a href="${EditLink.Href}" title="${EditLink.ToolTip}" class="communityContentCommentEditLink">${EditLink.Title}</a>
  1027. </span>
  1028. {{/if}}
  1029. {{if DeleteLink}}
  1030. <span>
  1031. <a href="${DeleteLink.Href}" title="${DeleteLink.ToolTip}" class="communityContentDeleteLink">${DeleteLink.Title}</a>
  1032. </span>
  1033. {{/if}}
  1034. </div>
  1035. </div>
  1036. </div>
  1037. </div>
  1038. </script>
  1039. <div class="communityContentContainer">
  1040. <div id="CommunityContentHeader" class="communityContentHeader">
  1041. <div class="communityContentHeaderTitleContainer">
  1042. <h2>Community Additions</h2>
  1043. <a class="communityContentAddLink" href="https://msdn.microsoft.com/en-us/library/windows/desktop/community/add/ms741688(v=vs.85).aspx">
  1044. <span class="communityContentAddButton" title="Add">
  1045. ADD
  1046. </span>
  1047. </a>
  1048. </div>
  1049. <div style="clear: both;"></div>
  1050. </div>
  1051. <div id="CommunityComments" data-url="/en-us/library/windows/desktop/community/comments/ms741688(v=vs.85).aspx"><div class="communityContentAnnotation"> <a name="5"></a> <h3> Problem on Windows Server 2003 SP2 </h3> <div class="communityContentAnnotationBody"> <p><br> <em>lpNumberOfBytesRecvd</em><br></p><br><p><br> <em>...</em><br></p><br><p><br> <span>Use&nbsp;</span><br> <strong>NULL</strong><br> <span>&nbsp;for this parameter if the&nbsp;</span><br> <em>lpOverlapped</em><br> <span>&nbsp;parameter is not&nbsp;</span><br> <strong>NULL</strong><br> <span>&nbsp;to avoid potentially erroneous results</span><br></p><br><p><br> <span>is BAD advice.</span><br></p><br><p><br> <span>If call WSARecv and pass NULL as </span><br> <em>lpNumberOfBytesRecvd</em><br> <span>&nbsp;and &nbsp;not-NULL&nbsp;</span><br> <span>lpOverlapped, then your application will generate a bunch of these:</span><br></p><br><p>Access violation - code c0000005 (first chance)</p><br><p>and if you try to attach to process by WinDbg and push command .g (Go) then application won't restore execution after this exception raising.</p><br><p>"!analyze -v" output parts:</p>FAULTING_IP:&nbsp;<br>mswsock+24a4<br>71b224a4 8901 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mov &nbsp; &nbsp; dword ptr [ecx],eax<br><br>EXCEPTION_RECORD: &nbsp;ffffffff -- (.exr 0xffffffffffffffff)<br>ExceptionAddress: 71b224a4 (mswsock+0x000024a4)<br>&nbsp; &nbsp;ExceptionCode: c0000005 (Access violation)<br>&nbsp; ExceptionFlags: 00000000<br>NumberParameters: 2<br>&nbsp; &nbsp;Parameter[0]: 00000001<br>&nbsp; &nbsp;Parameter[1]: 00000000<br>Attempt to write to address 00000000<br><br>MODULE_NAME: mswsock<br><br>FAULTING_MODULE: 7c800000 ntdll<br><br>DEBUG_FLR_IMAGE_TIMESTAMP: &nbsp;485bf4c7<br><br>ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at "0x%08lx" referenced memory at "0x%08lx". The memory could not be "%s".<br><br>EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at "0x%08lx" referenced memory at "0x%08lx". The memory could not be "%s".<br><br>EXCEPTION_PARAMETER1: &nbsp;00000001<br><br>EXCEPTION_PARAMETER2: &nbsp;00000000<br><br>WRITE_ADDRESS: &nbsp;00000000&nbsp;<br><br>FOLLOWUP_IP:&nbsp;<br>mswsock+24a4<br>71b224a4 8901 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mov &nbsp; &nbsp; dword ptr [ecx],eax<br><br>MOD_LIST: &lt;ANALYSIS/&gt;<br><br>BUGCHECK_STR: &nbsp;APPLICATION_FAULT_NULL_POINTER_READ_NULL_POINTER_WRITE_WRONG_SYMBOLS<br><br>PRIMARY_PROBLEM_CLASS: &nbsp;NULL_POINTER_READ<br><br>DEFAULT_BUCKET_ID: &nbsp;NULL_POINTER_READ<br><br>LAST_CONTROL_TRANSFER: &nbsp;from 71c094e5 to 71b224a4<p><br></p> </div> <div class="communityContentAnnotationInfo"> <div class="communityContentAnnotationAvatarContainer"> <a href="https://social.msdn.microsoft.com/profile/ivan%20efimov/" title="" class="communityContentAnnotationAvatar"><img src="./WSARecv function (Windows)_files/avatar.jpg" alt="" width="34" height="34"></a> </div> <div class="communityContentAnnotationUserDateContainer"> <div class="communityContentAnnotationUserContainer"> <a href="https://social.msdn.microsoft.com/profile/ivan%20efimov/"> Ivan Efimov </a> </div> <div class="communityContentAnnotationDateContainer"> <span>3/12/2013</span> </div> </div> </div> </div><div class="communityContentAnnotation"> <a name="4"></a> <h3> Bad logics </h3> <div class="communityContentAnnotationBody"> Documentation is awful and incoherent to understand, which must reflect how much you suck to design semantics of WSARecv&nbsp;cooperative with overlapped I/O. Please make yourselves fully understand and redesign APIs of WSA with regard to overlapped I/O before release for the sake of mental health of your customers. Thank you VERY MUCH! </div> <div class="communityContentAnnotationInfo"> <div class="communityContentAnnotationAvatarContainer"> <a href="https://social.msdn.microsoft.com/profile/yang.dk/" title="" class="communityContentAnnotationAvatar"><img src="./WSARecv function (Windows)_files/avatar(1).jpg" alt="" width="34" height="34"></a> </div> <div class="communityContentAnnotationUserDateContainer"> <div class="communityContentAnnotationUserContainer"> <a href="https://social.msdn.microsoft.com/profile/yang.dk/"> Yang.DK </a> </div> <div class="communityContentAnnotationDateContainer"> <span>7/21/2012</span> </div> </div> </div> </div><div class="communityContentAnnotation"> <a name="2"></a> <h3> Callback on Return 0 </h3> <div class="communityContentAnnotationBody"> I have observed that when WSARecv returns zero, the callback, if given, is called before return from WSARecv function. Is this expected behavior? <br> </div> <div class="communityContentAnnotationInfo"> <div class="communityContentAnnotationAvatarContainer"> <a href="https://social.msdn.microsoft.com/profile/satindersingh/" title="" class="communityContentAnnotationAvatar"><img src="./WSARecv function (Windows)_files/avatar(2).jpg" alt="" width="34" height="34"></a> </div> <div class="communityContentAnnotationUserDateContainer"> <div class="communityContentAnnotationUserContainer"> <a href="https://social.msdn.microsoft.com/profile/satindersingh/"> SatinderSingh </a> </div> <div class="communityContentAnnotationDateContainer"> <span>4/3/2009</span> </div> </div> </div> </div><div class="communityContentAnnotation"> <a name="1"></a> <h3> WSAEFAULT </h3> <div class="communityContentAnnotationBody"> <p>The Error code section of the documentation for WSARecv is incomplete. WSAEFAULT can occur if lpFlags is NULL, or if lpNumberOfBytesRecvd is NULL when lpOverlapped is NULL.</p><br><p>Also, the Parameters section for lpBuffers could mention that it is safe to point lpBuffers to a transient area of memory, such as the stack. Although this is stated in the Remarks section, a repetition would help clear some confusion for users.</p> </div> <div class="communityContentAnnotationInfo"> <div class="communityContentAnnotationAvatarContainer"> <a href="https://social.msdn.microsoft.com/profile/joey_l/" title="" class="communityContentAnnotationAvatar"><img src="./WSARecv function (Windows)_files/avatar(3).jpg" alt="" width="34" height="34"></a> </div> <div class="communityContentAnnotationUserDateContainer"> <div class="communityContentAnnotationUserContainer"> <a href="https://social.msdn.microsoft.com/profile/joey_l/"> joey_l </a> </div> <div class="communityContentAnnotationDateContainer"> <span>4/9/2008</span> </div> </div> </div> </div></div>
  1052. </div>
  1053. <div class="libraryMemberFilter">
  1054. <div class="filterContainer">
  1055. <span>Show:</span>
  1056. <label>
  1057. <input type="checkbox" class="libraryFilterInherited" checked="checked" value="Inherit">Inherited
  1058. </label>
  1059. <label>
  1060. <input type="checkbox" class="libraryFilterProtected" checked="checked" value="Protected">Protected
  1061. </label>
  1062. </div>
  1063. </div>
  1064. <input type="hidden" id="libraryMemberFilterEmptyWarning" value="There are no members available with your current filter settings.">
  1065. </div>
  1066. </div>
  1067. <div class="clear"></div>
  1068. <input name="__RequestVerificationToken" type="hidden" value="iiy4PVjXBoY-N8xVnX6kuot8UVfoqFtaNvFIKY2JTPRPvHgsFIB8IPsCZgePzUKuXZYvZkYKi-lS_cKUhLJdaUAW7_I1">
  1069. <input id="ratingSubmitUrl" type="hidden" value="https://msdn.microsoft.com/en-us/library/feedback/add/ms741688(v=vs.85).aspx">
  1070. <input id="isTopicRated" type="hidden" value="false">
  1071. <div id="ux-footer" class="ltr">
  1072. <div id="footerSock">
  1073. <div id="footerSockInner">
  1074. <a name="feedback"></a>
  1075. <div data-fragmentname="Survey" id="Fragment_Survey" xmlns="http://www.w3.org/1999/xhtml"></div>
  1076. <div class="rating" style="display: block;">
  1077. <div id="ratingSection1">
  1078. <div class="title">
  1079. Was this page helpful?
  1080. </div>
  1081. <div class="description">
  1082. Your feedback about this content is important.<br>Let us know what you think.
  1083. </div>
  1084. <div class="buttons">
  1085. <button class="button" id="ratingYes">Yes</button>
  1086. <button class="button" id="ratingNo">No</button>
  1087. </div>
  1088. <input id="ratingValue" type="hidden" value="">
  1089. </div>
  1090. <div id="ratingSection2">
  1091. <div class="title">
  1092. Additional feedback?
  1093. </div>
  1094. <textarea id="ratingText" rows="6" cols="" maxlength="1500"></textarea>
  1095. <div class="counter right">
  1096. <span id="feedbackTextCounter">1500</span> characters remaining
  1097. </div>
  1098. <div class="buttons left">
  1099. <button class="button" id="ratingSubmit">Submit</button>
  1100. <button class="button" id="ratingSkipThis">Skip this</button>
  1101. </div>
  1102. </div>
  1103. <div id="ratingSection3">
  1104. <div class="title">
  1105. Thank you!
  1106. </div>
  1107. <div class="description">
  1108. We appreciate your feedback.
  1109. </div>
  1110. </div>
  1111. <div id="contentFeedbackQAContainer" style="display: none;"></div>
  1112. </div>
  1113. <div data-fragmentname="SockLinks" id="Fragment_SockLinks" xmlns="http://www.w3.org/1999/xhtml">
  1114. <div class="linkList">
  1115. <ul class="links">
  1116. <li>
  1117. <a href="http://go.microsoft.com/fwlink/p/?LinkId=317809" id="SockLinks_726_11" xmlns="http://www.w3.org/1999/xhtml">Find us on Facebook</a>
  1118. </li>
  1119. <li>
  1120. <a href="http://go.microsoft.com/fwlink/p/?LinkId=317811" id="SockLinks_726_12" xmlns="http://www.w3.org/1999/xhtml">Follow us on Twitter</a>
  1121. </li>
  1122. <li>
  1123. <a href="http://go.microsoft.com/fwlink/p/?linkid=393788" id="SockLinks_726_42" xmlns="http://www.w3.org/1999/xhtml">Read the blog</a>
  1124. </li>
  1125. </ul>
  1126. </div>
  1127. </div>
  1128. <div class="clear"></div>
  1129. </div>
  1130. </div>
  1131. <div id="footerContainer">
  1132. <div id="fourColumnFooter">
  1133. <div data-fragmentname="Column1" id="Fragment_Column1" xmlns="http://www.w3.org/1999/xhtml">
  1134. <div class="ListOfLinkLists">
  1135. <div class="listItems">
  1136. <div class="linkList" xmlns="http://www.w3.org/1999/xhtml">
  1137. <div class="linkListTitle">Centers</div>
  1138. <ul class="links">
  1139. <li>
  1140. <a href="http://dev.windows.com/" id="Column1_726_13" xmlns="http://www.w3.org/1999/xhtml">Windows Dev Center</a>
  1141. </li>
  1142. <li>
  1143. <a href="http://msdn.microsoft.com/windows/desktop" id="Column1_726_16" xmlns="http://www.w3.org/1999/xhtml">Desktop</a>
  1144. </li>
  1145. <li>
  1146. <a href="http://msdn.microsoft.com/windows/hardware" id="Column1_726_17" xmlns="http://www.w3.org/1999/xhtml">Hardware</a>
  1147. </li>
  1148. <li>
  1149. <a href="http://msdn.microsoft.com/ie" id="Column1_726_15" xmlns="http://www.w3.org/1999/xhtml">Internet Explorer</a>
  1150. </li>
  1151. </ul>
  1152. </div>
  1153. </div>
  1154. </div>
  1155. </div>
  1156. <div data-fragmentname="Column2" id="Fragment_Column2" xmlns="http://www.w3.org/1999/xhtml">
  1157. <div class="ListOfLinkLists">
  1158. <div class="listItems">
  1159. <div class="linkList" xmlns="http://www.w3.org/1999/xhtml">
  1160. <div class="linkListTitle">Related developer sites</div>
  1161. <ul class="links">
  1162. <li>
  1163. <a href="http://go.microsoft.com/fwlink/p/?linkid=285622" id="Column2_726_18" xmlns="http://www.w3.org/1999/xhtml">Microsoft Connect</a>
  1164. </li>
  1165. <li>
  1166. <a href="http://go.microsoft.com/fwlink/p/?linkid=285623" id="Column2_726_19" xmlns="http://www.w3.org/1999/xhtml">.NET Framework</a>
  1167. </li>
  1168. <li>
  1169. <a href="http://go.microsoft.com/fwlink/p/?linkid=282089" id="Column2_726_20" xmlns="http://www.w3.org/1999/xhtml">Visual Studio</a>
  1170. </li>
  1171. <li>
  1172. <a href="http://go.microsoft.com/fwlink/p/?linkid=282087" id="Column2_726_22" xmlns="http://www.w3.org/1999/xhtml">Windows Server</a>
  1173. </li>
  1174. </ul>
  1175. </div>
  1176. <div class="linkList" xmlns="http://www.w3.org/1999/xhtml">
  1177. <div class="linkListTitle">Other Windows sites</div>
  1178. <ul class="links">
  1179. <li>
  1180. <a href="http://go.microsoft.com/fwlink/p/?linkid=280294" id="Column2_726_23" xmlns="http://www.w3.org/1999/xhtml">Enterprise</a>
  1181. </li>
  1182. <li>
  1183. <a href="http://go.microsoft.com/fwlink/p/?linkid=280295" id="Column2_726_24" xmlns="http://www.w3.org/1999/xhtml">Small business</a>
  1184. </li>
  1185. <li>
  1186. <a href="http://go.microsoft.com/fwlink/p/?linkid=280296" id="Column2_726_25" xmlns="http://www.w3.org/1999/xhtml">Students</a>
  1187. </li>
  1188. <li>
  1189. <a href="http://go.microsoft.com/fwlink/p/?linkid=280297" id="Column2_726_26" xmlns="http://www.w3.org/1999/xhtml">Home users</a>
  1190. </li>
  1191. </ul>
  1192. </div>
  1193. </div>
  1194. </div>
  1195. </div>
  1196. <div data-fragmentname="Column3" id="Fragment_Column3" xmlns="http://www.w3.org/1999/xhtml">
  1197. <div class="ListOfLinkLists">
  1198. <div class="listItems">
  1199. <div class="linkList" xmlns="http://www.w3.org/1999/xhtml">
  1200. <div class="linkListTitle">Downloads</div>
  1201. <ul class="links">
  1202. <li>
  1203. <a href="http://go.microsoft.com/fwlink/p/?linkid=267554" id="Column3_726_27" xmlns="http://www.w3.org/1999/xhtml">Windows 8.1</a>
  1204. </li>
  1205. <li>
  1206. <a href="http://go.microsoft.com/fwlink/p/?linkid=328183" id="Column3_726_28" xmlns="http://www.w3.org/1999/xhtml">Windows SDK</a>
  1207. </li>
  1208. <li>
  1209. <a href="http://go.microsoft.com/fwlink/p/?linkid=316619" id="Column3_726_29" xmlns="http://www.w3.org/1999/xhtml">Visual Studio Express 2013</a>
  1210. </li>
  1211. <li>
  1212. <a href="http://go.microsoft.com/fwlink/p/?linkid=285626" id="Column3_726_30" xmlns="http://www.w3.org/1999/xhtml">More downloads</a>
  1213. </li>
  1214. </ul>
  1215. </div>
  1216. <div class="linkList" xmlns="http://www.w3.org/1999/xhtml">
  1217. <div class="linkListTitle">Support</div>
  1218. <ul class="links">
  1219. <li>
  1220. <a href="http://go.microsoft.com/fwlink/p/?linkid=285632" id="Column3_726_43" xmlns="http://www.w3.org/1999/xhtml">Forums</a>
  1221. </li>
  1222. <li>
  1223. <a href="http://go.microsoft.com/fwlink/p/?linkid=285633" id="Column3_726_44" xmlns="http://www.w3.org/1999/xhtml">More support options</a>
  1224. </li>
  1225. </ul>
  1226. </div>
  1227. </div>
  1228. </div>
  1229. </div>
  1230. <div data-fragmentname="Column4" id="Fragment_Column4" xmlns="http://www.w3.org/1999/xhtml">
  1231. <div class="ListOfLinkLists">
  1232. <div class="listItems">
  1233. <div class="linkList" xmlns="http://www.w3.org/1999/xhtml">
  1234. <div class="linkListTitle">Essentials</div>
  1235. <ul class="links">
  1236. <li>
  1237. <a href="http://go.microsoft.com/fwlink/p/?linkid=285627" id="Column4_726_35" xmlns="http://www.w3.org/1999/xhtml">Windows APIs</a>
  1238. </li>
  1239. <li>
  1240. <a href="http://go.microsoft.com/fwlink/p/?linkid=285628" id="Column4_726_36" xmlns="http://www.w3.org/1999/xhtml">Samples</a>
  1241. </li>
  1242. <li>
  1243. <a href="http://go.microsoft.com/fwlink/p/?linkid=285629" id="Column4_726_37" xmlns="http://www.w3.org/1999/xhtml">Compatibility and certification</a>
  1244. </li>
  1245. <li>
  1246. <a href="http://go.microsoft.com/fwlink/p/?linkid=285630" id="Column4_726_45" xmlns="http://www.w3.org/1999/xhtml">Desktop dashboard</a>
  1247. </li>
  1248. </ul>
  1249. </div>
  1250. <div class="linkList" xmlns="http://www.w3.org/1999/xhtml">
  1251. <div class="linkListTitle">Stay connected</div>
  1252. <ul class="links">
  1253. <li>
  1254. <a href="http://go.microsoft.com/fwlink/p/?linkid=285954" id="Column4_726_41" xmlns="http://www.w3.org/1999/xhtml">Microsoft events</a>
  1255. </li>
  1256. <li>
  1257. <a href="http://go.microsoft.com/fwlink/p/?linkid=313895" id="Column4_726_39" xmlns="http://www.w3.org/1999/xhtml">Building Apps for Windows Devices</a>
  1258. </li>
  1259. </ul>
  1260. </div>
  1261. </div>
  1262. </div>
  1263. </div>
  1264. </div>
  1265. <div id="baseFooterLogos">
  1266. <span class="microsoftlogo" title="Microsoft"></span>
  1267. <a href="https://msdn.microsoft.com/en-us" class="msdnlogo" title="MSDN"></a>
  1268. </div>
  1269. <div id="baseFooter">
  1270. <div id="FooterCopyright">© 2015 Microsoft</div>
  1271. <div data-fragmentname="BaseFooter" id="Fragment_BaseFooter" xmlns="http://www.w3.org/1999/xhtml">
  1272. <div class="linkList">
  1273. <ul class="links horizontal">
  1274. <li>
  1275. <a href="http://go.microsoft.com/fwlink/?LinkId=248681" id="BaseFooter_35351_3" xmlns="http://www.w3.org/1999/xhtml">Privacy and Cookies</a>
  1276. </li>
  1277. <li>
  1278. <a href="http://go.microsoft.com/fwlink/p/?linkid=248155" id="BaseFooter_35351_1" xmlns="http://www.w3.org/1999/xhtml">Terms of Use</a>
  1279. </li>
  1280. <li>
  1281. <a href="http://go.microsoft.com/fwlink/p/?linkid=248154" id="BaseFooter_35351_2" xmlns="http://www.w3.org/1999/xhtml">Trademarks</a>
  1282. </li>
  1283. <li>
  1284. <a href="http://go.microsoft.com/fwlink/p/?LinkId=400453" id="BaseFooter_730_5" xmlns="http://www.w3.org/1999/xhtml">Site map</a>
  1285. </li>
  1286. </ul>
  1287. </div>
  1288. </div>
  1289. <div data-fragmentname="HelloText" id="Fragment_HelloText" xmlns="http://www.w3.org/1999/xhtml">Hello from Seattle.
  1290. </div>
  1291. <span id="selectLocaleFromPopUp">
  1292. <div class="locale-selector" style="position: relative;">
  1293. <a class="current-locale" href="javascript:void(0)">
  1294. <span class="text">English</span>
  1295. <span class="gear"></span>
  1296. </a>
  1297. <div class="locale-selection-panel site-flag site-flag-lang" style="top: -245px; display: none;">
  1298. <div class="content">
  1299. <table class="all-locales" cellspacing="0" autogeneratecolumns="false" allowpaging="false" allowsorting="false" style="border-collapse: collapse;">
  1300. <tbody>
  1301. <tr>
  1302. <td><a title="Deutsch" href="http://msdn.microsoft.com/?action=SelectLocale&currentLocale=en-us&newLocale=de-de&fromPage=/en-us/library/windows/desktop/ms741688(v=vs.85).aspx/" class="locale-link">Deutsch</a></td>
  1303. <td><a title="English" href="http://msdn.microsoft.com/?action=SelectLocale&currentLocale=en-us&newLocale=en-us&fromPage=/en-us/library/windows/desktop/ms741688(v=vs.85).aspx/" class="locale-link selected">English</a></td>
  1304. <td><a title="Español" href="http://msdn.microsoft.com/?action=SelectLocale&currentLocale=en-us&newLocale=es-es&fromPage=/en-us/library/windows/desktop/ms741688(v=vs.85).aspx/" class="locale-link">Español</a></td>
  1305. <td><a title="Français" href="http://msdn.microsoft.com/?action=SelectLocale&currentLocale=en-us&newLocale=fr-fr&fromPage=/en-us/library/windows/desktop/ms741688(v=vs.85).aspx/" class="locale-link">Français</a></td>
  1306. </tr><tr>
  1307. <td><a title="Italiano" href="http://msdn.microsoft.com/?action=SelectLocale&currentLocale=en-us&newLocale=it-it&fromPage=/en-us/library/windows/desktop/ms741688(v=vs.85).aspx/" class="locale-link">Italiano</a></td>
  1308. <td><a title="日本語" href="http://msdn.microsoft.com/?action=SelectLocale&currentLocale=en-us&newLocale=ja-jp&fromPage=/en-us/library/windows/desktop/ms741688(v=vs.85).aspx/" class="locale-link">日本語</a></td>
  1309. <td><a title="한국어" href="http://msdn.microsoft.com/?action=SelectLocale&currentLocale=en-us&newLocale=ko-kr&fromPage=/en-us/library/windows/desktop/ms741688(v=vs.85).aspx/" class="locale-link">한국어</a></td>
  1310. <td><a title="Português" href="http://msdn.microsoft.com/?action=SelectLocale&currentLocale=en-us&newLocale=pt-br&fromPage=/en-us/library/windows/desktop/ms741688(v=vs.85).aspx/" class="locale-link">Português</a></td>
  1311. </tr><tr class="last">
  1312. <td><a title="Pусский" href="http://msdn.microsoft.com/?action=SelectLocale&currentLocale=en-us&newLocale=ru-ru&fromPage=/en-us/library/windows/desktop/ms741688(v=vs.85).aspx/" class="locale-link">Pусский</a></td>
  1313. <td><a title="简体中文" href="http://msdn.microsoft.com/?action=SelectLocale&currentLocale=en-us&newLocale=zh-cn&fromPage=/en-us/library/windows/desktop/ms741688(v=vs.85).aspx/" class="locale-link">简体中文</a></td>
  1314. <td><a title="繁體中文" href="http://msdn.microsoft.com/?action=SelectLocale&currentLocale=en-us&newLocale=zh-tw&fromPage=/en-us/library/windows/desktop/ms741688(v=vs.85).aspx/" class="locale-link">繁體中文</a></td>
  1315. </tr>
  1316. </tbody>
  1317. </table>
  1318. <div class="arrow">
  1319. &nbsp;</div>
  1320. </div>
  1321. </div>
  1322. </div>
  1323. </span>
  1324. <link type="text/css" rel="stylesheet">
  1325. <div class="clear"></div>
  1326. </div>
  1327. </div>
  1328. </div>
  1329. <div class="footerPrintView">
  1330. <div class="footerCopyrightPrintView">© 2015 Microsoft</div>
  1331. </div>
  1332. <input id="MtpsDevice" type="hidden" value="Default">
  1333. <!--[CDATA[ Third party scripts and code linked to or referenced from this website are licensed to you by the parties that own such code, not by Microsoft. See ASP.NET Ajax CDN Terms of Use – http://www.asp.net/ajaxlibrary/CDN.ashx. ]]-->
  1334. <noscript>&lt;div&gt;&lt;img alt="DCSIMG" id="Img1" width="1" height="1" src="https://m.webtrends.com/dcsmgru7m99k7mqmgrhudo0k8_8c6m/njs.gif?dcsuri=/nojavascript&amp;amp;WT.js=No" /&gt;&lt;/div&gt;</noscript>
  1335. <noscript>
  1336. &lt;a href="http://www.omniture.com" title="Web Analytics"&gt;
  1337. &lt;img src="//msstonojsmsdn.112.2o7.net/b/ss/msstonojsmsdn/1/H.20.2--NS/0" height="1" width="1" border="0" alt="" /&gt;
  1338. &lt;/a&gt;
  1339. </noscript>
  1340. <div id="globalRequestVerification">
  1341. <input name="__RequestVerificationToken" type="hidden" value="-vKfO3afbXC9wecuOZ_ZH0lUbIW3hOrGXM8DsDrO_VJvoCHYw8MDtTjzzB9lmSMBTtKPMiX-yIy3x0LERfAweNJ5vS01">
  1342. </div>
  1343. </div>
  1344. <script type="text/javascript" class="mtps-injected">
  1345. /*<![CDATA[*/
  1346. (function(window,document){"use strict";function preload(scripts){for(var result=[],script,e,i=0;i<scripts.length;i++)script=scripts[i],script.hasOwnProperty("url")&&(e=document.createElement("script"),e.src=script.url,script.throwaway=e),result.push(script);return result}function inject(scripts,index){var script,elem;if(index>=scripts.length){delete mtps.injectScripts;return}script=scripts[index];elem=document.createElement("script");elem.className="mtps-injected";elem.async=!1;var isLoaded=!1,timeoutId=0,injectNextFnName="",injectNext=elem.onerror=function(){isLoaded||(isLoaded=!0,inject(scripts,index+1),window.clearTimeout(timeoutId),elem.onload=elem.onerror=elem.onreadystatechange=null,injectNextFnName&&delete mtps[injectNextFnName],elem.removeEventListener&&elem.removeEventListener("load",injectNext,!1))};elem.addEventListener?elem.addEventListener("load",injectNext,!1):elem.readyState==="uninitialized"?elem.onreadystatechange=function(){(this.readyState==="loaded"||this.readyState==="complete")&&injectNext()}:elem.onload=injectNext;script.hasOwnProperty("url")?(timeoutId=window.setTimeout(injectNext,12e4),elem.src=script.url):(injectNextFnName="_injectNextScript_"+index,mtps[injectNextFnName]=injectNext,timeoutId=window.setTimeout(injectNext,2e3),elem.text="try {\n"+script.txt+"\n} finally { MTPS."+injectNextFnName+" && MTPS."+injectNextFnName+"(); }");parent.appendChild(elem)}var mtps=window.MTPS||(window.MTPS={}),parent=document.getElementsByTagName("head")[0];mtps.injectScripts=function(scripts){inject(preload(scripts),0)}})(window,document);
  1347. MTPS.injectScripts([
  1348. { txt: "/**/\r\n(window.MTPS || (window.MTPS = {})).cdnDomains || (window.MTPS.cdnDomains = { \r\n\t\"image\": \"https://i-msdn.sec.s-msft.com\", \r\n\t\"js\": \"https://i2-msdn.sec.s-msft.com\", \r\n\t\"css\": \"https://i-msdn.sec.s-msft.com\", \r\n\t\"\": \"https://\", \r\n\t\"xap\": \"https://msdn.microsoft.com\"\r\n});\r\n/**/" },
  1349. { url: "https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.2.min.js" },
  1350. { txt: "//\n var literalNormalizedUrl = \u0027/en-us/library/windows/desktop/ms741688(l=en-us,v=vs.85).aspx\u0027;\n var wt_nvr_ru = \u0027WT_NVR_RU\u0027;\n var wt_fpcdom = \u0027.microsoft.com\u0027;\n var wt_domlist = \u0027msdn.microsoft.com\u0027;\n var wt_pathlist = \u0027\u0027;\n var wt_paramlist = \u0027DCSext.mtps_devcenter\u0027;\n var wt_siteid = \u0027MSDN\u0027;\n var gDomain = \u0027m.webtrends.com\u0027;\n var gDcsId = \u0027dcsmgru7m99k7mqmgrhudo0k8_8c6m\u0027;\n var gFpc = \u0027WT_FPC\u0027;\n\n\n\n if (document.cookie.indexOf(gFpc + \"=\") == -1) {\n var wtidJs = document.createElement(\"script\");\n wtidJs.src = \"//\" + gDomain + \"/\" + gDcsId + \"/wtid.js\";\n document.getElementsByTagName(\"head\")[0].appendChild(wtidJs);\n }\n\n\n\n var detectedLocale = \u0027en-us\u0027;\n var wtsp = \u0027_msdn_\u0027;\n var gTrackEvents = \u00270\u0027;\n/**/" },
  1351. { txt: "/**/\n var omni_guid = \"c068ae2d-a675-46b7-b3a6-29fe9df23e5e\";\n/**/" },
  1352. { txt: "//\n\n window.appInsightsId = \u002760854590-027a-4ae4-98be-2741a40f355f\u0027;\n //" },
  1353. { url: "https://i2-msdn.sec.s-msft.com/Combined.js?resources=0:Utilities,1:Rating,0:Topic,2:webtrendsscript,3:omni_rsid_MSDN,0:AppInsightsPerf,4:Toc,1:SearchBox;/Areas/Epx/Content/Scripts:0,/Areas/Epx/Themes/Base/Content:1,/Areas/Global/Content/Webtrends/resources:2,/Areas/Global/Content/Omniture/resources/MSDN:3,/Areas/Library/Content:4\u0026amp;hashKey=CD797F85BF9590D82AEAECC2C4A03FC8\u0026amp;v=45B20E710D8A51EDDE9D2FACD3F9FBEA" },
  1354. { url: "https://i1.services.social.microsoft.com/search/Widgets/SearchBox.jss?boxid=HeaderSearchTextBox\u0026btnid=HeaderSearchButton\u0026brand=MSDN\u0026loc=en-us\u0026Refinement=181\u0026focusOnInit=false\u0026iroot=windows%2fdesktop\u0026emptyWatermark=true\u0026searchButtonTooltip=Search" },
  1355. { url: "https://i2-msdn.sec.s-msft.com/Combined.js?resources=0:TocDropDown,1:NavigationResize;/Areas/Epx/Themes/Windows/Content:0,/Areas/Library/Content:1\u0026amp;hashKey=D158B2010A6B5AB806BFFA399599FB66\u0026amp;v=45B20E710D8A51EDDE9D2FACD3F9FBEA" },
  1356. { url: "https://ajax.aspnetcdn.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js" },
  1357. { url: "https://i2-msdn.sec.s-msft.com/Combined.js?resources=0:CommunityContent,0:LibraryMemberFilter,1:Toc_Fixed,2:SelectLocaleFromPopUp,1:CodeSnippet,1:TopicNotInScope,1:CollapsibleArea,1:VersionSelector,1:SurveyBroker;/Areas/Library/Content:0,/Areas/Epx/Content/Scripts:1,/Areas/Epx/Themes/Base/Content:2\u0026amp;hashKey=7806B2478E0DC4023BB82CB6D0A73A70\u0026amp;v=45B20E710D8A51EDDE9D2FACD3F9FBEA" },
  1358. { txt: "$(document).ready(function() {\n try {\n var token = $(\"#globalRequestVerification input[name=\u0027__RequestVerificationToken\u0027]\").clone();\n $(\"#siteFeedbackForm\").append(token);\n } catch(err) {\n \n }\n });" }
  1359. ]);
  1360. /*]]>*/
  1361. </script>
  1362. <script src="./WSARecv function (Windows)_files/broker-config.js"></script></body></html>