Solved

COM Error when loading compiled program on other machines

Posted on 2008-11-02
5
1,486 Views
Last Modified: 2013-12-17
Im using the SDK for the DYMO Label printer, what ive noticed is that when I build a project and then install it on a different machine, it will load correctly but when I start the program I get an error: REtriving COM Class factory for component with CLSID {09DAFAE2-8EB0-11D@-8E5D-00A02415E90F} failed due to the foolowing registry error 80040154.

When I load the DYMO hardware drivers on the same machine the error goes away, however some users may not have a DYMO printer and thus I need it to work without the drivers

Can anyone suggest anything?
0
Comment
Question by:cmdolcet
  • 3
  • 2
5 Comments
 
LVL 41

Expert Comment

by:graye
ID: 22861561
So, that means you'll need to dynamically load the DLL after you've determined if the client PC has the drivers installed.
There are several examples on the Internet, here is a simple one:  http://blogs.msdn.com/jonathanswift/archive/2006/10/03/Dynamically-calling-an-unmanaged-dll-from-.NET-_2800_C_23002900_.aspx
0
 

Author Comment

by:cmdolcet
ID: 22866726
Cant I just embed the .dll inside the compiled program?
0
 
LVL 41

Expert Comment

by:graye
ID: 22868834
Well, I was assuming that there was a lot of dependencies between the DLL and the "drivers".    So, including the DLL in the assembly (either as a discrete DLL or embedded) might not do the trick.
I'd recommend a quick test where you just alter the "Copy Local" property of the DLL in the References section to see
0
 

Author Comment

by:cmdolcet
ID: 22879363
How do I do that?
0
 
LVL 41

Accepted Solution

by:
graye earned 250 total points
ID: 22880771
By going to the Reference "folder" in the Solution Explorer (typically in the upper right-hand corner, navigating to the reference in question, doing a right-click to get to the properties, then changing the Copy Local property to True
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

Suggested Solutions

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

828 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