Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 2.0 and Visual Studio. 2005 > Visual Studio 2005
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Visual Studio 2005 For discussing Visual Studio 2005. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Studio 2005 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old April 28th, 2010, 12:37 PM
Registered User
 
Join Date: Apr 2010
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
Default Installing DLL in Visual Studio 2005 - help!

I have such a simple question, I am ashamed to ask it. I have a large program written in VB Net Framework 2.0, and it needs to interface with a couple of Keyence distance sensors. I have been given the required software, which I am sure actually works, because somebody installed it on a previous computer that has been stolen, and it worked there. The files I have received are named

lkif.dll
lkif.h
lkif.lib

I suppose that should be enough.The program (parts of which I received previously) contains function calls like

Public Declare Function LKIF_DataStorageInit Lib "Lkif.dll" () As Integer

My question is: where should I put these three files, and how do I connect the program to them, so that the function calls work? It worked before, but damifIknow how to do it myself. Please help an old man who is a newbie!
Reply With Quote
  #2 (permalink)  
Old April 28th, 2010, 02:03 PM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,190
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hello...

throwing them on the same folder as the exe didn't work???
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
Reply With Quote
  #3 (permalink)  
Old April 30th, 2010, 07:04 AM
Registered User
 
Join Date: Apr 2010
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
Default I haven't even tried that...

... because I am just debugging at the moment. Surely it is possible to link them up in debug mode?
Reply With Quote
  #4 (permalink)  
Old April 30th, 2010, 07:06 AM
Registered User
 
Join Date: Apr 2010
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
Default And anyway...

... I cannot even add a reference to LKif.dll into the VS solution, because it is objected to as not being the correct format. Which didn't happen before. I really think that the .h file and the .lib file are not getting correlated, somehow.
Reply With Quote
  #5 (permalink)  
Old April 30th, 2010, 08:59 AM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,190
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Well, if the original program use a declare, It's probably because you can´t use a direct reference to it...
I will ask again, if you let the files in the same folder as the exe, it didn't work??? debug or release is the same, the two of them build and exe, only that in differents folders...
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
Reply With Quote
The Following User Says Thank You to gbianchi For This Useful Post:
Thomas Goodey (April 30th, 2010)
  #6 (permalink)  
Old April 30th, 2010, 12:34 PM
Registered User
 
Join Date: Apr 2010
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
Default Thank you so much!

Thank you so much! yes, it has worked. I still don't really understand the mechanism, but it has worked. I guess that the dll just has to be on the path. I am a bit confused as to what is happening at compile time and what at run time, but the most important thing is, it is working! Thanks again!
Reply With Quote
  #7 (permalink)  
Old April 30th, 2010, 01:13 PM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,190
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Every exe looks for dll in a specific order.. The first path it looks for it is in the exe folder... It also look for it in the GAC (if it's a .net dll) and also in the system32 folder...

Since you are declaring them, there is no need to have it in at compile time. The compiler asume that your declare is enough to make it work...
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
Reply With Quote
  #8 (permalink)  
Old May 4th, 2010, 07:27 AM
Registered User
 
Join Date: Apr 2010
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
Default

But strangely enough, the first thing I did was to put the .dll (and the .h and the .lib) in the System32 directory, but that didn't work.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual studio 2005(32 bit) code not work in visual studio 2008 on windows server 2008 gr8.jain Visual Basic 2008 Essentials 1 August 31st, 2009 10:07 AM
Add reference to third party dll in microsoft visual studio 2005 sangeethashravani Visual Studio 2005 0 July 23rd, 2009 01:31 PM
Installing msxml in visual studio 2005 nilay.rathod Visual C++ 2005 0 February 15th, 2008 01:18 AM
installing sql server 2005 with visual studio lucycastaldo SQL Server 2005 2 April 23rd, 2007 06:46 PM
Visual Studio .net2003 and Visual Studio 2005 Gert Visual C++ 1 January 24th, 2006 04:10 AM



All times are GMT -4. The time now is 09:52 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.