Code Monkey home page Code Monkey logo

Comments (1)

tishion avatar tishion commented on June 5, 2024

Hi @yyokyfo , thanks for your inspired question. Potto is only a minimal subset implementation of MS COM concept and it exposed the same IUnknown interface of the object, theoretically speaking you can consume the potto object in MS COM runtime as long as you can get the object instance created by potto. If you would like to try you can make some modification of Potto as follow instructions:

  1. compile Potto with POTTO_USE_GUID enabled, because MS COM uses real GUID but potto uses string by default:

    #ifdef POTTO_USE_GUID

  2. change the UUID value of Potto::IUnknown({10000000-0000-0000-0000-000000000000}), you need to change the UUID to the value which exactly the same with MS IUnknown({00000000-0000-0000-C000-000000000046}) :

    const char* const IID_IUnknown = "10000000-0000-0000-0000-000000000000";

  3. change the UUID value of Potto::IClassFactory({10000000-0000-0000-0000-100000000001}) to MS IClassFactory({0000001B-0000-0000-C000-000000000046}):

    const char* const IID_IClassFactory = "10000000-0000-0000-0000-100000000001";

  4. then you should initialize and create potto object by Potto methods:
    initialize potto runtime

    POTTO_API POTTO_ERROR Initialize(const std::string& moduleDatabase,

    ceate instance and get interface
    POTTO_API POTTO_ERROR CreateInstance(const PottoUuid& classId, const PottoUuid& interfaceId,

    or
    POTTO_API POTTO_ERROR GetClassObject(const PottoUuid& classId, const PottoUuid& interfaceId,

then you can pass the interface to MS COM runtime methods.

limitatios of Potto

  • No complex apartment models
  • No Dispatch supports
  • No Windows registry available

Good luck~

from potto.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.