ipadddel.cpp
来自「监控dns的程序」· C++ 代码 · 共 29 行
CPP
29 行
//---------------------------------------------
// Example program demonstrating how to add and delete an IP address
// in Win2K to any adapter installed.
// Bill Nolde 1/8/2000
// billnolde@ieee.org
//-------------------------------
// myhlpapi.cpp
//
// Iphlapi functions I use are here
#include "stdafx.h"
#include <iphlpapi.h>
#include "ipadddel.h"
#include <winsock2.h>
#define MAXADAPTERS 20
#define ADAPTERNUMBER 0
DWORD GetIpAddressContext(char *pIPAddress);
int CheckIPAddress (char *pIPAddress);
BOOLEAN MyGetInterfaceInfo(void);
int nNumberOfAdapters = 0;
ULONG adapter_index [MAXADAPTERS];
BOOLEAN bAdapterTableIsInitialized = FALSE;
//------------------------------------------------------------
// This routine adds an IP address and Netmask to an interface.
// currently, the code is hard coded for adapter 0. You could list the
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?