So I created a dll in Microsoft Visual C# 2010 Express and I want to use the dll in PowerBuilder 11.5.
To test, I created a simple sum function in the c# dll, declared it in PowerBuilder using the syntax Function int sum(int x, int y)
Library "NETS.dll" in the Global External Functions in PowerBuilder, and called the function when the powerbuilder window opens or when I press a command button but everytime I try running, PowerBuilder says "unknown function name".
Need help.
Thanks
Asked
Active
Viewed 5,967 times
0

Aaron Bertrand
- 272,866
- 37
- 466
- 490

Anshan arvie Valencia
- 1
- 1
- 2
-
Isn't that importable via http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.dc00357_1100/html/newfeat/CEGIBCHA.htm – Lex Li Feb 06 '12 at 09:18
-
Content not found in the above link! – Ankit Dec 16 '15 at 06:24
2 Answers
4
You'll have to expose your DLL as a COM object, register it on the system with regasm.exe
and use it via and OLEObject
and ConnectToNewObject
PowerScript function.

Calvin Allen
- 4,176
- 4
- 31
- 31
2
A C# assembly won't have any exported functions that you can import this way. You can read up on this questiion: Exporting a native C function from a .net DLL? Hope that it will help you!

Community
- 1
- 1

Dan Byström
- 9,067
- 5
- 38
- 68