<?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=159859&amp;view=findpost&amp;p=3835146</guid>
        <pubDate>Fri, 24 Jul 2020 21:21:42 +0000</pubDate>
        <title>Программно сменить IP</title>
        <link>https://forum.sources.ru/index.php?showtopic=159859&amp;view=findpost&amp;p=3835146</link>
        <description><![CDATA[Rouse_: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=159859&view=findpost&p=3834994'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>Маршал &#064; <time class="tag-quote__quoted-time" datetime="2020-07-23T14:39:20+03:00">23.07.20, 11:39</time></span><div class='quote '>код ошибки указывает на то, что программисты уже не те. вот что поменялось.</div></div><br>
Красиво :)))]]></description>
        <author>Rouse_</author>
        <category>Delphi: Система, Windows API</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=159859&amp;view=findpost&amp;p=3834994</guid>
        <pubDate>Thu, 23 Jul 2020 11:39:20 +0000</pubDate>
        <title>Программно сменить IP</title>
        <link>https://forum.sources.ru/index.php?showtopic=159859&amp;view=findpost&amp;p=3834994</link>
        <description><![CDATA[Маршал: <div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>что то поменялось с тех времен. не работает функция. получаю ошибку 87</div></div>код ошибки указывает на то, что программисты уже не те. вот что поменялось.]]></description>
        <author>Маршал</author>
        <category>Delphi: Система, Windows API</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=159859&amp;view=findpost&amp;p=3796814</guid>
        <pubDate>Tue, 23 Apr 2019 04:39:10 +0000</pubDate>
        <title>Программно сменить IP</title>
        <link>https://forum.sources.ru/index.php?showtopic=159859&amp;view=findpost&amp;p=3796814</link>
        <description><![CDATA[Emmys: что то поменялось с тех времен. не работает функция. получаю ошибку 87]]></description>
        <author>Emmys</author>
        <category>Delphi: Система, Windows API</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=159859&amp;view=findpost&amp;p=1329930</guid>
        <pubDate>Sun, 05 Nov 2006 09:16:13 +0000</pubDate>
        <title>Программно сменить IP</title>
        <link>https://forum.sources.ru/index.php?showtopic=159859&amp;view=findpost&amp;p=1329930</link>
        <description><![CDATA[asd_nsd: <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">const</div><div class="code_line">&nbsp;MAX_ADAPTER_NAME_LENGTH &nbsp; &nbsp; &nbsp; &nbsp;= 256;</div><div class="code_line">&nbsp;MAX_ADAPTER_DESCRIPTION_LENGTH = 128;</div><div class="code_line">&nbsp;MAX_ADAPTER_ADDRESS_LENGTH &nbsp; &nbsp; = 8;</div><div class="code_line">&nbsp;IPHelper = &#39;iphlpapi.dll&#39;;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;MIB_IF_TYPE_OTHER &nbsp; &nbsp; = 1;</div><div class="code_line">&nbsp;MIB_IF_TYPE_ETHERNET &nbsp;= 6;</div><div class="code_line">&nbsp;MIB_IF_TYPE_TOKENRING = 9;</div><div class="code_line">&nbsp;MIB_IF_TYPE_FDDI &nbsp; &nbsp; &nbsp;= 15;</div><div class="code_line">&nbsp;MIB_IF_TYPE_PPP &nbsp; &nbsp; &nbsp; = 23;</div><div class="code_line">&nbsp;MIB_IF_TYPE_LOOPBACK &nbsp;= 24;</div><div class="code_line">&nbsp;MIB_IF_TYPE_SLIP &nbsp; &nbsp; &nbsp;= 28;</div><div class="code_line">&nbsp;</div><div class="code_line">type</div><div class="code_line">&nbsp;time_t = Longint;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;IP_ADDRESS_STRING = record</div><div class="code_line">&nbsp;&nbsp; S: array [0..15] of Char;</div><div class="code_line">&nbsp;end;</div><div class="code_line">&nbsp;IP_MASK_STRING = IP_ADDRESS_STRING;</div><div class="code_line">&nbsp;PIP_MASK_STRING = ^IP_MASK_STRING;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;PIP_ADDR_STRING = ^IP_ADDR_STRING;</div><div class="code_line">&nbsp;IP_ADDR_STRING = record</div><div class="code_line">&nbsp;&nbsp; Next: PIP_ADDR_STRING;</div><div class="code_line">&nbsp;&nbsp; IpAddress: IP_ADDRESS_STRING;</div><div class="code_line">&nbsp;&nbsp; IpMask: IP_MASK_STRING;</div><div class="code_line">&nbsp;&nbsp; Context: DWORD;</div><div class="code_line">&nbsp;end;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;PIP_ADAPTER_INFO = ^IP_ADAPTER_INFO;</div><div class="code_line">&nbsp;IP_ADAPTER_INFO = record</div><div class="code_line">&nbsp;&nbsp; Next: PIP_ADAPTER_INFO;</div><div class="code_line">&nbsp;&nbsp; ComboIndex: DWORD;</div><div class="code_line">&nbsp;&nbsp; AdapterName: array [0..MAX_ADAPTER_NAME_LENGTH + 3] of Char;</div><div class="code_line">&nbsp;&nbsp; Description: array [0..MAX_ADAPTER_DESCRIPTION_LENGTH + 3] of Char;</div><div class="code_line">&nbsp;&nbsp; AddressLength: UINT;</div><div class="code_line">&nbsp;&nbsp; Address: array [0..MAX_ADAPTER_ADDRESS_LENGTH - 1] of BYTE;</div><div class="code_line">&nbsp;&nbsp; Index: DWORD;</div><div class="code_line">&nbsp;&nbsp; Type_: UINT;</div><div class="code_line">&nbsp;&nbsp; DhcpEnabled: UINT;</div><div class="code_line">&nbsp;&nbsp; CurrentIpAddress: PIP_ADDR_STRING;</div><div class="code_line">&nbsp;&nbsp; IpAddressList: IP_ADDR_STRING;</div><div class="code_line">&nbsp;&nbsp; GatewayList: IP_ADDR_STRING;</div><div class="code_line">&nbsp;&nbsp; DhcpServer: IP_ADDR_STRING;</div><div class="code_line">&nbsp;&nbsp; HaveWins: BOOL;</div><div class="code_line">&nbsp;&nbsp; PrimaryWinsServer: IP_ADDR_STRING;</div><div class="code_line">&nbsp;&nbsp; SecondaryWinsServer: IP_ADDR_STRING;</div><div class="code_line">&nbsp;&nbsp; LeaseObtained: time_t;</div><div class="code_line">&nbsp;&nbsp; LeaseExpires: time_t;</div><div class="code_line">&nbsp;end;</div><div class="code_line">&nbsp;</div><div class="code_line">type</div><div class="code_line">&nbsp;TForm1 = class(TForm)</div><div class="code_line">&nbsp;&nbsp; Memo1: TMemo;</div><div class="code_line">&nbsp;&nbsp; procedure FormCreate(Sender: TObject);</div><div class="code_line">&nbsp;&nbsp; function GetAdapterGUID: String;</div><div class="code_line">&nbsp;private</div><div class="code_line">&nbsp;&nbsp; { Private declarations }</div><div class="code_line">&nbsp;public</div><div class="code_line">&nbsp;&nbsp; { Public declarations }</div><div class="code_line">&nbsp;end;</div><div class="code_line">&nbsp;</div><div class="code_line">var</div><div class="code_line">&nbsp;Form1: TForm1;</div><div class="code_line">&nbsp;</div><div class="code_line">implementation</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;function SetAdapterIpAddress(szAdapterGUID: PChar; dwDHCP, dwIP, dwMask, dwGateway: DWORD): DWORD; stdcall; external &#39;iphlpapi.dll&#39;;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;function GetAdaptersInfo(pAdapterInfo: PIP_ADAPTER_INFO;</div><div class="code_line">&nbsp;&nbsp; var pOutBufLen: ULONG): DWORD; stdcall; external IPHelper;</div><div class="code_line">{$R *.dfm}</div><div class="code_line">&nbsp;</div><div class="code_line">procedure TForm1.FormCreate(Sender: TObject);</div><div class="code_line">var</div><div class="code_line">&nbsp;InterfaceInfo,</div><div class="code_line">&nbsp;TmpPointer: PIP_ADAPTER_INFO;</div><div class="code_line">&nbsp;Len: Cardinal;</div><div class="code_line">&nbsp;strl: TStringList;</div><div class="code_line">begin</div><div class="code_line">&nbsp;try</div><div class="code_line">&nbsp;&nbsp; strl := TStringList.Create;</div><div class="code_line">&nbsp;&nbsp; strl.Text := GetAdapterGUID;</div><div class="code_line">&nbsp;&nbsp; if strl.Count &#62; 0 then</div><div class="code_line">&nbsp;&nbsp; &nbsp; SetAdapterIpAddress(PChar(strl.Strings[0]),0,0,inet_addr(&#39;255.255.255.0&#39;),inet_addr(&#39;198.162.0.147&#39;));</div><div class="code_line">&nbsp;finally</div><div class="code_line">&nbsp;&nbsp; strl.Free;</div><div class="code_line">&nbsp;end;</div><div class="code_line">end;</div><div class="code_line">&nbsp;</div><div class="code_line">function TForm1.GetAdapterGUID: String;</div><div class="code_line">var</div><div class="code_line">&nbsp;InterfaceInfo,</div><div class="code_line">&nbsp;TmpPointer: PIP_ADAPTER_INFO;</div><div class="code_line">&nbsp;IP: PIP_ADDR_STRING;</div><div class="code_line">&nbsp;Len: ULONG;</div><div class="code_line">&nbsp;AdapterType: String;</div><div class="code_line">begin</div><div class="code_line">&nbsp;if GetAdaptersInfo(nil, Len) = ERROR_BUFFER_OVERFLOW then</div><div class="code_line">&nbsp;begin</div><div class="code_line">&nbsp;&nbsp; GetMem(InterfaceInfo, Len);</div><div class="code_line">&nbsp;&nbsp; try</div><div class="code_line">&nbsp;&nbsp; &nbsp; if GetAdaptersInfo(InterfaceInfo, Len) = ERROR_SUCCESS then</div><div class="code_line">&nbsp;&nbsp; &nbsp; begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; TmpPointer := InterfaceInfo;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; repeat</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; if Result &#60;&#62; &#39;&#39; then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Result := Result+#13#10;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; Result := Result+TmpPointer^.AdapterName;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; TmpPointer := TmpPointer.Next;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; until TmpPointer = nil;</div><div class="code_line">&nbsp;&nbsp; &nbsp; end;</div><div class="code_line">&nbsp;&nbsp; finally</div><div class="code_line">&nbsp;&nbsp; &nbsp; FreeMem(InterfaceInfo);</div><div class="code_line">&nbsp;&nbsp; end;</div><div class="code_line">&nbsp;end;</div><div class="code_line">end;</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script>]]></description>
        <author>asd_nsd</author>
        <category>Delphi: Система, Windows API</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=159859&amp;view=findpost&amp;p=1329917</guid>
        <pubDate>Sun, 05 Nov 2006 08:55:24 +0000</pubDate>
        <title>Программно сменить IP</title>
        <link>https://forum.sources.ru/index.php?showtopic=159859&amp;view=findpost&amp;p=1329917</link>
        <description><![CDATA[Testudo: А в JediAPI есть к ней заголовки? Где-то она у меня валялась...]]></description>
        <author>Testudo</author>
        <category>Delphi: Система, Windows API</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=159859&amp;view=findpost&amp;p=1329892</guid>
        <pubDate>Sun, 05 Nov 2006 07:57:47 +0000</pubDate>
        <title>Программно сменить IP</title>
        <link>https://forum.sources.ru/index.php?showtopic=159859&amp;view=findpost&amp;p=1329892</link>
        <description><![CDATA[D[u]fa: тебе надо качнуть jwa заголовки а конкретно JwaIpHlpApi.pas, поищи в поисковике, или потом выложу если не найдешь]]></description>
        <author>D[u]fa</author>
        <category>Delphi: Система, Windows API</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=159859&amp;view=findpost&amp;p=1329646</guid>
        <pubDate>Sat, 04 Nov 2006 19:04:23 +0000</pubDate>
        <title>Программно сменить IP</title>
        <link>https://forum.sources.ru/index.php?showtopic=159859&amp;view=findpost&amp;p=1329646</link>
        <description><![CDATA[Testudo: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=159859&view=findpost&p=1329581'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>D&#091;u&#093;fa &#064; <time class="tag-quote__quoted-time" datetime="2006-11-04T17:15:46+00:00">04.11.06, 17:15</time></span><div class='quote '>ищи заголовки тогда %) или тоже лень?  :whistle:</div></div><br>
Просто программа этого не стоит. К тому же сейчас у меня нет времени на такие усилия по ней.<br>
Если кто кинет в меня заголовочными файлами от iphlpapi.dll (*.pas), буду очень благодарен. ;)]]></description>
        <author>Testudo</author>
        <category>Delphi: Система, Windows API</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=159859&amp;view=findpost&amp;p=1329581</guid>
        <pubDate>Sat, 04 Nov 2006 17:15:46 +0000</pubDate>
        <title>Программно сменить IP</title>
        <link>https://forum.sources.ru/index.php?showtopic=159859&amp;view=findpost&amp;p=1329581</link>
        <description><![CDATA[D[u]fa: ищи заголовки тогда %) или тоже лень?  :whistle:]]></description>
        <author>D[u]fa</author>
        <category>Delphi: Система, Windows API</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=159859&amp;view=findpost&amp;p=1329539</guid>
        <pubDate>Sat, 04 Nov 2006 16:09:33 +0000</pubDate>
        <title>Программно сменить IP</title>
        <link>https://forum.sources.ru/index.php?showtopic=159859&amp;view=findpost&amp;p=1329539</link>
        <description><![CDATA[Testudo: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=159859&view=findpost&p=1328156'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>Rouse_ &#064; <time class="tag-quote__quoted-time" datetime="2006-11-03T11:39:14+00:00">03.11.06, 11:39</time></span><div class='quote '>Вот тебе из &quot;iphlpapi.dll&quot;</div></div>Я когда только начал копать как раз в мсдн нашел эти функции. Но вот беда, в дельфи они не объявлены... А вручную подключать из библиотек - лень...]]></description>
        <author>Testudo</author>
        <category>Delphi: Система, Windows API</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=159859&amp;view=findpost&amp;p=1329098</guid>
        <pubDate>Sat, 04 Nov 2006 08:23:43 +0000</pubDate>
        <title>Программно сменить IP</title>
        <link>https://forum.sources.ru/index.php?showtopic=159859&amp;view=findpost&amp;p=1329098</link>
        <description><![CDATA[asd_nsd: <strong class='tag-b'>Rouse</strong> А этот способ подойдет если на сетевой карте закреплены несколько ip ?]]></description>
        <author>asd_nsd</author>
        <category>Delphi: Система, Windows API</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=159859&amp;view=findpost&amp;p=1328156</guid>
        <pubDate>Fri, 03 Nov 2006 11:39:14 +0000</pubDate>
        <title>Программно сменить IP</title>
        <link>https://forum.sources.ru/index.php?showtopic=159859&amp;view=findpost&amp;p=1328156</link>
        <description><![CDATA[Rouse_: ммм... Да вообще очень много чего разные библиотеки импортируют. Гадать чтоли будете?<br>
<br>
Вот тебе из &quot;iphlpapi.dll&quot;<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">typedef DWORD (WINAPI *_SetAdapterIpAddress )( char *szAdapterGUID, </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DWORD dwDHCP, </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DWORD dwIP, </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DWORD dwMask, </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DWORD dwGateway );</div></ol></div></div></div></div>]]></description>
        <author>Rouse_</author>
        <category>Delphi: Система, Windows API</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=159859&amp;view=findpost&amp;p=1327119</guid>
        <pubDate>Thu, 02 Nov 2006 17:07:05 +0000</pubDate>
        <title>Программно сменить IP</title>
        <link>https://forum.sources.ru/index.php?showtopic=159859&amp;view=findpost&amp;p=1327119</link>
        <description><![CDATA[jack128: ну этот NETSH импортирует не так много функций.. я бы посмотрел в сторону MprXXX - функций...]]></description>
        <author>jack128</author>
        <category>Delphi: Система, Windows API</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=159859&amp;view=findpost&amp;p=1326827</guid>
        <pubDate>Thu, 02 Nov 2006 13:13:30 +0000</pubDate>
        <title>Программно сменить IP</title>
        <link>https://forum.sources.ru/index.php?showtopic=159859&amp;view=findpost&amp;p=1326827</link>
        <description><![CDATA[Testudo: Нашел один метод, но он не совсем программный. Это все можно сделать с помощью netsh (консольной утилиты).<br>Но мне этот способ не нравиться. Должен же быть API&#33;..<br><br>Кстати, как можно задать настройку прокси для инета (по локалке)?]]></description>
        <author>Testudo</author>
        <category>Delphi: Система, Windows API</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=159859&amp;view=findpost&amp;p=1326667</guid>
        <pubDate>Thu, 02 Nov 2006 12:09:37 +0000</pubDate>
        <title>Программно сменить IP</title>
        <link>https://forum.sources.ru/index.php?showtopic=159859&amp;view=findpost&amp;p=1326667</link>
        <description><![CDATA[Testudo: Как можно программно поменять IP адрес и прочие его приблуды (Default gateway, prim DNS, sec DNS, etc.)?<br>Нашел нужные настрокй в реестре, но при их смене не происходит перенастройки адаптера. Нужно перезагружатья... :wall: <br>Но ведь вся прелесть XP и 2k в том, что эти настройки можно применить без перезагрузки&#33; Так как это сделать? :ph34r:]]></description>
        <author>Testudo</author>
        <category>Delphi: Система, Windows API</category>
      </item>
	
      </channel>
      </rss>
	