The function should return the active list of clients running as there could be multiples. I have a feeling I'm declaring the Function incorrectly but I'm not sure how to return multiple results as I'm a total newbie to vb.net but I've made a ton of progress so far.
I get the following error:
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Here is the code i'm trying to use to call the function
Dim Hostname As String
Dim bufferlength As Integer
Hostname = " "
bufferlength = 0
rtnVal = queryActiveClients(Hostname, bufferlength)
Here is where I declared the DLL function.
Declare Function queryActiveClients Lib "p2mpi01" (ByVal hostName As String, ByVal bufferlength As Integer) As Integer