加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
WSASend function (Windows).html 124.41 KB
一键复制 编辑 原始数据 按行查看 历史
Trent Nelson 提交于 2016-10-21 00:21 . Checkpoint commit.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562
<!DOCTYPE html>
<!-- saved from url=(0079)https://msdn.microsoft.com/en-us/library/windows/desktop/ms742203(v=vs.85).aspx -->
<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="./WSASend function (Windows)_files/WSASend function (Windows).html">
<title>WSASend function (Windows)</title>
<meta name="DCS.dcsuri" content="/en-us/library/windows/desktop/ms742203(d=default,l=en-us,v=vs.85).aspx">
<meta name="NormalizedUrl" content="https://msdn.microsoft.com/en-us/library/windows/desktop/ms742203(d=default,l=en-us,v=vs.85).aspx">
<meta name="ms.normalizedurl" content="https://msdn.microsoft.com/en-us/library/windows/desktop/ms742203(d=default,l=en-us,v=vs.85).aspx">
<meta name="VotingContextUrl" content="https://msdn.microsoft.com/en-us/library/windows/desktop/ms742203(d=default,l=en-us,v=vs.85).aspx">
<meta name="MN" content="FB361396-7:29:32 PM">
<meta name="Search.ShortId" content="ms742203">
<meta name="ms.shortidmsdn" content="ms742203">
<meta name="Ms.Locale" content="en-us">
<meta name="ms.prodver" content="VS.85">
<meta name="ms.contentlang" content="EN">
<meta name="ms.lang" content="EN">
<meta name="ms.loc" content="US">
<meta name="ms.sitever" content="2015.01.20.2">
<meta name="ms.assetid" content="764339e6-a1ac-455d-8ebd-ad0fa50dc3b0">
<meta name="ms.auth" content="0">
<link rel="shortcut icon" href="https://msdn.microsoft.com/Areas/Epx/Themes/Windows/Content/Winlogo_favicon.ico">
<link rel="stylesheet" type="text/css" href="./WSASend function (Windows)_files/Combined.css"><script type="text/javascript" async="" src="./WSASend function (Windows)_files/ms.js"></script><script type="text/javascript" src="./WSASend function (Windows)_files/ai.js" async=""></script><script class="mtps-injected">try {
/**/
(window.MTPS || (window.MTPS = {})).cdnDomains || (window.MTPS.cdnDomains = {
"image": "https://i-msdn.sec.s-msft.com",
"js": "https://i2-msdn.sec.s-msft.com",
"css": "https://i-msdn.sec.s-msft.com",
"xap": "https://msdn.microsoft.com"
});
/**/
} finally { MTPS._injectNextScript_0 && MTPS._injectNextScript_0(); }</script><script class="mtps-injected" src="./WSASend function (Windows)_files/jquery-1.8.2.min.js"></script><style type="text/css"></style><script class="mtps-injected">try {
//
var literalNormalizedUrl = '/en-us/library/windows/desktop/ms742203(l=en-us,v=vs.85).aspx';
var wt_nvr_ru = 'WT_NVR_RU';
var wt_fpcdom = '.microsoft.com';
var wt_domlist = 'msdn.microsoft.com';
var wt_pathlist = '';
var wt_paramlist = 'DCSext.mtps_devcenter';
var wt_siteid = 'MSDN';
var gDomain = 'm.webtrends.com';
var gDcsId = 'dcsmgru7m99k7mqmgrhudo0k8_8c6m';
var gFpc = 'WT_FPC';
if (document.cookie.indexOf(gFpc + "=") == -1) {
var wtidJs = document.createElement("script");
wtidJs.src = "//" + gDomain + "/" + gDcsId + "/wtid.js";
document.getElementsByTagName("head")[0].appendChild(wtidJs);
}
var detectedLocale = 'en-us';
var wtsp = '_msdn_';
var gTrackEvents = '0';
/**/
} finally { MTPS._injectNextScript_2 && MTPS._injectNextScript_2(); }</script><script class="mtps-injected">try {
/**/
var omni_guid = "e47254b8-14a6-4466-a3e4-f0fc05a331df";
/**/
} finally { MTPS._injectNextScript_3 && MTPS._injectNextScript_3(); }</script><script class="mtps-injected">try {
//
window.appInsightsId = '60854590-027a-4ae4-98be-2741a40f355f';
//
} finally { MTPS._injectNextScript_4 && MTPS._injectNextScript_4(); }</script><script class="mtps-injected" src="./WSASend 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="ms742203"><meta name="ms.TOC" content="windows desktop: learn: ms742203"><script class="mtps-injected" src="./WSASend function (Windows)_files/SearchBox.jss"></script><script class="mtps-injected" src="./WSASend function (Windows)_files/Combined(1).js"></script><script class="mtps-injected" src="./WSASend function (Windows)_files/jquery.tmpl.min.js"></script><script class="mtps-injected" src="./WSASend function (Windows)_files/Combined(2).js"></script><script src="./WSASend function (Windows)_files/broker.js"></script><script class="mtps-injected">try {
$(document).ready(function() {
try {
var token = $("#globalRequestVerification input[name='__RequestVerificationToken']").clone();
$("#siteFeedbackForm").append(token);
} catch(err) {
}
});
} finally { MTPS._injectNextScript_10 && MTPS._injectNextScript_10(); }</script><link href="./WSASend function (Windows)_files/PrintView.css" rel="stylesheet" type="text/css" media="print"></head>
<body class="library Chrome">
<div id="page">
<div id="ux-header" class="ltr en-us">
<div id="headerContainer">
<div id="logoAndSearchBox">
<div id="logo">
<a href="https://msdn.microsoft.com/windows/desktop" title="Windows"><img alt="Windows" src="./WSASend function (Windows)_files/Windows_logo.png"></a>
</div>
<div id="selectedTab">
<a class="dropDownToggle" href="javascript:void(0);">Dev Center - Desktop</a>
</div>
<div id="toclevel1_menu" style="display: none; left: 125px; top: 57px;">
<ul>
<li><a href="http://dev.windows.com/" title="Windows">Windows</a></li>
<li><a href="http://msdn.microsoft.com/windows/desktop/" title="Desktop">Desktop</a></li>
<li><a href="http://msdn.microsoft.com/windows/hardware/" title="Hardware">Hardware</a></li>
<li><a href="http://msdn.microsoft.com/ie/" title="Internet Explorer">Internet Explorer</a></li>
</ul>
<div style="clear: both"></div>
</div>
<div class="SearchBox">
<form id="HeaderSearchForm" name="HeaderSearchForm" method="get" onsubmit="return Epx.Controls.SearchBox.searchBoxOnSubmit(this);">
<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">
<button id="HeaderSearchButton" value="" type="submit" class="header-search-button" title="Search"></button>
<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>
</div>
<div class="Clear"></div>
</div>
<div class="Clear"></div>
<div class="ux-internav">
<div class="toclevel2">
<a class="normal" href="https://sysdev.microsoft.com/en-us/desktop/" title="Dashboard">Dashboard</a>
<a class="normal" href="http://msdn.microsoft.com/windows/desktop/bg161546.aspx" title="Get started">Get started</a>
<a class="normal" href="http://msdn.microsoft.com/windows/desktop/aa511258.aspx" title="Design">Design</a>
<a class="active" href="http://msdn.microsoft.com/windows/desktop/aa904962.aspx" title="Develop">Develop</a>
<a class="normal" href="http://msdn.microsoft.com/windows/desktop/dn553326.aspx" title="Test and deploy">Test and deploy</a>
<a class="normal" href="http://msdn.microsoft.com/windows/desktop/jj134964.aspx" title="Certify">Certify</a>
</div>
<div class="clear"></div>
</div>
<div id="signIn">
<a class="scarabLink" href="https://login.live.com/login.srf?wa=wsignin1.0&rpsnv=12&ct=1422070172&rver=6.0.5276.0&wp=MCMBI&wlcxt=MSDN%24MSDN%24MSDN&wreply=https%3a%2f%2fmsdn.microsoft.com%2fen-us%2flibrary%2fwindows%2fdesktop%2fms742203%2528v%3dvs.85%2529.aspx&lc=1033&id=254354&mkt=en-US" title="Sign in">Sign in</a></div>
</div>
<div id="blackBar">
<div class="toclevel3">
<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>
<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>
<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>
<a class="normal" href="http://code.msdn.microsoft.com/windowsdesktop/" title="Samples" style="opacity: 1; left: 0px;">Samples</a>
<a class="normal" href="http://msdn.microsoft.com/windows/desktop/aa904945.aspx" title="Community" style="opacity: 1; left: 0px;">Community</a>
</div>
<div class="clear"></div>
</div>
</div>
<div id="body">
<div id="leftNav" style="width: 228.5px; max-width: 480px; min-height: 11011px; height: auto;">
<div id="tocnav">
<div class="toclevel0" data-toclevel="0" style="padding-left: 0px;">
<a class="toc_collapsed" href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms742203(v=vs.85).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>
<div class="toclevel0" data-toclevel="0" style="padding-left: 0px;">
<a class="toc_collapsed" href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms742203(v=vs.85).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>
<div class="toclevel0" data-toclevel="0" style="padding-left: 0px;">
<a class="toc_collapsed" href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms742203(v=vs.85).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>
<div class="toclevel1" data-toclevel="1" data-childrenloaded="true" style="padding-left: 13px;">
<a class="toc_expanded" href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms742203(v=vs.85).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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2 current" data-toclevel="2" style="padding-left: 26px;">
<span class="toc_empty"></span><a href="./WSASend function (Windows)_files/WSASend function (Windows).html" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="WSASend">WSASend</a> </div>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
<div class="toclevel2" data-toclevel="2" style="padding-left: 26px;">
<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>
</div>
<div id="toc-resizable-ew" class="toc-resizable-ew"></div>
<a id="NavigationResize" href="javascript:void(0)" style="left: 229px; display: inline-block;">
<img class="cl_nav_resize_open" src="./WSASend function (Windows)_files/ImageSprite.png" title="Expand" alt="Expand">
<img class="cl_nav_resize_close" src="./WSASend function (Windows)_files/ImageSprite.png" title="Minimize" alt="Minimize" style="display: none;">
</a>
</div>
<div id="content" class="content" style="margin-left: 229px; width: auto;">
<div class="topic" xmlns="http://www.w3.org/1999/xhtml">
<h1 class="title">WSASend function</h1>
<div id="mainSection">
<div class="clsServerSDKContent">
</div>
<p>The
<strong>WSASend</strong> function sends data on a connected socket.</p>
<h2>Syntax</h2>
<div id="code-snippet-1" class="codeSnippetContainer" xmlns="">
<div class="codeSnippetContainerTabs">
<div class="codeSnippetContainerTabSingle" dir="ltr"><a>C++</a></div>
</div>
<div class="codeSnippetContainerCodeContainer">
<div class="codeSnippetToolBar">
<div class="codeSnippetToolBarText">
<a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if (window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_3d9312aa-a45d-4cce-adf4-1071cec45ae3');">Copy</a>
</div>
</div>
<div id="CodeSnippetContainerCode_3d9312aa-a45d-4cce-adf4-1071cec45ae3" class="codeSnippetContainerCode" dir="ltr">
<div style="color:Black;"><pre>
<span style="color:Blue;">int</span> WSASend(
_In_&nbsp;&nbsp;&nbsp;SOCKET s,
_In_&nbsp;&nbsp;&nbsp;LPWSABUF lpBuffers,
_In_&nbsp;&nbsp;&nbsp;DWORD dwBufferCount,
_Out_&nbsp;&nbsp;LPDWORD lpNumberOfBytesSent,
_In_&nbsp;&nbsp;&nbsp;DWORD dwFlags,
_In_&nbsp;&nbsp;&nbsp;LPWSAOVERLAPPED lpOverlapped,
_In_&nbsp;&nbsp;&nbsp;LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
);
</pre></div>
</div>
</div>
</div>
<h2>Parameters</h2>
<dl>
<dt><em>s</em> [in]</dt>
<dd>
<p>A descriptor that identifies a connected socket.</p>
</dd>
<dt><em>lpBuffers</em> [in]</dt>
<dd>
<p>A pointer to an array of
<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
<strong>WSABUF</strong> structure contains a pointer to a buffer and the length, in bytes, of the buffer. For a Winsock application, once the
<strong>WSASend</strong> function is called, the system owns these buffers and the application may not access them. This array must remain valid for the duration of the send operation.</p>
</dd>
<dt><em>dwBufferCount</em> [in]</dt>
<dd>
<p>The number of
<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>
</dd>
<dt><em>lpNumberOfBytesSent</em> [out]</dt>
<dd>
<p>A pointer to the number, in bytes, sent by this call if the I/O operation completes immediately. </p>
<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>
</dd>
<dt><em>dwFlags</em> [in]</dt>
<dd>
<p>The flags used to modify the behavior of the
<strong>WSASend</strong> function call. For more information, see Using <em>dwFlags</em> in the Remarks section.</p>
</dd>
<dt><em>lpOverlapped</em> [in]</dt>
<dd>
<p>A pointer to a
<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. This parameter is ignored for nonoverlapped sockets.</p>
</dd>
<dt><em>lpCompletionRoutine</em> [in]</dt>
<dd>
<p>A pointer to the completion routine called when the send operation has been completed. This parameter is ignored for nonoverlapped sockets.</p>
</dd>
</dl>
<h2>Return value</h2>
<p>
If no error occurs and the send operation has completed immediately,
<strong>WSASend</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
<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
<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>
<table>
<tbody><tr><th>Error code</th><th>Meaning</th></tr>
<tr><td>
<dl>
<dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAECONNABORTED">WSAECONNABORTED</a></strong></dt>
</dl>
</td><td>
<p>The virtual circuit was terminated due to a time-out or other failure.</p>
</td></tr>
<tr><td>
<dl>
<dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAECONNRESET">WSAECONNRESET</a></strong></dt>
</dl>
</td><td>
<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>
</td></tr>
<tr><td>
<dl>
<dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAEFAULT">WSAEFAULT</a></strong></dt>
</dl>
</td><td>
<p>The <em>lpBuffers</em>, <em>lpNumberOfBytesSent</em>, <em>lpOverlapped</em>, <em>lpCompletionRoutine</em> parameter is not totally contained in a valid part of the user address space.</p>
</td></tr>
<tr><td>
<dl>
<dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAEINTR">WSAEINTR</a></strong></dt>
</dl>
</td><td>
<p>A blocking Windows Socket 1.1 call was canceled through
<a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741547(v=vs.85).aspx">WSACancelBlockingCall</a>.</p>
</td></tr>
<tr><td>
<dl>
<dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAEINPROGRESS">WSAEINPROGRESS</a></strong></dt>
</dl>
</td><td>
<p>A blocking Windows Sockets 1.1 call is in progress, or the service provider is still processing a callback function.</p>
</td></tr>
<tr><td>
<dl>
<dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAEINVAL">WSAEINVAL</a></strong></dt>
</dl>
</td><td>
<p>The socket has not been bound with
<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 the socket is not created with the overlapped flag.</p>
</td></tr>
<tr><td>
<dl>
<dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAEMSGSIZE">WSAEMSGSIZE</a></strong></dt>
</dl>
</td><td>
<p>The socket is message oriented, and the message is larger than the maximum supported by the underlying transport.</p>
</td></tr>
<tr><td>
<dl>
<dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAENETDOWN">WSAENETDOWN</a></strong></dt>
</dl>
</td><td>
<p>The network subsystem has failed.</p>
</td></tr>
<tr><td>
<dl>
<dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAENETRESET">WSAENETRESET</a></strong></dt>
</dl>
</td><td>
<p>For a stream socket, the connection has been broken due to keep-alive activity detecting a failure while the operation was in progress. For a datagram socket, this error indicates that the time to live has expired.</p>
</td></tr>
<tr><td>
<dl>
<dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAENOBUFS">WSAENOBUFS</a></strong></dt>
</dl>
</td><td>
<p>The Windows Sockets provider reports a buffer deadlock.</p>
</td></tr>
<tr><td>
<dl>
<dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAENOTCONN">WSAENOTCONN</a></strong></dt>
</dl>
</td><td>
<p>The socket is not connected.</p>
</td></tr>
<tr><td>
<dl>
<dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAENOTSOCK">WSAENOTSOCK</a></strong></dt>
</dl>
</td><td>
<p>The descriptor is not a socket.</p>
</td></tr>
<tr><td>
<dl>
<dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAEOPNOTSUPP">WSAEOPNOTSUPP</a></strong></dt>
</dl>
</td><td>
<p><strong>MSG_OOB</strong> was specified, but the socket is not stream-style such as type <strong>SOCK_STREAM</strong>, OOB data is not supported in the communication domain associated with this socket, <strong>MSG_PARTIAL</strong> is not supported, or the socket is unidirectional and supports only receive operations.</p>
</td></tr>
<tr><td>
<dl>
<dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAESHUTDOWN">WSAESHUTDOWN</a></strong></dt>
</dl>
</td><td>
<p>The socket has been shut down; it is not possible to
<a href="./WSASend function (Windows)_files/WSASend function (Windows).html"><strong xmlns="http://www.w3.org/1999/xhtml">WSASend</strong></a> on a socket after
<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 how set to <strong>SD_SEND</strong> or <strong>SD_BOTH</strong>.</p>
</td></tr>
<tr><td>
<dl>
<dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAEWOULDBLOCK">WSAEWOULDBLOCK</a></strong></dt>
</dl>
</td><td>
<p><strong>Windows&nbsp;NT:&nbsp;&nbsp;</strong></p>
<p>Overlapped sockets: There are too many outstanding overlapped I/O requests. Nonoverlapped sockets: The socket is marked as nonblocking and the send operation cannot be completed immediately.</p>
</td></tr>
<tr><td>
<dl>
<dt><strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSANOTINITIALISED">WSANOTINITIALISED</a></strong></dt>
</dl>
</td><td>
<p>A successful
<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>
</td></tr>
<tr><td>
<dl>
<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>
</dl>
</td><td>
<p>An overlapped operation was successfully initiated and completion will be indicated at a later time.</p>
</td></tr>
<tr><td>
<dl>
<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>
</dl>
</td><td>
<p>The overlapped operation has been canceled due to the closure of the socket, the execution of the "SIO_FLUSH" command in
<a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741621(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">WSAIoctl</strong></a>, or the thread that initiated the overlapped request exited before the operation completed. For more information, see the Remarks section.</p>
</td></tr>
</tbody></table>
<p>&nbsp;</p>
<h2>Remarks</h2>
<p>The
<strong>WSASend</strong> function provides functionality over and above the standard
<a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740149(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">send</strong></a> function in two important areas:</p>
<ul>
<li>It can be used in conjunction with overlapped sockets to perform overlapped
<a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740149(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">send</strong></a> operations.</li>
<li>It allows multiple
<a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740149(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">send</strong></a> buffers to be specified making it applicable to the scatter/gather type of I/O.</li>
</ul>
<p>The
<strong>WSASend</strong> function is used to write outgoing data from one or more buffers on a connection-oriented socket specified by <em>s</em>. It can also be used, however, on connectionless sockets that have a stipulated default peer address established through the
<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> or
<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> function.</p>
<p>A socket created by the <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740506(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">socket</strong></a> function will have the overlapped attribute as the default. A socket created by the <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> function with the <em>dwFlags</em> parameter passed to <strong>WSASocket</strong> with the <strong>WSA_FLAG_OVERLAPPED</strong> bit set will have the overlapped attribute. For sockets with the overlapped attribute, <strong>WSASend</strong> uses overlapped I/O unless both the <em>lpOverlapped</em> and <em>lpCompletionRoutine</em> parameters are <strong>NULL</strong>. In that case, the socket is treated as a non-overlapped socket. A completion indication will occur, invoking the completion of a routine or setting of an event object, when the buffer(s) have been consumed by the transport. If the operation does not complete immediately, the final completion status is retrieved through the completion routine or
<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>
<p>If both <em>lpOverlapped</em> and <em>lpCompletionRoutine</em> are <strong>NULL</strong>, the socket in this function will be treated as a non-overlapped socket.</p>
<p>For non-overlapped sockets, the last two parameters (<em>lpOverlapped</em>, <em>lpCompletionRoutine</em>) are ignored and
<strong>WSASend</strong> adopts the same blocking semantics as
<a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740149(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">send</strong></a>. Data is copied from the buffer(s) into the transport's buffer. If the socket is non-blocking and stream-oriented, and there is not sufficient space in the transport's buffer,
<strong>WSASend</strong> will return with only part of the application's buffers having been consumed. Given the same buffer situation and a blocking socket,
<strong>WSASend</strong> will block until all of the application buffer contents have been consumed.</p>
<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>
<p>If this function is completed in an overlapped manner, it is the Winsock service provider's responsibility to capture the
<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
<strong>WSABUF</strong> arrays pointed to by the <em>lpBuffers</em> parameter.</p>
<p>For message-oriented sockets, do not exceed the maximum message size of the underlying provider, which can be obtained by getting the value of socket option <strong>SO_MAX_MSG_SIZE</strong>. If the data is too long to pass atomically through the underlying protocol the error
<a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAEMSGSIZE">WSAEMSGSIZE</a> is returned, and no data is transmitted.</p>
<p><strong>Windows&nbsp;Me/98/95:&nbsp;&nbsp;</strong>The <strong>WSASend</strong> function does not support more than 16 buffers.</p>
<p class="note"><strong>Note</strong>&nbsp;&nbsp;The successful completion of a
<strong>WSASend</strong> does not indicate that the data was successfully delivered.</p>
<h3><a id="Using_dwFlags"></a><a id="using_dwflags"></a><a id="USING_DWFLAGS"></a>Using dwFlags</h3>
<p>The <em>dwFlags</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>dwFlags</em> parameter. The latter is constructed by using the bitwise OR operator with any of any of the values listed in the following table.</p>
<table>
<tbody><tr><th>Value</th><th>Meaning</th></tr>
<tr><td><strong>MSG_DONTROUTE</strong></td><td>Specifies that the data should not be subject to routing. A Windows Sockets service provider can choose to ignore this flag.</td></tr>
<tr><td><strong>MSG_OOB</strong></td><td>Send OOB data on a stream-style socket such as <strong>SOCK_STREAM</strong> only.</td></tr>
<tr><td><strong>MSG_PARTIAL</strong></td><td>Specifies that <em>lpBuffers</em> only contains a partial message. Be aware that the error code
<a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAEOPNOTSUPP">WSAEOPNOTSUPP</a> will be returned by transports that do not support partial message transmissions.</td></tr>
</tbody></table>
<p>&nbsp;</p>
<p class="note"><strong>Note</strong>&nbsp;&nbsp;When issuing a blocking Winsock call such as <strong>WSASend</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>
<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>
<p>If an overlapped operation completes immediately,
<strong>WSASend</strong> returns a value of zero and the <em>lpNumberOfBytesSent</em> parameter is updated with the number of bytes sent. If the overlapped operation is successfully initiated and will complete later,
<strong>WSASend</strong> returns SOCKET_ERROR and indicates error code
<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>lpNumberOfBytesSent</em> is 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
<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>
<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. For more information, 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>.</p>
<p>The
<strong>WSASend</strong> function using overlapped I/O can be called from within the completion routine of a previous
<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>,
<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>, <strong>WSASend</strong>, or
<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. This enables time-sensitive data transmissions to occur entirely within a preemptive context.</p>
<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
<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>
<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
<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
<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>
<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>&nbsp;<em>lpCompletionRoutine</em> and later calls
<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
<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>
<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
<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>
<p>The transport providers allow an application to invoke send and receive operations from within the context of the socket I/O completion routine, and guarantee that, 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>
<p>The following C++ code example is a prototype of the completion routine.</p>
<div id="code-snippet-2" class="codeSnippetContainer" xmlns="">
<div class="codeSnippetContainerTabs">
</div>
<div class="codeSnippetContainerCodeContainer">
<div class="codeSnippetToolBar">
<div class="codeSnippetToolBarText">
<a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if (window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_76042b39-c7dc-4af7-9b39-904aa8e8d448');">Copy</a>
</div>
</div>
<div id="CodeSnippetContainerCode_76042b39-c7dc-4af7-9b39-904aa8e8d448" class="codeSnippetContainerCode" dir="ltr">
<div style="color:Black;"><pre>
void CALLBACK CompletionROUTINE(
IN DWORD dwError,
IN DWORD cbTransferred,
IN LPWSAOVERLAPPED lpOverlapped,
IN DWORD dwFlags
);
</pre></div>
</div>
</div>
</div>
<p>The CompletionRoutine function is a placeholder for an application-defined or library-defined function name. The <em>dwError</em> parameter specifies the completion status for the overlapped operation as indicated by <em>lpOverlapped</em>. <em>cbTransferred</em> specifies the number of bytes sent. Currently there are no flag values defined and <em>dwFlags</em> will be zero. This function does not return a value.</p>
<p>Returning from this function allows invocation of another pending completion routine for this socket. 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 sent in the same order they are specified.</p>
<p>If you are using I/O completion ports, be aware that the order of calls made to <strong>WSASend</strong> is also the order in which the buffers are populated. <strong>WSASend</strong> should not be called on the same socket simultaneously from different threads, because it can result in an unpredictable buffer order.</p>
<h3><a id="Example_Code"></a><a id="example_code"></a><a id="EXAMPLE_CODE"></a>Example Code</h3>
<p>The following code example shows how to use the <strong>WSASend</strong> function in overlapped I/O mode.</p>
<div id="code-snippet-3" class="codeSnippetContainer" xmlns="">
<div class="codeSnippetContainerTabs">
<div class="codeSnippetContainerTabSingle" dir="ltr"><a>C++</a></div>
</div>
<div class="codeSnippetContainerCodeContainer">
<div class="codeSnippetToolBar">
<div class="codeSnippetToolBarText">
<a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if (window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_9409d88c-ac63-4926-8935-9faf877afa5f');">Copy</a>
</div>
</div>
<div id="CodeSnippetContainerCode_9409d88c-ac63-4926-8935-9faf877afa5f" class="codeSnippetContainerCode" dir="ltr">
<div style="color:Black;"><pre>
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include &lt;Windows.h&gt;
#include &lt;winsock2.h&gt;
#include &lt;ws2tcpip.h&gt;
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
<span style="color:Green;">// Need to link with Ws2_32.lib</span>
#pragma comment(lib, <span style="color:#A31515;">"ws2_32.lib"</span>)
#define DATA_BUFSIZE 4096
#define SEND_COUNT 10
<span style="color:Blue;">int</span> __cdecl main()
{
WSADATA wsd;
<span style="color:Blue;">struct</span> addrinfo *result = NULL;
<span style="color:Blue;">struct</span> addrinfo hints;
WSAOVERLAPPED SendOverlapped;
SOCKET ListenSocket = INVALID_SOCKET;
SOCKET AcceptSocket = INVALID_SOCKET;
WSABUF DataBuf;
DWORD SendBytes;
DWORD Flags;
<span style="color:Blue;">char</span> buffer[DATA_BUFSIZE];
<span style="color:Blue;">int</span> err = 0;
<span style="color:Blue;">int</span> rc, i;
<span style="color:Green;">// Load Winsock</span>
rc = WSAStartup(MAKEWORD(2, 2), &amp;wsd);
<span style="color:Blue;">if</span> (rc != 0) {
printf(<span style="color:#A31515;">"Unable to load Winsock: %d\n"</span>, rc);
<span style="color:Blue;">return</span> 1;
}
<span style="color:Green;">// Make sure the hints struct is zeroed out</span>
SecureZeroMemory((PVOID) &amp; hints, <span style="color:Blue;">sizeof</span>(<span style="color:Blue;">struct</span> addrinfo));
<span style="color:Green;">// Initialize the hints to obtain the </span>
<span style="color:Green;">// wildcard bind address for IPv4</span>
hints.ai_family = AF_INET;
hints.ai_socktype = SOCK_STREAM;
hints.ai_protocol = IPPROTO_TCP;
hints.ai_flags = AI_PASSIVE;
rc = getaddrinfo(NULL, <span style="color:#A31515;">"27015"</span>, &amp;hints, &amp;result);
<span style="color:Blue;">if</span> (rc != 0) {
printf(<span style="color:#A31515;">"getaddrinfo failed with error: %d\n"</span>, rc);
<span style="color:Blue;">return</span> 1;
}
ListenSocket = socket(result-&gt;ai_family,
result-&gt;ai_socktype, result-&gt;ai_protocol);
<span style="color:Blue;">if</span> (ListenSocket == INVALID_SOCKET) {
printf(<span style="color:#A31515;">"socket failed with error: %d\n"</span>, WSAGetLastError());
freeaddrinfo(result);
<span style="color:Blue;">return</span> 1;
}
rc = bind(ListenSocket, result-&gt;ai_addr, (<span style="color:Blue;">int</span>) result-&gt;ai_addrlen);
<span style="color:Blue;">if</span> (rc == SOCKET_ERROR) {
printf(<span style="color:#A31515;">"bind failed with error: %d\n"</span>, WSAGetLastError());
freeaddrinfo(result);
closesocket(ListenSocket);
<span style="color:Blue;">return</span> 1;
}
rc = listen(ListenSocket, 1);
<span style="color:Blue;">if</span> (rc == SOCKET_ERROR) {
printf(<span style="color:#A31515;">"listen failed with error: %d\n"</span>, WSAGetLastError());
freeaddrinfo(result);
closesocket(ListenSocket);
<span style="color:Blue;">return</span> 1;
}
<span style="color:Green;">// Accept an incoming connection request</span>
AcceptSocket = accept(ListenSocket, NULL, NULL);
<span style="color:Blue;">if</span> (AcceptSocket == INVALID_SOCKET) {
printf(<span style="color:#A31515;">"accept failed with error: %d\n"</span>, WSAGetLastError());
freeaddrinfo(result);
closesocket(ListenSocket);
<span style="color:Blue;">return</span> 1;
}
printf(<span style="color:#A31515;">"Client Accepted...\n"</span>);
<span style="color:Green;">// Make sure the SendOverlapped struct is zeroed out</span>
SecureZeroMemory((PVOID) &amp; SendOverlapped, <span style="color:Blue;">sizeof</span> (WSAOVERLAPPED));
<span style="color:Green;">// Create an event handle and setup the overlapped structure.</span>
SendOverlapped.hEvent = WSACreateEvent();
<span style="color:Blue;">if</span> (SendOverlapped.hEvent == NULL) {
printf(<span style="color:#A31515;">"WSACreateEvent failed with error: %d\n"</span>, WSAGetLastError());
freeaddrinfo(result);
closesocket(ListenSocket);
closesocket(AcceptSocket);
<span style="color:Blue;">return</span> 1;
}
DataBuf.len = DATA_BUFSIZE;
DataBuf.buf = buffer;
<span style="color:Blue;">for</span> (i = 0; i &lt; SEND_COUNT; i++) {
rc = WSASend(AcceptSocket, &amp;DataBuf, 1,
&amp;SendBytes, 0, &amp;SendOverlapped, NULL);
<span style="color:Blue;">if</span> ((rc == SOCKET_ERROR) &amp;&amp;
(WSA_IO_PENDING != (err = WSAGetLastError()))) {
printf(<span style="color:#A31515;">"WSASend failed with error: %d\n"</span>, err);
<span style="color:Blue;">break</span>;
}
rc = WSAWaitForMultipleEvents(1, &amp;SendOverlapped.hEvent, TRUE, INFINITE,
TRUE);
<span style="color:Blue;">if</span> (rc == WSA_WAIT_FAILED) {
printf(<span style="color:#A31515;">"WSAWaitForMultipleEvents failed with error: %d\n"</span>,
WSAGetLastError());
<span style="color:Blue;">break</span>;
}
rc = WSAGetOverlappedResult(AcceptSocket, &amp;SendOverlapped, &amp;SendBytes,
FALSE, &amp;Flags);
<span style="color:Blue;">if</span> (rc == FALSE) {
printf(<span style="color:#A31515;">"WSASend failed with error: %d\n"</span>, WSAGetLastError());
<span style="color:Blue;">break</span>;
}
printf(<span style="color:#A31515;">"Wrote %d bytes\n"</span>, SendBytes);
WSAResetEvent(SendOverlapped.hEvent);
}
WSACloseEvent(SendOverlapped.hEvent);
closesocket(AcceptSocket);
closesocket(ListenSocket);
freeaddrinfo(result);
WSACleanup();
<span style="color:Blue;">return</span> 0;
}
</pre></div>
</div>
</div>
</div>
<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>
<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>
<h2>Requirements</h2>
<table>
<tbody><tr><th>
<p>Minimum supported client</p>
</th><td>Windows&nbsp;8.1, Windows&nbsp;Vista [desktop apps only]</td></tr>
<tr><th>
<p>Minimum supported server</p>
</th><td>Windows Server&nbsp;2003 [desktop apps only]</td></tr>
<tr><th>
<p>Minimum supported phone</p>
</th><td>Windows Phone 8</td></tr>
<tr><th>
<p>Header</p>
</th><td>
<dl>
<dt>Winsock2.h</dt>
</dl>
</td></tr>
<tr><th>
<p>Library</p>
</th><td>
<dl>
<dt>Ws2_32.lib</dt>
</dl>
</td></tr>
<tr><th>
<p>DLL</p>
</th><td>
<dl>
<dt>Ws2_32.dll</dt>
</dl>
</td></tr>
</tbody></table>
<h2><a id="see_also"></a>See also</h2>
<dl>
<dt>
<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>
</dt>
<dt>
<a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740149(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">send</strong></a>
</dt>
<dt>
<a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms740506(v=vs.85).aspx"><strong xmlns="http://www.w3.org/1999/xhtml">socket</strong></a>
</dt>
<dt>
<a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741416(v=vs.85).aspx">Winsock Reference</a>
</dt>
<dt>
<a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms741394(v=vs.85).aspx">Winsock Functions</a>
</dt>
<dt>
<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>
</dt>
<dt>
<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>
</dt>
<dt>
<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>
</dt>
<dt>
<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>
</dt>
<dt>
<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>
</dt>
<dt>
<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>
</dt>
<dt>
<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>
</dt>
<dt>
<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>
</dt>
</dl>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
</div>
<script id="CommentTemplate" type="text/x-jquery-tmpl">
<div class="communityContentAnnotation">
<a name="${Index}"></a>
<h3>
${Title}
</h3>
<div class="communityContentAnnotationBody">
{{html Body}}
</div>
<div class="communityContentAnnotationInfo">
<div class="communityContentAnnotationAvatarContainer">
<a href="${UserAvatar.Href}" title="${UserAvatar.ToolTip}" class="communityContentAnnotationAvatar"><img src="${UserAvatar.ImageUrl}" alt="${UserAvatar.ImageAltText}" width="34" height="34" /></a>
</div>
<div class="communityContentAnnotationUserDateContainer">
<div class="communityContentAnnotationUserContainer">
<a href="${UserAvatar.Href}">
${User}
</a>
</div>
<div class="communityContentAnnotationDateContainer">
<span>${Date}</span>
{{if EditLink}}
<span>
<a href="${EditLink.Href}" title="${EditLink.ToolTip}" class="communityContentCommentEditLink">${EditLink.Title}</a>
</span>
{{/if}}
{{if DeleteLink}}
<span>
<a href="${DeleteLink.Href}" title="${DeleteLink.ToolTip}" class="communityContentDeleteLink">${DeleteLink.Title}</a>
</span>
{{/if}}
</div>
</div>
</div>
</div>
</script>
<div class="communityContentContainer">
<div id="CommunityContentHeader" class="communityContentHeader">
<div class="communityContentHeaderTitleContainer">
<h2>Community Additions</h2>
<a class="communityContentAddLink" href="https://msdn.microsoft.com/en-us/library/windows/desktop/community/add/ms742203(v=vs.85).aspx">
<span class="communityContentAddButton" title="Add">
ADD
</span>
</a>
</div>
<div style="clear: both;"></div>
</div>
<div id="CommunityComments" data-url="/en-us/library/windows/desktop/community/comments/ms742203(v=vs.85).aspx"><div class="communityContentAnnotation"> <a name="6"></a> <h3> overlapped and sent count </h3> <div class="communityContentAnnotationBody"> When overlapped is used and the socket is non-blocking, should the sent count be ignored?&nbsp; Will the event be triggered only when the output has completed and the buffer can be reused? </div> <div class="communityContentAnnotationInfo"> <div class="communityContentAnnotationAvatarContainer"> <a href="https://social.msdn.microsoft.com/profile/jag77/" title="" class="communityContentAnnotationAvatar"><img src="./WSASend 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/jag77/"> JAG77 </a> </div> <div class="communityContentAnnotationDateContainer"> <span>6/9/2014</span> </div> </div> </div> </div><div class="communityContentAnnotation"> <a name="5"></a> <h3> Some clarifications for event signaling and completion routine execution </h3> <div class="communityContentAnnotationBody"> <p>If WSASend operation completed immediately (that is, WSASend returned with 0):</p><br><p>(1) If lpOverlapped is provided (not NULL) and completion routine is NULL, the event object of lpOverlapped will be signaled as WSASend returns.</p><br><p>(2) If both lpOverlapped and lpCompletionRoutine are not NULL, the completion routine is queued into the APC queue of caller's thread, and will be executed when that thread is in an alertable state.</p> </div> <div class="communityContentAnnotationInfo"> <div class="communityContentAnnotationAvatarContainer"> <a href="https://social.msdn.microsoft.com/profile/douglas%20kazi/" title="" class="communityContentAnnotationAvatar"><img src="./WSASend 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/douglas%20kazi/"> Douglas KAZi </a> </div> <div class="communityContentAnnotationDateContainer"> <span>2/4/2014</span> </div> </div> </div> </div><div class="communityContentAnnotation"> <a name="4"></a> <h3> This documentation has a critical gap </h3> <div class="communityContentAnnotationBody"> <p>There is nothing in this page's documentation to resolve the ambiguity when an OVERLAPPED* is provided but the completion routine is set to NULL. Nor does it tell us what thread or context the completion routine is executed in.</p><br><p>This information is of critical importance when developing high-performance apps; we often have no need or desire for a separate completion routine that runs outside of our thread-throttling IOCP, nor do we want to subvert the purpose of the IOCP by using event handles.</p> </div> <div class="communityContentAnnotationInfo"> <div class="communityContentAnnotationAvatarContainer"> <a href="https://social.msdn.microsoft.com/profile/electricninja/" title="" class="communityContentAnnotationAvatar"><img src="./WSASend 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/electricninja/"> electricninja </a> </div> <div class="communityContentAnnotationDateContainer"> <span>3/5/2013</span> </div> </div> </div> </div><div class="communityContentAnnotation"> <a name="3"></a> <h3> Extra Edits in the Sample Code.. </h3> <div class="communityContentAnnotationBody"> <p>in vs2010..</p><br><p>#include &lt;winsock2.h&gt;//<strong>This Should Be At Top ,so inhibits inclusion of windows.h,</strong></p><br><p><br> <strong>//otherwise several redefnition will show up</strong><br> <br><br>#include &lt;windows.h&gt;</p><br><p>furthermore Add these lines to the code for successful compilation</p><br><p><br> <em>#pragma comment (lib, "Ws2_32.lib")<br><br>#pragma comment (lib, "Mswsock.lib")<br><br>#pragma comment (lib, "AdvApi32.lib")</em><br></p><br><p></p><br><p><br> <em>or just add WIN32_LEAN_AND_MEAN before including winsock2.h and windows.h<br></em><br></p> </div> <div class="communityContentAnnotationInfo"> <div class="communityContentAnnotationAvatarContainer"> <a href="https://social.msdn.microsoft.com/profile/incubbus/" title="" class="communityContentAnnotationAvatar"><img src="./WSASend 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/incubbus/"> Incubbus </a> </div> <div class="communityContentAnnotationDateContainer"> <span>7/18/2011</span> </div> </div> </div> </div><div class="communityContentAnnotation"> <a name="2"></a> <h3> Overlapped Socket I/O and immediate completion </h3> <div class="communityContentAnnotationBody"> It is not clear if lpOverlapped is not NULL containing a valid event object in hEvent member and lpCompletion routine is null, in this case if operation completes immediately, will event object be signaled or not ? My experiments prove hEvent object is always signaled in this case. </div> <div class="communityContentAnnotationInfo"> <div class="communityContentAnnotationAvatarContainer"> <a href="https://social.msdn.microsoft.com/profile/sergeyn/" title="" class="communityContentAnnotationAvatar"><img src="./WSASend function (Windows)_files/avatar(4).jpg" alt="" width="34" height="34"></a> </div> <div class="communityContentAnnotationUserDateContainer"> <div class="communityContentAnnotationUserContainer"> <a href="https://social.msdn.microsoft.com/profile/sergeyn/"> SergeyN </a> </div> <div class="communityContentAnnotationDateContainer"> <span>6/15/2008</span> </div> </div> </div> </div><div class="communityContentAnnotation"> <a name="1"></a> <h3> WSAENOBUFS doc </h3> <div class="communityContentAnnotationBody"> <p>Why does WSAENOBUFS mention provider buffer *deadlock* - Isn't this result of not enough memory related to socket send/recv buffer? <br></p><br><p>[Noelle Mallory - MSFT] Please post questions to the MSDN Forums at <a>http://forums.microsoft.com/msdn</a>. You will likely get a quicker response through the forum than through the Community Content.</p> </div> <div class="communityContentAnnotationInfo"> <div class="communityContentAnnotationAvatarContainer"> <a href="https://social.msdn.microsoft.com/profile/noelle%20mallory/" title="" class="communityContentAnnotationAvatar"><img src="./WSASend function (Windows)_files/avatar(5).jpg" alt="" width="34" height="34"></a> </div> <div class="communityContentAnnotationUserDateContainer"> <div class="communityContentAnnotationUserContainer"> <a href="https://social.msdn.microsoft.com/profile/noelle%20mallory/"> Noelle Mallory </a> </div> <div class="communityContentAnnotationDateContainer"> <span>1/2/2008</span> </div> </div> </div> </div></div>
</div>
<div class="libraryMemberFilter">
<div class="filterContainer">
<span>Show:</span>
<label>
<input type="checkbox" class="libraryFilterInherited" checked="checked" value="Inherit">Inherited
</label>
<label>
<input type="checkbox" class="libraryFilterProtected" checked="checked" value="Protected">Protected
</label>
</div>
</div>
<input type="hidden" id="libraryMemberFilterEmptyWarning" value="There are no members available with your current filter settings.">
</div>
</div>
<div class="clear"></div>
<input name="__RequestVerificationToken" type="hidden" value="WDlWajeyttitbLalt8lDW2uOy7dU_FPwHWrj3DGs1Hh8OUhKHv3b9_hn1R5bxTefR3JT7j51t68a43UEOqqIi-ok5wM1">
<input id="ratingSubmitUrl" type="hidden" value="https://msdn.microsoft.com/en-us/library/feedback/add/ms742203(v=vs.85).aspx">
<input id="isTopicRated" type="hidden" value="false">
<div id="ux-footer" class="ltr">
<div id="footerSock">
<div id="footerSockInner">
<a name="feedback"></a>
<div data-fragmentname="Survey" id="Fragment_Survey" xmlns="http://www.w3.org/1999/xhtml"></div>
<div class="rating" style="display: block;">
<div id="ratingSection1">
<div class="title">
Was this page helpful?
</div>
<div class="description">
Your feedback about this content is important.<br>Let us know what you think.
</div>
<div class="buttons">
<button class="button" id="ratingYes">Yes</button>
<button class="button" id="ratingNo">No</button>
</div>
<input id="ratingValue" type="hidden" value="">
</div>
<div id="ratingSection2">
<div class="title">
Additional feedback?
</div>
<textarea id="ratingText" rows="6" cols="" maxlength="1500"></textarea>
<div class="counter right">
<span id="feedbackTextCounter">1500</span> characters remaining
</div>
<div class="buttons left">
<button class="button" id="ratingSubmit">Submit</button>
<button class="button" id="ratingSkipThis">Skip this</button>
</div>
</div>
<div id="ratingSection3">
<div class="title">
Thank you!
</div>
<div class="description">
We appreciate your feedback.
</div>
</div>
<div id="contentFeedbackQAContainer" style="display: none;"></div>
</div>
<div data-fragmentname="SockLinks" id="Fragment_SockLinks" xmlns="http://www.w3.org/1999/xhtml">
<div class="linkList">
<ul class="links">
<li>
<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>
</li>
<li>
<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>
</li>
<li>
<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>
</li>
</ul>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<div id="footerContainer">
<div id="fourColumnFooter">
<div data-fragmentname="Column1" id="Fragment_Column1" xmlns="http://www.w3.org/1999/xhtml">
<div class="ListOfLinkLists">
<div class="listItems">
<div class="linkList" xmlns="http://www.w3.org/1999/xhtml">
<div class="linkListTitle">Centers</div>
<ul class="links">
<li>
<a href="http://dev.windows.com/" id="Column1_726_13" xmlns="http://www.w3.org/1999/xhtml">Windows Dev Center</a>
</li>
<li>
<a href="http://msdn.microsoft.com/windows/desktop" id="Column1_726_16" xmlns="http://www.w3.org/1999/xhtml">Desktop</a>
</li>
<li>
<a href="http://msdn.microsoft.com/windows/hardware" id="Column1_726_17" xmlns="http://www.w3.org/1999/xhtml">Hardware</a>
</li>
<li>
<a href="http://msdn.microsoft.com/ie" id="Column1_726_15" xmlns="http://www.w3.org/1999/xhtml">Internet Explorer</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div data-fragmentname="Column2" id="Fragment_Column2" xmlns="http://www.w3.org/1999/xhtml">
<div class="ListOfLinkLists">
<div class="listItems">
<div class="linkList" xmlns="http://www.w3.org/1999/xhtml">
<div class="linkListTitle">Related developer sites</div>
<ul class="links">
<li>
<a href="http://go.microsoft.com/fwlink/p/?linkid=285622" id="Column2_726_18" xmlns="http://www.w3.org/1999/xhtml">Microsoft Connect</a>
</li>
<li>
<a href="http://go.microsoft.com/fwlink/p/?linkid=285623" id="Column2_726_19" xmlns="http://www.w3.org/1999/xhtml">.NET Framework</a>
</li>
<li>
<a href="http://go.microsoft.com/fwlink/p/?linkid=282089" id="Column2_726_20" xmlns="http://www.w3.org/1999/xhtml">Visual Studio</a>
</li>
<li>
<a href="http://go.microsoft.com/fwlink/p/?linkid=282087" id="Column2_726_22" xmlns="http://www.w3.org/1999/xhtml">Windows Server</a>
</li>
</ul>
</div>
<div class="linkList" xmlns="http://www.w3.org/1999/xhtml">
<div class="linkListTitle">Other Windows sites</div>
<ul class="links">
<li>
<a href="http://go.microsoft.com/fwlink/p/?linkid=280294" id="Column2_726_23" xmlns="http://www.w3.org/1999/xhtml">Enterprise</a>
</li>
<li>
<a href="http://go.microsoft.com/fwlink/p/?linkid=280295" id="Column2_726_24" xmlns="http://www.w3.org/1999/xhtml">Small business</a>
</li>
<li>
<a href="http://go.microsoft.com/fwlink/p/?linkid=280296" id="Column2_726_25" xmlns="http://www.w3.org/1999/xhtml">Students</a>
</li>
<li>
<a href="http://go.microsoft.com/fwlink/p/?linkid=280297" id="Column2_726_26" xmlns="http://www.w3.org/1999/xhtml">Home users</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div data-fragmentname="Column3" id="Fragment_Column3" xmlns="http://www.w3.org/1999/xhtml">
<div class="ListOfLinkLists">
<div class="listItems">
<div class="linkList" xmlns="http://www.w3.org/1999/xhtml">
<div class="linkListTitle">Downloads</div>
<ul class="links">
<li>
<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>
</li>
<li>
<a href="http://go.microsoft.com/fwlink/p/?linkid=328183" id="Column3_726_28" xmlns="http://www.w3.org/1999/xhtml">Windows SDK</a>
</li>
<li>
<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>
</li>
<li>
<a href="http://go.microsoft.com/fwlink/p/?linkid=285626" id="Column3_726_30" xmlns="http://www.w3.org/1999/xhtml">More downloads</a>
</li>
</ul>
</div>
<div class="linkList" xmlns="http://www.w3.org/1999/xhtml">
<div class="linkListTitle">Support</div>
<ul class="links">
<li>
<a href="http://go.microsoft.com/fwlink/p/?linkid=285632" id="Column3_726_43" xmlns="http://www.w3.org/1999/xhtml">Forums</a>
</li>
<li>
<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>
</li>
</ul>
</div>
</div>
</div>
</div>
<div data-fragmentname="Column4" id="Fragment_Column4" xmlns="http://www.w3.org/1999/xhtml">
<div class="ListOfLinkLists">
<div class="listItems">
<div class="linkList" xmlns="http://www.w3.org/1999/xhtml">
<div class="linkListTitle">Essentials</div>
<ul class="links">
<li>
<a href="http://go.microsoft.com/fwlink/p/?linkid=285627" id="Column4_726_35" xmlns="http://www.w3.org/1999/xhtml">Windows APIs</a>
</li>
<li>
<a href="http://go.microsoft.com/fwlink/p/?linkid=285628" id="Column4_726_36" xmlns="http://www.w3.org/1999/xhtml">Samples</a>
</li>
<li>
<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>
</li>
<li>
<a href="http://go.microsoft.com/fwlink/p/?linkid=285630" id="Column4_726_45" xmlns="http://www.w3.org/1999/xhtml">Desktop dashboard</a>
</li>
</ul>
</div>
<div class="linkList" xmlns="http://www.w3.org/1999/xhtml">
<div class="linkListTitle">Stay connected</div>
<ul class="links">
<li>
<a href="http://go.microsoft.com/fwlink/p/?linkid=285954" id="Column4_726_41" xmlns="http://www.w3.org/1999/xhtml">Microsoft events</a>
</li>
<li>
<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>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div id="baseFooterLogos">
<span class="microsoftlogo" title="Microsoft"></span>
<a href="https://msdn.microsoft.com/en-us" class="msdnlogo" title="MSDN"></a>
</div>
<div id="baseFooter">
<div id="FooterCopyright">© 2015 Microsoft</div>
<div data-fragmentname="BaseFooter" id="Fragment_BaseFooter" xmlns="http://www.w3.org/1999/xhtml">
<div class="linkList">
<ul class="links horizontal">
<li>
<a href="http://go.microsoft.com/fwlink/?LinkId=248681" id="BaseFooter_35351_3" xmlns="http://www.w3.org/1999/xhtml">Privacy and Cookies</a>
</li>
<li>
<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>
</li>
<li>
<a href="http://go.microsoft.com/fwlink/p/?linkid=248154" id="BaseFooter_35351_2" xmlns="http://www.w3.org/1999/xhtml">Trademarks</a>
</li>
<li>
<a href="http://go.microsoft.com/fwlink/p/?LinkId=400453" id="BaseFooter_730_5" xmlns="http://www.w3.org/1999/xhtml">Site map</a>
</li>
</ul>
</div>
</div>
<div data-fragmentname="HelloText" id="Fragment_HelloText" xmlns="http://www.w3.org/1999/xhtml">Hello from Seattle.
</div>
<span id="selectLocaleFromPopUp">
<div class="locale-selector" style="position: relative;">
<a class="current-locale" href="javascript:void(0)">
<span class="text">English</span>
<span class="gear"></span>
</a>
<div class="locale-selection-panel site-flag site-flag-lang" style="top: -245px; display: none;">
<div class="content">
<table class="all-locales" cellspacing="0" autogeneratecolumns="false" allowpaging="false" allowsorting="false" style="border-collapse: collapse;">
<tbody>
<tr>
<td><a title="Deutsch" href="http://msdn.microsoft.com/?action=SelectLocale&currentLocale=en-us&newLocale=de-de&fromPage=/en-us/library/windows/desktop/ms742203(v=vs.85).aspx/" class="locale-link">Deutsch</a></td>
<td><a title="English" href="http://msdn.microsoft.com/?action=SelectLocale&currentLocale=en-us&newLocale=en-us&fromPage=/en-us/library/windows/desktop/ms742203(v=vs.85).aspx/" class="locale-link selected">English</a></td>
<td><a title="Español" href="http://msdn.microsoft.com/?action=SelectLocale&currentLocale=en-us&newLocale=es-es&fromPage=/en-us/library/windows/desktop/ms742203(v=vs.85).aspx/" class="locale-link">Español</a></td>
<td><a title="Français" href="http://msdn.microsoft.com/?action=SelectLocale&currentLocale=en-us&newLocale=fr-fr&fromPage=/en-us/library/windows/desktop/ms742203(v=vs.85).aspx/" class="locale-link">Français</a></td>
</tr><tr>
<td><a title="Italiano" href="http://msdn.microsoft.com/?action=SelectLocale&currentLocale=en-us&newLocale=it-it&fromPage=/en-us/library/windows/desktop/ms742203(v=vs.85).aspx/" class="locale-link">Italiano</a></td>
<td><a title="日本語" href="http://msdn.microsoft.com/?action=SelectLocale&currentLocale=en-us&newLocale=ja-jp&fromPage=/en-us/library/windows/desktop/ms742203(v=vs.85).aspx/" class="locale-link">日本語</a></td>
<td><a title="한국어" href="http://msdn.microsoft.com/?action=SelectLocale&currentLocale=en-us&newLocale=ko-kr&fromPage=/en-us/library/windows/desktop/ms742203(v=vs.85).aspx/" class="locale-link">한국어</a></td>
<td><a title="Português" href="http://msdn.microsoft.com/?action=SelectLocale&currentLocale=en-us&newLocale=pt-br&fromPage=/en-us/library/windows/desktop/ms742203(v=vs.85).aspx/" class="locale-link">Português</a></td>
</tr><tr class="last">
<td><a title="Pусский" href="http://msdn.microsoft.com/?action=SelectLocale&currentLocale=en-us&newLocale=ru-ru&fromPage=/en-us/library/windows/desktop/ms742203(v=vs.85).aspx/" class="locale-link">Pусский</a></td>
<td><a title="简体中文" href="http://msdn.microsoft.com/?action=SelectLocale&currentLocale=en-us&newLocale=zh-cn&fromPage=/en-us/library/windows/desktop/ms742203(v=vs.85).aspx/" class="locale-link">简体中文</a></td>
<td><a title="繁體中文" href="http://msdn.microsoft.com/?action=SelectLocale&currentLocale=en-us&newLocale=zh-tw&fromPage=/en-us/library/windows/desktop/ms742203(v=vs.85).aspx/" class="locale-link">繁體中文</a></td>
</tr>
</tbody>
</table>
<div class="arrow">
&nbsp;</div>
</div>
</div>
</div>
</span>
<link type="text/css" rel="stylesheet">
<div class="clear"></div>
</div>
</div>
</div>
<div class="footerPrintView">
<div class="footerCopyrightPrintView">© 2015 Microsoft</div>
</div>
<input id="MtpsDevice" type="hidden" value="Default">
<!--[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. ]]-->
<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>
<noscript>
&lt;a href="http://www.omniture.com" title="Web Analytics"&gt;
&lt;img src="//msstonojsmsdn.112.2o7.net/b/ss/msstonojsmsdn/1/H.20.2--NS/0" height="1" width="1" border="0" alt="" /&gt;
&lt;/a&gt;
</noscript>
<div id="globalRequestVerification">
<input name="__RequestVerificationToken" type="hidden" value="LbYNz4SbCFjyl2zVOFrPlDfkyCb_6KB4L3dmXzrcyJqz3r4H0fECJT9loOeubxYQ2DuE75R_1BwuiiCHBap713Q9HjU1">
</div>
</div>
<script type="text/javascript" class="mtps-injected">
/*<![CDATA[*/
(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);
MTPS.injectScripts([
{ 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\"xap\": \"https://msdn.microsoft.com\"\r\n});\r\n/**/" },
{ url: "https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.2.min.js" },
{ txt: "//\n var literalNormalizedUrl = \u0027/en-us/library/windows/desktop/ms742203(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/**/" },
{ txt: "/**/\n var omni_guid = \"e47254b8-14a6-4466-a3e4-f0fc05a331df\";\n/**/" },
{ txt: "//\n\n window.appInsightsId = \u002760854590-027a-4ae4-98be-2741a40f355f\u0027;\n //" },
{ 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" },
{ 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" },
{ 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" },
{ url: "https://ajax.aspnetcdn.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js" },
{ 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" },
{ 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 });" }
]);
/*]]>*/
</script>
<script src="./WSASend function (Windows)_files/broker-config.js"></script></body></html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化