Может кому пригодится. Код (Text): .586 .model flat, stdcall option casemap:none include masm32\include\windows.inc include masm32\include\user32.inc includelib 7600.16385.1\lib\win7\i386\user32.lib include masm32\include\kernel32.inc includelib 7600.16385.1\lib\win7\i386\kernel32.lib include masm32\include\iphlpapi.inc includelib 7600.16385.1\lib\win7\i386\iphlpapi.lib .data IP_ADDRESS_STRING struct String db 16 dup (?) IP_ADDRESS_STRING ends IP_ADDR_STRING struct Next dd ? IpAddress db 16 dup (?) IpMask db 16 dup (?) Context dd ? IP_ADDR_STRING ends IP_ADAPTER_INFO struct Next dd ? ComboIndex dd ? AdapterName db 260 dup (?) Description db 132 dup (?) AddressLength dd ? Address db 8 dup (?) Index dd ? tType dd ? DhcpEnabled dd ? CurrentIpAddress dd ? IpAddressList IP_ADDR_STRING <> GatewayList IP_ADDR_STRING <> DhcpServer IP_ADDR_STRING <> HaveWins dd ? PrimaryWinsServer IP_ADDR_STRING <> SecondaryWinsServer IP_ADDR_STRING <> LeaseObtained dd ? LeaseExpires dd ? IP_ADAPTER_INFO ends pInfo IP_ADAPTER_INFO <> len dd 0 hConsole dd ? sPattern db '%02X:%02X:%02X:%02X:%02X:%02X',0 sBuffer db 18 dup (0) .code start: invoke GetAdaptersInfo,addr pInfo,addr len invoke GlobalAlloc,GMEM_FIXED,len push eax invoke GetAdaptersInfo,eax,addr len pop esi push esi assume esi:ptr IP_ADAPTER_INFO movzx eax,byte ptr [esi].Address[5] push eax movzx eax,byte ptr [esi].Address[4] push eax movzx eax,byte ptr [esi].Address[3] push eax movzx eax,byte ptr [esi].Address[2] push eax movzx eax,byte ptr [esi].Address[1] push eax movzx eax,byte ptr [esi].Address[0] push eax push offset sPattern push offset sBuffer call wsprintf pop eax invoke GlobalFree,eax invoke GetStdHandle,STD_OUTPUT_HANDLE mov hConsole,eax invoke WriteConsole,hConsole,addr sBuffer,18d,NULL,NULL invoke ExitProcess,NULL ret end start
HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\ гдето тут пс там будут поля формата %.4d - в одном из них твоя карточка, параметр NetworkAddress. для вступления в силу адаптер нужно ресетнуть