Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 543099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:30:57+00:00 2026-05-13T10:30:57+00:00

If I am looking to reference a .NET dll from PowerBuilder (10 or 11.5),

  • 0

If I am looking to reference a .NET dll from PowerBuilder (10 or 11.5), which of the following is the best practice?

1) Register the dll as a COM Object, and use the COM Object via an OleObject
2) Upgrade to 11.5, and convert to PB.NET so that I can actually have blocks of C# in the PowerBuilder code
3) Another method

What are some things I should be aware of with these approaches?

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T10:30:57+00:00Added an answer on May 13, 2026 at 10:30 am

    I haven’t done anything with PowerBuilder, but this is the technique we followed (pretty successfully) with a project that could not immediately be migrated from VB6.

    1) We created a shim/facade with COM references to expose the .NET items we needed. (We also specified the GUID’s using attributes so we had complete control over compatibility changes.)

    2) We referenced the COM objects in our VB6 code (as you would in the PowerBuilder code) using the built in object handling (OleObject in your case).

    3) As items were migrated (in our case to C#), they referenced the underlying .NET classes instead of the COM shim. (We tagged the shim with Obsolete tags to ensure that nobody used it accidentally.)

    4) After all references to the shim were migrated, we removed the shim. (We actually did that in two phases. In the first phase, we left the shim in but modified it to throw exceptions and log what information it could about the calls. That way we would have an idea about where any calls to it were being made from. After confirming that there were no problems, the shim was removed in the next phase.)

    The advantage of this to us was that the migration could occur incrementally. We chose not to expose the underlying .NET objects directly because there was still some risk of them changing and we needed the COM interface to be as stable as possible.

    Upgrading to PB.NET is certainly a possibility… but I don’t know how complex that migration will be. You may find the time necessary would make the migration a major project (it certainly would have been for us).

    Other methods which we considered, but rejected as inappropriate for our needs were:

    • Wrapping the .NET components in another application (a “service”) and talking to those components via socket communication.

    • “Shelling out” to utilities using the .NET framework and transferring the information via (for example) a file based mechanism.

    Things to be aware of include:

    • The threading model in use on both sides of the link. (We hosed ourselves at first because one part of the system ran MTA instead of STA – see this question for more information.)

    • What an exception on the .NET side will look like from your application. It may be a very unhelpful “generic” error, and may even appear to be in the caller instead of the .NET code. We added logging on the .NET side which gave a more verbose record of any exception before re-throwing it and letting the caller handle things as best it could.

    I hope this helps. Good Luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am looking to create and call a reference to a compiled .net exe
When trying to update the web reference to a deployed asp.net webservice from a
I have an ASP.Net application that references a DLL which contains a singleton. The
I'm looking for an XSD Documentation Generator for .NET. Please, provide any references. Note:
I found this orientation test code below looking for JQTouch reference material. This works
I'm looking for a good reference on large scale data mining with Clojure I
I am looking to include a reference to a non-elisp file (a small Python
I'm looking for a boo syntax sheet/reference card. A quick search on google and
I was looking in the javascript reference manual on the indexOf page at developer.mozilla.org
I've been looking around here for any reference to a java library for visual

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.