Solved

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

Posted on 2016-09-12
2
20 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
  • 2
2 Comments
 
LVL 62

Accepted Solution

by:
Fernando Soto earned 500 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 62

Expert Comment

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

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Multiple file Upload asp.net 2 49
Exit the loop 4 42
VB 2005 how to get a new line of data each time I try to write to a file. 10 24
Disable extension 8 36
This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

813 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now