SetAccessListW

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

BOOL SetAccessListW(
  	WCHAR *Port, void* Buffer, long sizeBuffer
);

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:

SetAccessListW 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.SetAccessListW ("COM1", pList, sizeof (PROGRAM_ACCESS) * 3);