LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to build exe file with enable custom dll?

I create a custom dll by VB 6.0. then I use ActiveX->Automation Open to use the dll I create in VB 6.0, and it works fine in edit mode.
But When I build my project into exe file, some error occur but it don't show up.
So I don't know how can I do about it?
http://www.vitst.com
Virry Test & Control
LabVIEW Certified Developer
0 Kudos
Message 1 of 6
(4,121 Views)
Have you added the .dll as a "support file" when you build the executable? This should place it in the same directory as the .exe itself.

The following link is a good resource for what you are trying to do.
Using External Code with LabVIEW

regards,
Brett
0 Kudos
Message 2 of 6
(4,108 Views)
/*Have you added the .dll as a "support file" when you build the executable? This should place it in the same directory as the .exe itself.

The following link is a good resource for what you are trying to do.
Using External Code with LabVIEW

regards,
Brett */

Thanks for you reply,Brett.
I have added the *.dll file in support file when I build the exe. and I also place it in the same directory and C:/Windows/System32/.

the link you mentioned above I'v seen. But it seems that it is not the type I want to solve.
My type is like this
http://www.vitst.com
Virry Test & Control
LabVIEW Certified Developer
0 Kudos
Message 3 of 6
(4,097 Views)
Your problem is more likely that you try to run your executable on a different computer. Active X needs information in the registry as tho where it can find the Active X server (DLL) when an application (here LabVIEW) asks for it. For this you need to register the Active X DLL on every single computer you want to use it. Visual Basic most probably does this for you on your development machine whenever you create such a DLL, but when you move the DLL to another computer it must be registered. You can do that manually by typing on the command line:

"regsvr32 "

For professional application installation you usually create an installer or installer module through some utility such as Install Shield in which you can configure that the particular DLL needs also to be registered when copied to a new system.

Rolf Kalbermatter

Message Edited by rolfk on 06-30-2005 02:27 AM

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 4 of 6
(4,094 Views)
/*Your problem is more likely that you try to run your executable on a different computer. Active X needs information in the registry as tho where it can find the Active X server (DLL) when an application (here LabVIEW) asks for it. For this you need to register the Active X DLL on every single computer you want to use it. Visual Basic most probably does this for you on your development machine whenever you create such a DLL, but when you move the DLL to another computer it must be registered. You can do that manually by typing on the command line:

"regsvr32 "

For professional application installation you usually create an installer or installer module through some utility such as Install Shield in which you can configure that the particular DLL needs also to be registered when copied to a new system.

Rolf Kalbermatter*/

Firstly Thanks for you help,rolfk.

I have use the command line

"regsvr32 Mydll.dll"

I use LabVIEW Build Application or Shared Library(DLL) to create installer,installer settings->
Advanced...->Selected "Run executable after installation" and Executable"regsvr32", Command line arguments"Mydll.dll"
Files...->Add File...(add the file Mydll.dll) selected create program item, Installation destination Windows Directory Install destination Subdirectory"System32", I think the dll file should put into this directory.
I have done these, but it doesn't work when I install the program in others computer.

Did I miss somethings?
Thx again.
http://www.vitst.com
Virry Test & Control
LabVIEW Certified Developer
0 Kudos
Message 5 of 6
(4,084 Views)

@skywalkerxp wrote:

I have use the command line

"regsvr32 Mydll.dll"

I use LabVIEW Build Application or Shared Library(DLL) to create installer,installer settings->
Advanced...->Selected "Run executable after installation" and Executable"regsvr32", Command line arguments"Mydll.dll"
Files...->Add File...(add the file Mydll.dll) selected create program item, Installation destination Windows Directory Install destination Subdirectory"System32", I think the dll file should put into this directory.
I have done these, but it doesn't work when I install the program in others computer.

Did I miss somethings?
Thx again.




Any Visual Basic DLL will only be able to be intialized if the appropriate Visual Basic runtime system is installed as well on the target system. In order to register the DLL regsrv32 does call a special function in your DLL but in order for this function to be called the DLL has to be loaded and that requires the DLL to be intialized, which requires the Visual Basic runtime system to be present on the machine.

You should really dig into your Visual Basic documentation, where it should hopefully tell you what you have to do to distribute an Active X DLL to different computers and expect it to not tell you about how to install on computers with an older Windows system than the one which was actual when your Visual Basic version was released.

Rolf Kalbermatter

Message Edited by rolfk on 06-30-2005 04:28 AM

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 6 of 6
(4,086 Views)