Function – SetAccessList

SetAccessList restricts access to created virtual serial ports for various applications.

BOOL SetAccessList(
  	char *Port, 	// name of the port
  	void* Buffer, 	// pointer to buffer
  	long sizeBuffer 	// size of buffer
);

Parameters:

  • Port : A null-terminated string that defines one of the two port names in a pair
  • Buffer : A pointer to PROGRAM_ACCESS array
  • sizeBuffer : Size of Buffer parameter in bytes

Return values : SetAccessList returns TRUE if port access list was created successfully and FALSE otherwise

Code example:

PROGRAM_ACCESS  pList [3];      
pList [0].AccessState = true;
wcscpy (pList [0].Mask, L"z:\\*");
pList [1].AccessState = false;
wcscpy (pList [1].Mask, Lc:\Progra, files\*");
pList [2].AccessState = false;
wcscpy (pList [2].Mask, L"*");
theApp.SetAccessList ("COM1", pList, sizeof (PROGRAM_ACCESS) * 3);