EnumPorts
C# S i g n a t u r e :
[DllImport("winspool.drv",CharSet = CharSet.Auto, SetLastError = true)]
static extern bool EnumPorts (string pName, uint level, IntPtr lpbPorts, uint cbBuf,ref uint pcbNeeded,ref uint pcReturned);VB Signature:
TODOSample Code:
using System;
using System.Runtime.InteropServices;Sample Code:
[Flags]
public enum PortType
{
Write = 0x1,
Read = 0x2,
Redirected = 0x4,
NetAttached = 0x8
}Sample Code:
Sample Code:
Sample Code:
Última actualización