ページ更新: 2005-01-15 (土) (6586日前)
Network Programming、というか、Java/JNI/MACアドレス取得 をやろうとして 調べたこと。 目次 [編集]情報源 #Winsock Programmer's FAQ - 日本語訳 [INFO] 設計上の問題 - Winsock と TCP 経由で小さなデータ セグメントを送信する - 2003年7月30日 MACアドレス、インターフェイス名などの取得 #[編集]iphlpapi.dllを使う #
Winsock Programmer's FAQ 4.7 #MAC アドレスの取得 Winsock Programmer's FAQ の 4.7 - How do I get the MAC (a.k.a. hardware) address of the local Ethernet adapter? より、The third method をコマンドライン上で試してみた。 > "c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\vcvars32.bat" > cl snmpapi.cpp snmpmac.cpp wsock32.lib Microsoft(R) 32-bit C/C++ Standard Compiler Version 13.10.3077 for 80x86 Copyright (C) Microsoft Corporation 1984-2002. All rights reserved. snmpapi.cpp snmpmac.cpp コードを生成中... Microsoft (R) Incremental Linker Version 7.10.3077 Copyright (C) Microsoft Corporation. All rights reserved. /out:snmpapi.exe snmpapi.obj snmpmac.obj wsock32.lib > snmpapi # of adapters in this system : 4 Interface #1 type : 24 Interface #2 type : 6 MAC Address of interface #2: 005056c00008 Interface #3 type : 6 MAC Address of interface #3: 005056c00001 Interface #4 type : 6 MAC Address of interface #4: 0030485421ae #2と#3はVMware 4が作る仮想ネットワークのNIC。 #4は Intel EtherExpress PRO 100/VE。 [編集]GetAdaptersInfo (2004-08-10) #skamachi's factory Visual C++ WTL ネットワークアダプタ情報の取得(GetAdaptersInfo) [編集]NetBIOSを使う #2004-10-26 |