Calling a function in a .pbd from C#

Posted on 2006-03-31
Medium Priority
Last Modified: 2013-12-26
Does anyone have any code samples or a web site that will show me how to call into a .pbd file to execute a function? The function works from PB, but now I need to call it from C# also.

I tried this code:

[DllImport("C:\\Program Files\\PBBase\\update1.pbd", EntryPoint = "run_update")]
static extern bool run_update(bool b1, bool b2, bool b3, bool b4, bool b5, bool b6, bool b7);

public void CallPBUpdate()

but am getting this error:
An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)

C# 2.0
PB 10.0
Win XP


Question by:clu82

Accepted Solution

tr1l0b1t earned 500 total points
ID: 16361700
Hi clu82, I'm afraid it's not so easy ...
take a look to this article : http://pbdj.sys-con.com/read/170848.htm
LVL 14

Expert Comment

ID: 16367917

If you have source code you can compile powerbuilder application in machine code (.dll) instead of (.pbd) and try to call the same function from dll.

I am not sure just guessing....


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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question