Community

OutprocLoader and C++

Hi, I'm trying to use the out of process loader for a C++ server application. I've only found a C# example in the knowledge base. I've tried #import but am still having problems. Has anyone already done this?

Was this article helpful?

0 out of 0 found this helpful

Comments

2 comments

  • Avatar
    Dmitry Mesheryakov

    Using #import should work. What specific problems do you face?

    0
  • Avatar
    ariscris

    I learned how to do this via a different support method. Here are the key lines in order to help the next person with a similar issue.

    #import "FREngine.tlb"
    
    const CLSID CLSID_InprocLoader = {0x100020D2,0x0000,0x1056,0x97,0x6E,0x00,0x80,0x48,0xD5,0x3A,0xE3};
    const CLSID CLSID_OutprocLoader = {0x100020D3,0x0000,0x1056,0x97,0x6E,0x00,0x80,0x48,0xD5,0x3A,0xE3};
    const IID IID_IEngineLoader = {0x100010EC,0x0000,0x1056,0x97,0x6E,0x00,0x80,0x48,0xD5,0x3A,0xE3};
    
    IUnknown* pUnknown;
    checkResult(CoCreateInstance(CLSID_OutprocLoader, NULL, CLSCTX_LOCAL_SERVER, IID_IUnknown, (void **)(&pUnknown)));
    
    FREngine::IEngineLoaderPtr engineLoader;
    checkResult(pUnknown->QueryInterface( IID_IEngineLoader, (void **)(&engineLoader)));
    
    _engine = engineLoader->GetEngineObject(frengineLicenseKey, "", "");
    _engine->LoadPredefinedProfile(FRENGINE_CONVERSION_SPEED))
    
    2

Please sign in to leave a comment.