Questions tagged [iphelper]
22 questions
22
votes
2 answers
Whats the difference between an adapter and a network interface?
Having a hard time understanding the MSDN documentation on the IP Helper Functions. Whats the difference between an adapter and a network interface?

unixman83
- 9,421
- 10
- 68
- 102
13
votes
1 answer
Get subnet mask from GetAdapterAddresses()
I'm using the GetAdapterAddresses() method to get the ip addresses of all interfaces on the system.
I need to find the broadcast address of each interface. I can calculate this using the IP address and the subnet mask but I can't see the subnet mask…

jossgray
- 497
- 6
- 20
8
votes
9 answers
How do you parse an IP address string to a uint value in C#?
I'm writing C# code that uses the windows IP Helper API. One of the functions I'm trying to call is "GetBestInterface" that takes a 'uint' representation of an IP. What I need is to parse a textual representation of the IP to create the 'uint'…

Hershi
- 2,080
- 2
- 19
- 24
5
votes
1 answer
Getting per connection bandwidth statistics
I need to determine per-process network usage statistics similar to what TCPView can do.
Example http://img513.imageshack.us/img513/861/6601f15814544055a590e26.png
So before you shoot me for posting a duplicate of this question, or this question, I…

caesay
- 16,932
- 15
- 95
- 160
5
votes
8 answers
How do you find out which NIC is connected to the internet?
Consider the following setup:
A windows PC with a LAN interface and a WiFi interface (the standard for any new laptop). Each of the interfaces might be connected or disconnected from a network. I need a way to determine which one of the adapters is…

Hershi
- 2,080
- 2
- 19
- 24
3
votes
1 answer
MTU mismatch between GetIfEntry and netsh
I'm working on pseudo-transport layer software that runs over UDP, providing reliable connection-oriented transmission, as an alternative to TCP. In order to maximize network efficiency, we query the MTU of the "best" network adapter upon…

ChrisJ
- 110
- 6
3
votes
2 answers
Managed alternative for GetBestInterface?
I have absolutely no background on programming in C (or any other unmanaged languages for that matter) yet I would like to use the GetBestInterface function from the IP Helper API in my .NET application. I tried to understand how P/invoke calls can…

Steven Liekens
- 13,266
- 8
- 59
- 85
2
votes
1 answer
How to detect a NEW TCP Connections By Windows APIs GetExtendedTCpTable
I have made an App for watching Active tcp/udp connections for the local pc. Now, my list of connections is static, How do i make it dynamic? I tried to use Timer events,but GetExtendedTCPTable returns the full list of connections. I only desire…

CyprUS
- 4,159
- 9
- 48
- 93
2
votes
0 answers
Get UDP connection statistics from IP Helper API (iphlpapi.dll)
I would like to count the bytes received and sent from specific UDP connections in Windows 10.
This answer lists an approach to count bytes for specific TCP connections using GetPerTcpConnectionEStats() from the IP Helper API (iphlpapi.dll). I…

u17
- 2,776
- 4
- 31
- 43
2
votes
3 answers
Problem with using Win32 IPHelper API in python
I'm attempting to create python module for getting network parameters. I'm using ctypes and has some problems.
Function __getInterfaces_win2k() works with python 2.5 and 2.6, but doesn't work with python 2.7 (Unhandled exception at 0x1e001759 in…

Artem Andreev
- 19,942
- 5
- 43
- 42
2
votes
1 answer
List windows route table
I want to list entries from windows route table. Same output as from route print. I use GetIpForwardTable2 function from IP Helper API. But I get some weird results which differ from route command output.
I run it in Windows 7 64bit in VirtualBox…

och
- 83
- 9
2
votes
0 answers
How to remove a static IP configuration for an absent network adapter through WinAPI?
When you configure a network adapter with a certain IP address that was already used before on a currently removed network adapter, you will fail.
If you do this trough the Windows TCP/IP settings GUI, you will be alerted and offered the option to…

Chris
- 1,213
- 1
- 21
- 38
2
votes
1 answer
Weird issue regarding GetOwnerModuleFromTcpEntry when targeting x64
Since I am a first time poster, I do apologize if I unintentionally left out any key piece of information, but here it goes.
Background: I am doing some testing to find out what the undocumented member array ‘OwningModuleInfo’ in…

thomas_f
- 1,854
- 19
- 27
1
vote
1 answer
DeleteIPAddress function works, but triggers a disconnection
I have a small app that temporary adds several (3-4) IP addresses using AddIPAddress function from IP Helper. After some seconds (2-3), it deletes these addresses using DeleteIPAddress function.
The function DeleteIPAddress works and returns no…

Daniel
- 11
- 1
1
vote
1 answer
How to get remote ip address and port from active udp connection?
I'm working on a graphical windows application. So solutions on c++ and c# are prefered.
For my application, I need to get the remote address and port from active udp connection from a specific process.
I tried IP Helper API but the methods for UDP…

Jonathan
- 61
- 6