Solved

COM Error when loading compiled program on other machines

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

Industry Leaders: 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

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
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.

679 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