Solved

Including a DLL in VS2005 solution

Posted on 2007-12-06
12
325 Views
Last Modified: 2013-11-27
In my VS2005 solution, I was using someone else's project (I think it's a C++ project, I use c# myself).
I had to deploy his project to the PDA so that my solution can call his function.
But this makes deployment complicated.

So I tried including the dll produced by his project (instead of including the project) in my solution.
I set the dll Build Action property to Embedded Resource.
It compiles ok, but at runtime when I call the function, it throws an exception: Class not registered.

What is the best way of including this project/dll created by someone else?
I only have 4 hours to solve this.
Thanks in advance :-)
0
Comment
Question by:Hardi
[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
  • 7
  • 5
12 Comments
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20424791
add the dlll as a reference in the Project -> Add Reference option.
0
 
LVL 6

Author Comment

by:Hardi
ID: 20424819
yea thats what i did
but somehow i had to deploy this project manually from visual studio to the PDA to get it working
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20424877
don't declare the library as Embedded, just as Content
0
MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

 
LVL 6

Author Comment

by:Hardi
ID: 20424881
i think that was the default, didn't make any difference
0
 
LVL 6

Author Comment

by:Hardi
ID: 20424920
I'm sorry for the unclear question... +_+
Let me rephrase the problem:

I have a project.
I am using another project created by someone else, call this project B.
I include B.dll in my project, as I need to call FunctionB() from project B.

After I deployed my project successfully, at runtime when calling FunctionB() it throws exception "Class not registered"
To solve this problem, I have to open project B in Visual Studio, right click the project, click Deploy -> This deploys project B to the PDA.
After this my project would run smoothly in the PDA.

The problem is... for every new PDA, I have to open Visual Studio, open project B and click Deploy to that PDA.

Any solution to make things easier?
Thank you
0
 
LVL 6

Author Comment

by:Hardi
ID: 20424939
I tried making a CAB file for project B, so I can deploy to PDA without using Visual Studio.
But somehow it failed and couldn't produce the CAB file.
I'm not sure about this stuff, I have only successfully made 1 CAB file (installer) for another project in my life.
BRB
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20424986
does your dll contains a COM object, I think it is a problem of COM class registration.
0
 
LVL 6

Author Comment

by:Hardi
ID: 20425355
it might... i don't really understand this project it's a C++ project.
What should I do if its got a COM?
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20425374
you have to register it when donwloaded to the Pocket PC. Maybe you can ask the DLL author about this detail.
0
 
LVL 6

Author Comment

by:Hardi
ID: 20425604
The problem is he is gone. Otherwise I wouldn't need to post question here ^^
Anyway the time's up for me. I'll be back in January. I don't know what I should do with the points?
Thank you jaime for your assistance.
Perhaps could you perhaps tell me how to register it without having to use VS?
0
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 500 total points
ID: 20425646
have a look to this page discussion several alternatives about registering COM DLLs:
http://www.pocketpcdn.com/forum/viewtopic.php?t=3298
0
 
LVL 6

Author Comment

by:Hardi
ID: 20425664
alright cool i'll just accept it thank you
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP.NET data base connection 35 95
Excel Web Add-in Where is Visual Basic used 9 84
Difference between Leaflet and MapBox? 5 47
Need Help With GDI+ in VB.Net 8 43
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
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

751 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