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!

using PB dll in external program

Status
Not open for further replies.

zorro11

Programmer
Jan 28, 2003
1
DE
My problem is the following:
I built my PB application (version 8.0.1) as a dll file (that means only a small executable and a large dll). Can this dll be used by other programs (PB or something different like a self written C++ application)?
I already tried to access the dll with another PB application but got an runtime error "Bad runtime function reference"
Would be glad for any tip
 
Hi,

I've not tried calling a PB-generated dll from a different program but found that I would get the "Bad runtime function reference" error (and similar) for the following reasons:

1) I had spelt the function name wrong in my external function declaration
2) I had supplied the wrong number of arguments, so the signature did not match.
3) I had supplied the wrong type of arguments, also caused signature mismatch.
4) I had attempted to access a protected or private function.

You might need to make your functions use reference arguments rather than value arguments and/or check the mappings from your external program's datatypes to PB's datatypes - there is a page in the help showing C/C++ and PB datatype mappings which might be useful to you.

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top