I'm using VB6 and I've a problem with DHCPEnumSubnetClinents API.
Declare Function DhcpEnumSubnetClients Lib "Dhcpsapi" (ByVal ServerIpAddress As String, _
ByVal SubnetAddress As Long, _
ByRef ResumeHandle As Integer, _
ByRef PreferredMaximum As Integer, _
ByRef ClientInfo As Integer, _
ByRef ClientsRead As Integer, _
ByRef ClientsTotal As Integer) As Integer
The field SubnetAddress is supose to be a Long, but the decimal value for the my Subnet is actualy a double.The subnet address 255.255.255.0 decimal value is 4294967040# wich is a double not a long.
But if I change on the function the SubnetAdress data type to double I receive runtime error 49 'Bad DLL Calling Convention'.
I've tried to change the field data type to "byVal SubnetAddress as Any" and pass the value as a string but then the function returns no values.
Can somenone help me with this?