?
Solved

Help referencing a 32-bit DLL in a 64-bit application

Posted on 2016-09-12
2
Medium Priority
?
27 Views
Last Modified: 2016-10-01
Hello,

This is my first post on this forum. If I have not followed any standard etiquette or need to provide more information, please advise.

I have a Microsoft Project Add-In written in VB.NET (Visual Studio 2015) that I would like to make compatible with both the 32-bit and 64-bit environments of MS Project (2010+). The add-in would work in both, except we are referencing a custom, legacy DLL written in VB6 that is not compatible with the 64-bit Project environment.

We attempt to access this VB6 DLL's functionality by creating an object of it in the VB.NET code using the CreateObject() function. This results in 'Runtime Error (429): ActiveX can't create component' error in the 64-bit environment. It works fine for 32-bit.

Is there any way to create my object reference to this VB6 DLL without upgrading the legacy code to VB.NET?

Thank you for your time.
0
Comment
Question by:Christopher Baugh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 63

Accepted Solution

by:
Fernando Soto earned 2000 total points (awarded by participants)
ID: 41794517
To your statement, " I would like to make compatible with both the 32-bit and 64-bit environments of MS Project (2010+).", the best way to get this to work is to compile the .Net application for a 32 bit platform / x86. In this way it will run on both 32 bit and 64 bit, on a 64 bit system in will run in WOW64 which is part of the operating system. The next best option would be to rewrite the 32 bit dll to 64 bit. The last option would be a com object for the 32 bit dll and and modify the code in the .Net application to access the dll through IPC, Inter Process Communication, to access the dll functions. if you take this route please read this article Accessing 32-bit DLLs from 64-bit code.
0
 
LVL 63

Expert Comment

by:Fernando Soto
ID: 41824632
I gave three possible solutions to the question.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

764 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