Visit Tom Krueger’s blog for a great example to get you started with accessing .Net components from within PowerBuilder Classic. The author gives clear instructions to code and to test.
(This is an old post that I forgot to publish)
We were working with an older version of PowerBuilder (version 8.0) and needed to call out to .NET. There wasn’t much documented and there were a few stumbling points, but we persisted and have proven to ourselves that it can be done. However, we did rely on the use of COM.
Things to keep in mind:
– Make sure to restart PowerBuilder after any changes to registry or copying of dll’s. (If something does not work, restart PowerBuilder)
– You will likely need to close PowerBuilder in order to delete the .NET dll.
.NET Class Library (dll)
1) Create a .NET Class Library
2) Check the “Register for COM interop” checkbox on the Build tab of the project properties.
3) Expose the assembly to COM by Setting ComVisible to true in the AssemblyInfo file. Ex. [assembly: ComVisible(true)]
4) Create a…
View original post 316 more words