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 7982895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T10:48:30+00:00 2026-06-04T10:48:30+00:00

I’ve got an old legacy application for communicating via serial port to an embedded

  • 0

I’ve got an old legacy application for communicating via serial port to an embedded controller communications bus. that someone else developed.

The application is written in VB6, and is structured as two projects – a DLL to handle the connection and communications logic, with an application GUI project.

I was hoping to be able to write a new application GUI (in C++ ideally) to use the existing DLL as-is, but I’m having lots of problems working out how to import it.

So I’m wondering, is it even going to be possible to use this old DLL into a C++ project as is? or is it possible to import into a C# project? or a VB.NET project? (would prefer not to use VB, but can if I have to)

Where I am now:

I have the existing compiled executable and DLL, and these run on my system.

I also have the project files, and they’re all readable in notepad++ but I don’t have VB6, and importing the project into visual studio VB.NET 2008 express isn’t at all straightforward. Especially not without a working example to dig through and play with first (DLL project may be importable, but has 50+ things indicated as needing changing in the upgrade report. It also seems to be ignoring three .cls files that look very important to my not particularly VB6-savvy eyes… The application project has a message in the upgrade report about something “missing a design time license” and the only project files that actually seem to come into the project explorer for imported project is the project file itself, and the assembly info file.)

Most examples of how to import a DLL into VS C++ assume you have a solution with the DLL project all compiling nicely alongside your project that will use it. Or at least a .DLL and .lib and .h file… I spoke with the original developer of the code (in another city, we don’t work directly) and got a .lib to match my .dll, but still have no .h file.

I’m usually fine to bash through something new, but without a baseline working example of the project even in VB6 that I can get my understanding from, it makes this very hard. Also a lack of similar questions anywher google can find them on the net makes me wonder if this is something i should be even attempting.

I’m working on getting a non-express copy of visual studio if that will make any difference (express worked fine for everything up until now so I never needed anything more) but that will take a number of weeks, most likely.

Any suggestions would be very much appreciated.

thanks for reading!

  • 1 1 Answer
  • 0 Views
  • 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-06-04T10:48:31+00:00Added an answer on June 4, 2026 at 10:48 am

    I have to disclaim this as I have no experience doing it, but merely found that it should be possible given some reading of the docs on the subject.

    I’m not sure you’ll have much luck with the VB to .NET import/conversion process if there is a lot of low level stuff going on. The existing dll is likely a COM object, no?

    It seems like there is some MSDN documentation to get you started from C++ using COM object dlls – and it looks like the #import directive will generate some .h (header) files as well.

    http://msdn.microsoft.com/en-us/library/8etzzkb6.aspx

    So I would try simply adding an #import directive for it.

    #import "somelibrary.dll"

    and see what visual studio generates.

    Have a look at the following example as well, (copied shamelessly from another forum)

     #import "F:\proj\VB6\ActiveXDLL\VBTestDLL.dll"
     using namespace VBTestLib;
    
    void CDialogTestDlg::OnButton1() 
    {
    
     HRESULT hresult;
     CLSID clsid;
     _CTest *t; // a pointer to the CTest object
     _bstr_t bstrA = L"hello";
     _bstr_t bstrB = L" world"; 
     _bstr_t bstrR;
     ::CoInitialize(NULL);
      hresult=CLSIDFromProgID(OLESTR("VBTestLib.CTest"), &clsid);
      hresult= CoCreateInstance(clsid,NULL,CLSCTX_INPROC_SERVER,
                                   __uuidof(_CTest),(LPVOID*) &t);
      if(hresult == S_OK)
      {
         bstrR  = t->vbConcat(bstrA , bstrB);
         AfxMessageBox((char*)bstrR);
       }
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a string that has curly quotes in it. I'd like to replace
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I am doing a simple coin flipping experiment for class that involves flipping a
i got an object with contents of html markup in it, for example: string
I need a function that will clean a strings' special characters. I do NOT
I'm trying to create an if statement in PHP that prevents a single post

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.