+ Reply to Thread
Results 1 to 2 of 2

Thread: soamAPI->Connect("AppName", callback)

  1. #1
    dhoorens is offline Junior Member
    Join Date
    December 22nd, 2009
    Posts
    3
    Downloads
    0
    Uploads
    0

    Default soamAPI->Connect("AppName", callback)

    Hello
    Little problem when I try to use COM platform.symphony.Soam.COM.dll
    in c++
    what I did was:
    Code:
    CoInitialize(0);
    ISoamAPIPtr soamAPI (L"soamCOMvc7.SoamAPI");
    ISoamConnectionPtr connection (L"soamCOMvc7.SoamConnection");
    IDefaultConnectionSecurityCallbackPtr callback(L"soamCOMvc7.DefaultConnectionSecurityCal");
    
    soamAPI->Initialize();
    callback->Init("Guest", "Guest");
    connection = soamAPI->Connect("appName", callback);
    
    In this case, I receive th error c2664: ISoamAPI::connect "cannot convert parameter 2 from IDefaultConnectionSecurityCallbackPtr to ISoamConnectionSecurityCallback*"

    Did I do anything wrong?
    Of course, yes, but what?
    Tks
    D

  2. #2
    alicia is offline Junior Member
    Join Date
    April 21st, 2008
    Location
    Toronto, Canada
    Posts
    5
    Downloads
    6
    Uploads
    0

    Default

    I'm not 100% sure and not that familiar with COM, but I think the 'callback' variable should be of type ISoamConnectionSecurityCallbackPtr instead of type IDefaultConnectionSecurityCallbackPtr.

    If the Connect call still doesn't accept it, you might need to call GetInterfacePtr() on the callback variable to get the raw ISoamConnectionSecurityCallback and not the smart pointer.
    - Alicia

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts