LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how do i use a system dll when i am building an application with out includin it

i have an program that can edit/create odbc data set names through the odbccp32.dll and uses the kernel32.dll to read the last error. when i originally built it, the files were installed in the data directory. when i ran it i got errors, it was trying to access the dlls it installed and not the system ones. i then changed the installer so those two dlls were installed in the real directories. the odbc dll worked but it tried to over write the kernel. my question is how can i set up my application so that it will look at the dlls already installed by the operating system and not try to install it's own copies?
0 Kudos
Message 1 of 3
(2,567 Views)
Hi Shawn,

This has happened to me as well. I think you need to make sure that the
directory the dlls are in are included in the PATH environment variable for
the target system.

Also, in the source code, you need to make sure that the "Library Name or
Path" control of the Call Library Function has only the name of the DLL, not
the whole path. I cannot remember how I achieved this, maybe NI has some
answers.

Hope this helps...

"ShawnE" wrote in message
news:50650000000800000043750000-1042324653000@exchange.ni.com...
> i have an program that can edit/create odbc data set names through the
> odbccp32.dll and uses the kernel32.dll to read the last error. when i
> originally built it, the files were installed in the data directory.
> when i ran it
i got errors, it was trying to access the dlls it
> installed and not the system ones. i then changed the installer so
> those two dlls were installed in the real directories. the odbc dll
> worked but it tried to over write the kernel. my question is how can i
> set up my application so that it will look at the dlls already
> installed by the operating system and not try to install it's own
> copies?
0 Kudos
Message 2 of 3
(2,567 Views)
I could not find a way to prevent LabVIEW from including the dlls. If you are distributing the executable, I recommend creating an installer and running a batch file afterwards to delete the dlls. The following link is for running multiple installers but it shows you how to create a batch file. You will need to edit the batch file for delecting rather than running another msi.

http://digital.ni.com/public.nsf/websearch/9564f80c4debc4508625656900661050

http://digital.ni.com/public.nsf/websearch/A4B55CA4CAE930D1C1256C09007928E6?OpenDocument

http://digital.ni.com/public.nsf/websearch/E09BA0E2F31D304F86256A640070058E?OpenDocument
0 Kudos
Message 3 of 3
(2,567 Views)