ClearBox Server™ v1.2 Developer's Guide


Called by server when it attempts to get synchronization information from the NAS for the first time and must create synchronization object.

HRESULT GetSynchronizerInfo(
	[in] long nasIPAddr,
	[out] BSTR * progID,
	[out] BSTR * authority,
	[out] VARIANT_BOOL * success);


[in] IP address of the NAS for which information is requested.
[out] Extension must allocate this parameter as a string containing ProgID of synchronizer object which should be created for the specified NAS. If there's no corresponding ProgID, this parameter must be ignored.
[out] Extension may set this parameter to authority string which may be required by synchronization object to initialize itself properly (e.g., password or SNMP community).
[out] Specifies whether extension supplies requested information in progID and authority (VARIANT_TRUE), or not (VARIANT_FALSE).

Return Values

If extension returns error code, it is assumed that no synchronizer should be created as if success was set to VARIANT_FALSE.

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 progID and authority calling SysAllocString, and it is freed by server.


Some synchronizators may require more than one authority string (e.g. both username and password). In this case server extension may pass two strings as one authority string, separated by some special symbol which cannot be member of any of these strings.

Example Code

This code makes server create synchronization module with specified ProgID and authority if NAS IP address is, no module is created for other NASes.

STDMETHODIMP CTest::GetSynchronizerInfo(long nasIPAddr,
	BSTR * progID, BSTR * authority, VARIANT_BOOL * success)
	in_addr addr;
	if (strcmp(inet_ntoa(addr),"")==0)
	return S_OK;

See Also

ISynchronizer, Synchronization concepts, Synchronization process

© 2001-2003 XPerience Technologies.

Created by chm2web html help conversion utility.