StrPtr in .NET
Thanks in advance.
Thanks in advance.
K, in reply to the above, I managed to find some code that does the same in c# as the StrPtr function in vb6. After implementing it in my function however, it still did not work. Can anybody see any problem in my code? Here is the vb code:
dwServer = StrPtr(sServer)
success = NetFileEnum(dwServer, _
0&, _
0&, _
3, _
bufptr, _
MAX_PREFERRED_LENGTH, _
dwEntriesread, _
dwTotalentries, _
dwResumehandle)
GCHandle MyGC = GCHandle.Alloc(serv, GCHandleType.Pinned); IntPtr server = MyGC.AddrOfPinnedObject();
and here is my corresponding code:
//get list of open files
int dwStatus = NetFileEnum(strServer , null, null, 3, ref pBuffer, MAX_PREFERRED_LENGTH, out dwReadEntries, out dwTotalEntries, IntPtr.Zero );