Restricts access to created virtual serial ports for various applications.
BOOL SetAccessListEx( CHAR *Port, CHAR * UserSession, void* Buffer, long sizeBuffer );
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.
A pointer to PROGRAM_ACCESS array
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.SetAccessListEx ("COM1", pList, sizeof (PROGRAM_ACCESS) * 3);