Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connect a VC++ application to a Powerbuilder 6.5 application

Status
Not open for further replies.

marherrera

Programmer
Nov 26, 2002
1
ES
I have a powerbuilder 6.5 application which needs to be
called from a Visual C++ program. I've tried the component generators but the COM server generated by Powerbuilder cannot connect to my powerbuilder application.
 
Try this
Search the help in powerbuilder the command connecttoneobject()
You must declare an oleobject
oleobject my_ole
then you can do this.

my_ole = create oleobject
li_rc = my_ole.connecttonewobject("name of the assembly.name_of the_com object")

you must then check the return code.You can find the return values in the powerbuilder help.You can have then access in your com with the dot notation syntax like
my_ole.gettotalrows().
You can also do this
If you want to transfer the my_ole object to another object for validation or anything else then you can use this syntax
declare an olebject
oleobject my_ole1
my_ole1.setautomationpointer(my_ole)
The my_ole1 object now has the same methods with the my_ole object.I hope i was helpfull thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top