Restricts access to created virtual serial ports for various applications.
BOOL SetAccessListExW( WCHAR *Port, WCHAR * UserSession, void* Buffer, long sizeBuffer );
- Port A null-terminated string that defines one of the two port names in a pair
User session’s ID in which the pair of virtual ports was created.If UserSession is empty, a ports pair was created globally and is visible to all users.
To know how to get the user session’s ID, refer to GetUserSession.
- Buffer A pointer to PROGRAM_ACCESS array
- sizeBuffer Size of Buffer parameter in bytes
Returns TRUE if port access list was created successfully and FALSE otherwise.
PROGRAM_ACCESS pList ; pList .AccessState = true; wcscpy (pList .Mask, L"z:\\*"); pList .AccessState = false; wcscpy (pList .Mask, Lc:\Progra, files\*"); pList .AccessState = false; wcscpy (pList .Mask, L"*"); theApp.SetAccessListExW ("COM1", pList, sizeof (PROGRAM_ACCESS) * 3);