locked
Cloud Filter API RRS feed

  • Question

  • How do I create the Connectionkey as described in CfConnectSyncRoot of the “Cloud filter API” function?

    (I can not provide a link) A code sample would be very helpful.


    Saturday, November 3, 2018 3:30 PM

All replies

  • I don't have Win 10 so my comments are based strictly on reading Microsoft's documentation.

    The docs for the CfDisconnectSyncRoot function have the following explanation of the sole parameter passed to the function --

    ConnectionKey

    The connection key returned from CfConnectSyncRoot that is now used to disconnect the sync root.

    ----------

    So looking at the CfConnectSyncRoot parameter list it appears that the function stores a connection-key in a variable whose address is passed as the last parameter.  In other words, you get a connection-key from CfConnectSyncRoot.  Also, if you look at the prototype for the function in cfapi.h it shows that the connection key is an _Out_ parameter that is returned to the caller.

    STDAPI
    CfConnectSyncRoot (
        _In_ LPCWSTR SyncRootPath,
        _In_ CONST CF_CALLBACK_REGISTRATION *CallbackTable,
        _In_opt_ LPCVOID CallbackContext,
        _In_ CF_CONNECT_FLAGS ConnectFlags,
        _Out_ CF_CONNECTION_KEY *ConnectionKey
        );
    


    • Edited by RLWA32 Sunday, November 4, 2018 1:14 PM added prototype
    Sunday, November 4, 2018 12:40 PM