Problems Enumerating EndPoints
When I call PeerCollabEnumEndpoints passing in what appears to be valid PEER_CONTACT info, I get an E_INVALIDARG result. At first, I was trying to pass in contact info for a PEER_NEAR_ME. Figuring, maybe the contact needs to be added to my list of contacts, I did this, but the same error occurs.
The defintion of PEER_CONTACT works for all the other API calls, so I don't think its the problem.
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
internal struct PEER_CONTACT
[MarshalAs(UnmanagedType.LPWStr)] public String pwzPeerName;
[MarshalAs(UnmanagedType.LPWStr)] public String pwzFriendlyName;
public int fWatch;
public int WatcherPermissions;
The API is the following:
HRESULT WINAPI PeerCollabEnumEndpoints(
IN const PCPEER_CONTACT pcContact,
OUT HPEERENUM * phPeerEnum);
My DllImport definition is:
internal static extern uint PeerCollabEnumEndpoints(ref PEER_CONTACT pcContact, ref IntPtr phPeerEnum);
Yet, when I pass the same PEER_CONTACT info to PeerCollabDeleteContact, there is not error.
I'm trying to enumerate the list of endpoints in order to send an invitation.
Any help is appreciated.