Want to create an ActiveX object from a Python class

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Shi Sherebrin

    Want to create an ActiveX object from a Python class

    A colleague wants some functionality that I've built in a Python class
    available to 'drop' into her Visual C++ project. Some time ago she
    gave up on trying to use 'regular' COM servers, since ActiveX controls
    integrate so much more easily. So if I can't wrap the Python class
    into an ActiveX object, I'll have to port it.

    I've been searching through the pythoncom and ctypes documentation and
    samples, and can't seem to find any examples of making an ActiveX
    object. The pythoncom documentation claims that ActiveX is the same
    as COM, but there seems to need to be more added to a COM server to
    make it an ActiveX object, and I don't know nearly enough to know how
    to do this.

    Is anyone else interested in doing this, and has anyone managed to do
    so?

    thanks,
    Shi.
  • John J. Lee

    #2
    Re: Want to create an ActiveX object from a Python class

    shi@imaging.rob arts.ca (Shi Sherebrin) writes:
    [...][color=blue]
    > I've been searching through the pythoncom and ctypes documentation and
    > samples, and can't seem to find any examples of making an ActiveX
    > object. The pythoncom documentation claims that ActiveX is the same
    > as COM, but there seems to need to be more added to a COM server to
    > make it an ActiveX object, and I don't know nearly enough to know how
    > to do this.
    >
    > Is anyone else interested in doing this, and has anyone managed to do
    > so?[/color]

    ActiveX controls are indeed just COM servers with particular interfaces.

    Have you found the O'Reilly book yet (Hammond and Robinson)? I don't
    remember anything specifically on ActiveX, but it certainly covers
    making COM servers from Python. The relevant chapter (12) is actually
    downloadable for free, I think.

    I don't know whether AX controls are possible / well-supported:




    but this might be more useful to you:





    John

    Comment

    • Syver Enstad

      #3
      Re: Want to create an ActiveX object from a Python class

      shi@imaging.rob arts.ca (Shi Sherebrin) writes:
      [color=blue]
      > A colleague wants some functionality that I've built in a Python class
      > available to 'drop' into her Visual C++ project. Some time ago she
      > gave up on trying to use 'regular' COM servers, since ActiveX controls
      > integrate so much more easily. So if I can't wrap the Python class
      > into an ActiveX object, I'll have to port it.
      >
      > I've been searching through the pythoncom and ctypes documentation and
      > samples, and can't seem to find any examples of making an ActiveX
      > object. The pythoncom documentation claims that ActiveX is the same
      > as COM, but there seems to need to be more added to a COM server to
      > make it an ActiveX object, and I don't know nearly enough to know how
      > to do this.
      >
      > Is anyone else interested in doing this, and has anyone managed to do
      > so?[/color]

      If I am not mistaken, the only thing your colleague needs is a type
      library for the python com object. In the cases I've experienced this
      is what makes MS IDE's tick when it comes to COM objects.

      Comment

      • News M Claveau /Hamster-P

        #4
        Re: Want to create an ActiveX object from a Python class

        Bonjour !
        Peut-être en créant un serveur COM, puis en encapsulant celui-ci avec un peu
        de code, dans VBCCE (=Visual Basic Control Creation Edition, gratuit, chez
        Microsoft, pour faire des Active-X).
        C'était juste une idée.


        Hi ! (sorry for my poor english)
        Perhaps with : to do an COM server, and use it, in little code, in VBCCE
        (=Visual Basic Control Creation Edition ; free, at Microsoft, for create
        Active-X).
        Just an idea.


        Url : http://msdn.microsoft.com/vbasic/dow...e/default.aspx



        @-salutations
        --
        Michel Claveau


        Comment

        Working...