Announcement

Collapse
No announcement yet.

Trying to convert some C++ Code and have a question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Trying to convert some C++ Code and have a question

    In my c++ code I call a Class Method from my destructor
    Code:
    Class::~Class()
    {
       Close();
    }
    Class::Close()
    {
    
    
    }
    But the method also needs to be public so I can call
    MyClass->Close();

    I would like to do this from PB Code But
    Code:
    Class myClass
       Class Method Destroy()
          Me.Close()
       End Class
       interface IMyClass
          Inherit IDispatch
          Method Close()
          End Method
       End interface
    End Class
    This does not compile, I assume this is a limitation. Does anyone have an Idea?

    Thanks
    Sr. Software Development Engineer and Sr. Information Security Analyst,
    CEH, Digital Forensic Examiner

  • #2
    You need to assign the class to an interface, see the code here:

    COM Objects: Passing Data Between Classes Using INHERIT
    kgpsoftware.com | Slam DBMS | PrpT Control | Other Downloads | Contact Me

    Comment


    • #3
      Thanks!!
      Sr. Software Development Engineer and Sr. Information Security Analyst,
      CEH, Digital Forensic Examiner

      Comment

      Working...
      X