?
Solved

COM Error when loading compiled program on other machines

Posted on 2008-11-02
5
Medium Priority
?
1,492 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
[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
  • 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 1000 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

Linux Academy Android App Now Supports Chromecast

We have some fantastic news for our Android fans. We’re so excited to announce that the Linux Academy Android app is now available with Chromecast support. That’s right – simply download the latest update of the Linux Academy App and start casting your favorite course videos!

Question has a verified solution.

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

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…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
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 synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
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