Visual Studio 2005For 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 .
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!
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.
================================================== =========
... 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.
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.
================================================== =========
The Following User Says Thank You to gbianchi For This Useful Post:
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!
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.
================================================== =========