Handle Category

Handle API functions get information related to the specified character-device or named-pipe handle. They require that the Workstation service be started.

The Handle category functions, data types, structures, and constants are defined in the netcons.h and neterr.h header files. A source program can access these definitions by defining the constants INCL_NETERRORS and INCL_NETHANDLE, and including the lan.h master header file. The Handle API function includes:

Function

Description

NetHandleGetInfo

Retrieves handle-specific information.

NetHandleGetInfo can be used to identify the user of a named pipe, provided that the pipe has been opened from a remote server. Handle API functions can be called only locally (there is no server name parameter).

Handle Category Data Structures

The handle_info_2 and handle_info_3 data structures are used only with NetHandleGetInfo.

Handle Information (level 2)

The handle_info_2 data structure has the following format:

Within this structure, hdli2_username points to the name of the user who has opened a named pipe. This user name is available only for a handle on the serving side of a valid named pipe that has been opened by a remote computer. If the named pipe has been opened locally, the call to NetHandleGetInfo returns ERROR_INVALID_PARAMETER.

Handle Information (level 3)

The handle_info_3 data structure has the following format:

Within this structure, the parameters are defined as follows:

hdli3_username points to the name of the user who has opened a named pipe. This user name is available only for a handle on the serving side of a valid named pipe that has been opened by a remote computer. If the named pipe has been opened locally, the call to NetHandleGetInfo returns ERROR_INVALID_PARAMETER.

hdli3_computername points to an ASCIIZ string that contains the name of the workstation from which the user connected to the pipe. This parameter can only be applied to a handle on the serving side of a valid remote named pipe.

hdli3_priv specifies the users privilege level on the server. The ACCESS.H header file defines these values:

Manifest

Value

Meaning

USER_PRIV_GUEST

0

Guest privilege

USER_PRIV_USER

1

User privilege

USER_PRIV_ADMIN

2

Admin privilege

hdi3_authflags specifies a bitmap of account operator privileges on the server. The access.h header file defines these bits:

Code

Bit(s)

Meaning

AF_OP_PRINT

0

Print operator

AF_OP_COMM

1

Comm operator

AF_OP_SERVER

2

Server operator

AF_OP_ACCOUNTS

3

Accounts operator

--

4-31

Reserved

hd3_reserved specifies reserved; must be a null pointer.

Previous Page Page Top Index Next Page See Page