N
Nikolay Petrov
Please, can someone convert the following C# code to VB .NET
As far as I can see there are some errors in it, but I am not sure.
if (WTSEnumerateSessions(IntPtr.Zero, 0, 1, ref buffer, ref count))
{
WTS_SESSION_INFO[] sessionInfo = new WTS_SESSION_INFO[count];
for (int index = 0; index < count; index++)
sessionInfo[index] = Marshal.PtrToStructure(buffer +
(sizeof(WTS_SESSION_INFO) * index), typeof(WTS_SESSION_INFO));
TIA
As far as I can see there are some errors in it, but I am not sure.
if (WTSEnumerateSessions(IntPtr.Zero, 0, 1, ref buffer, ref count))
{
WTS_SESSION_INFO[] sessionInfo = new WTS_SESSION_INFO[count];
for (int index = 0; index < count; index++)
sessionInfo[index] = Marshal.PtrToStructure(buffer +
(sizeof(WTS_SESSION_INFO) * index), typeof(WTS_SESSION_INFO));
TIA