Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 308
  • Last Modified:

call COM object hosted in MTS created in Visual Basic from PowerBuilder

Is it possible to call COM object hosted in MTS created in Visual Basic from PowerBuilder?

Is there any example on the internet regarding this ?
0
donna_ihg
Asked:
donna_ihg
1 Solution
 
BhadreshDesaiCommented:
Theoretically you can access COM objects written in any language hosted on MTS. A simple example would be

OLEObject SomeCOMObj
Integer li_rc
SomeCOMObj = CREATE OLEObject
li_rc = SomeCOMObj.ConnectToNewObject("PackageName.CompName")
IF li_rc < 0 THEN
   DESTROY SomeCOMObj
   MessageBox("Failed to connect to COM Object",  &
      "Error: " + String(li_rc))
   Return
END IF

// Then you can call function on SomeCOMObj as
SomeCOMObj.of_SomeFunction()

Hope this answers your question

Bhadresh
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now