ClearBox Server™ v1.2 Developer's Guide


Called by server to receive list of users currently connected to the NAS. Then this list is passed to ISynchronizer::Synchronize as usersList array.

HRESULT EnumUsers(
	[out] unsigned long* usersNum,
	[out] USERADDRESS** usersInfo,
	[out] VARIANT_BOOL * statusOK);


[out] Specifies number of entries in usersInfo array returned by synchronizer object.
[out] Extension must allocate this parameter as an array of entries containing information about users currently connected to NAS specified by nasIPAddress in call to INASManagement::Init.
[out] Specifies whether synchronizer object supplies valid list of current sessions (VARIANT_TRUE), or it failed (VARIANT_FALSE).

Return Values

If extension returns error code, server will call this method after time span specified in "Synchronization fail retry interval" server configuration parameter.

Thread Safety

This method is called in context of SYNC thread. (See Server Threads Model for details.) You should synchronize data which is shared with other threads.

Memory Management

Extension may allocate memory for usersInfo calling CoTaskMemAlloc, and it is freed by server.


Synchronizer must distinguish two different situations - when it fails to enumerate users due to its internal error and when it cannot connect to a NAS. In fommer case it rather should set statusOK to VARIANT_TRUE assuming that NAS is off or rebooting, and there are no current sessions on this NAS. This will allow server extension clear its table of active users' sessions.

Example Code

This code reports that there 3 users currently connected to NAS with which this synchronizer object is associated, and provides their names and NAS ports.

	unsigned long* usersNum, USERADDRESS** usersInfo,


	return S_OK;

See Also

INASManagement, ISynchronizer::Synchronize, Synchronization process

© 2001-2003 XPerience Technologies.

Created by chm2web html help conversion utility.