LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using ActiveX DLL in LV 6.1

Hello,

we are using Visual Basic 6 to proramm an ActiveX DLL as middle tier Database Access Component. In Labview we made a LLB for Database Access using the VB6 ActiveX Dll.
Everytime we modify (add or change) the Interface of the ActiveX DLL and recompile it with VB6 we have to adjust the Automation Refnums in Labview in every SubVI.
Is there an easier way to do this - or is it possible to automate this task ?

Thanks for your help

Michael
0 Kudos
Message 1 of 4
(2,590 Views)
Hi,

You can access the ActiveX dll as a dll is stead of an automation component.
This is a bit more complicated to program (but just a bit, since the dll has
known prototypes), but will resolve the problem.

Btw. The general idea behind COM is to be backwards compatible, are you sure
there isn't a way to give the new component the same name as the old? I
think there should be a way in VB to set the registry key named
'VersionIndependentProgID' to define this name.

Hope it helps,

Wiebe.


"leebmic" wrote in message
news:50650000000800000038480000-1019262487000@exchange.ni.com...
> Hello,
>
> we are using Visual Basic 6 to proramm an ActiveX DLL as middle tier
> Database Access Component. In Labview we made a LLB for Database
> Access usin
g the VB6 ActiveX Dll.
> Everytime we modify (add or change) the Interface of the ActiveX DLL
> and recompile it with VB6 we have to adjust the Automation Refnums in
> Labview in every SubVI.
> Is there an easier way to do this - or is it possible to automate this
> task ?
>
> Thanks for your help
>
> Michael
Message 2 of 4
(2,590 Views)
This behavior is irksome, but you can simplify the update of all of your
Automation Refnums after each VB recompile by creating one Automation Refnum
as a Strict Typedef control and using that as the reference in all your
sub-VI's. Then you simply update the single instance of the control - the
rest of the changes occur automatically via the Strict Typedef automatic
update link.

HTH.

"leebmic" wrote in message
news:50650000000800000038480000-1019262487000@exchange.ni.com...
> Hello,
>
> we are using Visual Basic 6 to proramm an ActiveX DLL as middle tier
> Database Access Component. In Labview we made a LLB for Database
> Access using the VB6 ActiveX Dll.
> Everytime we modify (add or change) the Interface of the ActiveX DLL
> and recompile it wit
h VB6 we have to adjust the Automation Refnums in
> Labview in every SubVI.
> Is there an easier way to do this - or is it possible to automate this
> task ?
>
> Thanks for your help
>
> Michael
0 Kudos
Message 3 of 4
(2,590 Views)
You need to change the Version Compatibility to Binary Compatibility. In this mode VB does not change the GUID ever time build the dll. If you make a change to the ActiveX dll, though, you will always need to remake the dll, however, if you use the above mode the executable should still reference the same GUID.
0 Kudos
Message 4 of 4
(2,590 Views)