Solved

COM Error when loading compiled program on other machines

Posted on 2008-11-02
5
1,478 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

760 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

22 Experts available now in Live!

Get 1:1 Help Now