ClearBox Server v1.2 Developer's Guide |
ISynchronizer::GetSynchronizerInfoCalled 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); Parameters
Return ValuesIf extension returns error code, it is assumed that no synchronizer should be created as if success was set to VARIANT_FALSE. Thread SafetyThis 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 ManagementExtension may allocate memory for progID and authority calling SysAllocString, and it is freed by server. RemarksSome 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 CodeThis code makes server create synchronization module with specified ProgID and authority if NAS IP address is 192.168.2.1, no module is created for other NASes. STDMETHODIMP CTest::GetSynchronizerInfo(long nasIPAddr, BSTR * progID, BSTR * authority, VARIANT_BOOL * success) { in_addr addr; addr.S_un.S_addr=nasIPAddr; if (strcmp(inet_ntoa(addr),"192.168.2.1")==0) { *success=VARIANT_FALSE; *authority=SysAllocString(L"public"); *progID=SysAllocString(L"SomeSynchro.SNMP.1"); } else *success=VARIANT_FALSE; return S_OK; } See AlsoISynchronizer, Synchronization concepts, Synchronization process © 2001-2003 XPerience Technologies. www.xperiencetech.com |
Created by chm2web html help conversion utility. |