By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,326 Members | 2,726 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,326 IT Pros & Developers. It's quick & easy.


P: n/a

I try to use the addipaddress in, the api function parameters are:

DWORD AddIPAddress(
IPAddr Address,
IPMask IpMask,
DWORD IfIndex,
when I make the call, the function return the value 87, INVALID_PARAMETER,

This is the code i use
The declaration

Declare Function AddIPAddress Lib "Iphlpapi" (ByVal Address As Long,
ByRef IpMask As Long, ByRef IfIndex As Integer, ByVal NTEContext As IntPtr,
ByVal NTEInstance As IntPtr) As Integer
and the call

iRetVal = AddIPAddress(16843009, 4294967040, 1, NTEContext, NTEInstance)

we have also tried use a structure like this

<StructLayout(LayoutKind.Sequential)> Public Class IPAddr
Public s_addr As UInt64
End Class

Thaks in advance.
Nov 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.