LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to programm dll using CVI?

SO are you saying recompile that function "DLLEXPORT" in my dll in c++ with that function, and  then call the function without "DLLEXPORT".

 

im a lil confuse on what you are telling me, i have three different people tell me three different things about this one function "DLLEXPORT".

 

now can some one break this down on what to do with this function.

0 Kudos
Message 11 of 19
(2,181 Views)
DLLEXPORT is a macro used in definitions and prototypes for functions to be exported.  Look at the cvitext.cws example projects that ship with CVI.  The workspace file cvitext.cws includes two projects: one is the DLL, the other the EXE that calls functions in the DLL.
0 Kudos
Message 12 of 19
(2,176 Views)
I have a question, can some tell me how to point to a certain path directory without copy and pasting the directory into the path.
0 Kudos
Message 13 of 19
(2,149 Views)
Sorry, but can you explain your question?  And explain what it has to do with the original subject of DLL's in CVI?
0 Kudos
Message 14 of 19
(2,144 Views)

let me start a new forum, basically dealing with Com objects, so basically im interfacing with another file which is a .lib file. and its not in the path directory.

 

now dont get me wrong to fix all i have to do put everything in the path . I know that way very well, but my question is instead of  doing that way, how can i 

 

just point to the directory that its in. is there a way? if so? can you show me.

0 Kudos
Message 15 of 19
(2,142 Views)
Your .LIB file does not need to be in your project directory.  When you add the .LIB file to your project, (Edit >> Add Files to Project >> Library (*.lib)...), just browse to wherever the .LIB file is.  If the .LIB file already exists in your project, but you want to get it from a different path, you can right-click on the file in your project file list, and select Replace File in Project, then browse to whatever path you need.
0 Kudos
Message 16 of 19
(2,136 Views)
i know that, im talking from a c++ point of view, without grabbing the lib from the current path, i just want to point to the path and open it up
0 Kudos
Message 17 of 19
(2,132 Views)

i assume you are talking about loading a dll when launching an application.

 

if the dll is linked statically into your software you just can't: it is the job of the OS to load the dll, and the only way for it to do so is when the dll is in the path or in the current directory.

 

now, you can load the dll dynamically using the LoadLibrary() function. this way you can tell the software where it should look to find the dll, but it is at least twice the work. this is usefull when writing a plug-in system.

 

also, please use the right wording: a COM object do never need to be in the path. when installing a COM object on a system, you have to register it (using regsvr32 for example): this writes its path into the registry, and since you access the COM object by GUID, the system takes care of finding the object from the path in the registry.

 

 

0 Kudos
Message 18 of 19
(2,117 Views)

I found out how to do it, I pass the regsiter part along time ago. what was i had to go to my computer and right click and go to preference, and then go to advanced

 

 and then go to environment variables andthe path or directory, that way the path i want to open up or get to it will automatically go to, without me copy and pasting and 

 

putting it in the directory

0 Kudos
Message 19 of 19
(2,105 Views)