PRM,
I've set up the definitions you need on the PInvoke.NET website
(
http://www.pinvoke.net). You will need the following definitions:
NetRemoteTOD
NetApiBufferFree
TIME_OF_DAY_INFO
Once you have that, here is a sample bit of code to get the information:
// The pointer.
IntPtr pintBuffer = IntPtr.Zero;
// Get the time of day.
int pintError = NetRemoteTOD(@"\\sony_laptop", ref pintBuffer);
// Get the structure.
TIME_OF_DAY_INFO pobjInfo = (TIME_OF_DAY_INFO)
Marshal.PtrToStructure(pintBuffer, typeof(TIME_OF_DAY_INFO));
// Free the buffer.
NetApiBufferFree(pintBuffer);
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"PRM" <an*******@discussions.microsoft.com> wrote in message
news:18**********************************@microsof t.com...
Hi,
I am tring to use the NetRemoteTOD Windows API from CSharp, I am
looking for some help on the C# Signature for this API. An example of the
Signature or USage in C# would be of great help.
The NetRemoteTOD function returns the time of day information from a
specified server.
Here is the WIN32API
NET_API_STATUS NetRemoteTOD(
LPCWSTR UncServerName,
LPBYTE *BufferPtr
);
Regards,
PRM