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!

Sending Array from c/c++ to PowerBuilder

Status
Not open for further replies.

cenwesi

Programmer
Jan 13, 2003
14
US
Ok so i want to read a large/small file from c/c++ and send it to powerbuilder. I know i can use import function.... but i want to do it at the c/c++ level. I can read it into an array char **ar at the c/c++ level. Now how can i send this info to PB?

Anyone
 
Hi,

Have a look at Thread144-343115 - it's a thread addressing a different problem but should give you some ideas on how to get the data out of your c/c++ program and into pb.

Cheers.
 
This might be helpfull but not sure as I go the other way with PB calling C++ function with string array. A PB string array is a C++ LPSTR * (pointer to pointer). The PB array and the C++ LPSTR * are the same. PB does not store a null pointer to mark the end of the array so I must pass the arraybound to C++. If going the other way then C++ function#1 would return the array bound and the maximum string length, in PB initialise string array members, then C++ function#2 gets PB string array as argument LPSTR * and can strcpy each local element.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top