<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=270227&amp;view=findpost&amp;p=2245002</guid>
        <pubDate>Thu, 16 Apr 2009 14:31:44 +0000</pubDate>
        <title>WSASetService</title>
        <link>https://forum.sources.ru/index.php?showtopic=270227&amp;view=findpost&amp;p=2245002</link>
        <description><![CDATA[Oleg2004: <strong class='tag-b'>zss</strong><br>
Давайте свое мыло, я вам пришлю очень интересный материал по этому<br>
поводу в pdf- может найдете что важное для вас]]></description>
        <author>Oleg2004</author>
        <category>C/C++: Сетевое программирование</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=270227&amp;view=findpost&amp;p=2244760</guid>
        <pubDate>Thu, 16 Apr 2009 10:52:32 +0000</pubDate>
        <title>WSASetService</title>
        <link>https://forum.sources.ru/index.php?showtopic=270227&amp;view=findpost&amp;p=2244760</link>
        <description><![CDATA[zss: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=270227&view=findpost&p=2244743'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>popsa &#064; <time class="tag-quote__quoted-time" datetime="2009-04-16T10:42:14+00:00">16.04.09, 10:42</time></span><div class='quote '>не то ?</div></div><br>
у меня так вроде<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">WSAQUERYSET service &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = { sizeof(service) };</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script> <br>
<br>
<span class="tag-color tag-color-named" data-value="gray" style="color: gray"><span class='tag-size' data-value='7' style='font-size:7pt;'>Добавлено <time class="tag-mergetime" datetime="2009-04-16T10:53:44+00:00">16.04.09, 10:53</time></span></span><br>
хотя проверил и так<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">service.dwSize &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= sizeof(WSAQUERYSET);</div></ol></div></div></div></div><br>
<br>
тоже самое.]]></description>
        <author>zss</author>
        <category>C/C++: Сетевое программирование</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=270227&amp;view=findpost&amp;p=2244743</guid>
        <pubDate>Thu, 16 Apr 2009 10:42:14 +0000</pubDate>
        <title>WSASetService</title>
        <link>https://forum.sources.ru/index.php?showtopic=270227&amp;view=findpost&amp;p=2244743</link>
        <description><![CDATA[popsa: не то ?<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">dwSize </div><div class="code_line">Must be set to sizeof(WSAQuerySet). This is a versioning mechanism.</div></ol></div></div></div></div>]]></description>
        <author>popsa</author>
        <category>C/C++: Сетевое программирование</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=270227&amp;view=findpost&amp;p=2244725</guid>
        <pubDate>Thu, 16 Apr 2009 10:31:46 +0000</pubDate>
        <title>WSASetService</title>
        <link>https://forum.sources.ru/index.php?showtopic=270227&amp;view=findpost&amp;p=2244725</link>
        <description><![CDATA[zss: работаю с bluetooth<br>
на одной из машин все работает.<br>
Но если поставить на другую машину, то не отрабатывает WSASetService.<br>
Причем использую тот же модуль (соответственно тот же стек)<br>
<br>
кож ошибки 10022 (&quot;Получен недопустимый аргумент&quot;). Что за аргумент - не понятно. Да и смущает, что на другой машине работатет<br>
<br>
код такой<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; &nbsp;SOCKADDR_BTH sa = {0};</div><div class="code_line">&nbsp;&nbsp; &nbsp;int size = sizeof(sa);</div><div class="code_line">&nbsp;&nbsp; &nbsp;if (getsockname (socket, (SOCKADDR *)&amp;sa, &amp;size) != 0)</div><div class="code_line">&nbsp;&nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;DebugMessage (&quot;...&quot;);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;return false;</div><div class="code_line">&nbsp;&nbsp; &nbsp;}</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;CSADDR_INFO csinfo &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= {0};</div><div class="code_line">&nbsp;&nbsp; &nbsp;csinfo.LocalAddr.lpSockaddr &nbsp; &nbsp; &nbsp; &nbsp; = (LPSOCKADDR)&sa;</div><div class="code_line">&nbsp;&nbsp; &nbsp;csinfo.RemoteAddr.lpSockaddr &nbsp; &nbsp; &nbsp; &nbsp;= (LPSOCKADDR)&sa;</div><div class="code_line">&nbsp;&nbsp; &nbsp;csinfo.LocalAddr.iSockaddrLength &nbsp; &nbsp;= sizeof (sa);</div><div class="code_line">&nbsp;&nbsp; &nbsp;csinfo.RemoteAddr.iSockaddrLength &nbsp; = sizeof (sa);</div><div class="code_line">&nbsp;&nbsp; &nbsp;csinfo.iSocketType &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= SOCK_STREAM;</div><div class="code_line">&nbsp;&nbsp; &nbsp;csinfo.iProtocol &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= BTHPROTO_RFCOMM;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;WSAQUERYSET service &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = { sizeof(service) };</div><div class="code_line">&nbsp;&nbsp; &nbsp;GUID serviceID &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= SerialPortServiceClass_UUID;</div><div class="code_line">&nbsp;&nbsp; &nbsp;service.lpszServiceInstanceName = &quot;Bluetooth Service&quot;;</div><div class="code_line">&nbsp;&nbsp; &nbsp;service.lpszComment &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = &quot;Bluetooth Comment&quot;;</div><div class="code_line">&nbsp;&nbsp; &nbsp;service.lpServiceClassId &nbsp; &nbsp; &nbsp; &nbsp;= &serviceID;</div><div class="code_line">&nbsp;&nbsp; &nbsp;service.dwNameSpace &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = NS_BTH;</div><div class="code_line">&nbsp;&nbsp; &nbsp;service.lpcsaBuffer &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = &csinfo;</div><div class="code_line">&nbsp;&nbsp; &nbsp;service.dwNumberOfCsAddrs &nbsp; &nbsp; &nbsp; = 1;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;if (WSASetService(&amp;service, RNRSERVICE_REGISTER, 0) == SOCKET_ERROR)</div><div class="code_line">&nbsp;&nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;DebugMessage (&quot;...&quot;);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;return false;</div><div class="code_line">&nbsp;&nbsp; &nbsp;}</div></ol></div></div></div></div>]]></description>
        <author>zss</author>
        <category>C/C++: Сетевое программирование</category>
      </item>
	
      </channel>
      </rss>
	