Jump to content

DLL written in LV called By LV (problems)


Recommended Posts

Trouble with LV DLL for Excel Read

Looking for examples of DLL's written in LabVIEW called by LabVIEW

I am writing an Excel toolkit and the problem of the differences between Excel97 and Excel2000 has become a major issue for a product I'm trying to sell. The background to the problem is that there are some differences between the methods exposed in the ActiveX interface in these two versions which means that the Build Application will not work if the methods are brought from a computer with one kind of Excel to build on another.

In trying to solve this problem I have encapsulated the ExcelRead into one routine and compiled it as a DLL. This seems to work OK if the vi that makes the DLL is open. This means that the DLL uses the source code of the VI, I can even highlight it! However if the source code is not open then it will not work. The routine goes through to the end. My approach is to make two calls to the DLL, the first to find the size of the string output and the second to make an input string of that length to be updated by the flattened string output. This works OK in development mode just fine.

The connections are made correctly since it works fine when the VI is in memory. There don't seem to be memory problems since LabVIEW continues after the DLL test returns a zero length. One thing I notice is that the Run Arrow indicates that the DLL VI is part of a program that is running, it's partly black. Maybe it's my first attempt at the DLL that is really running. What can I do to make sure that this unloads?

I'm not sure if what I'm trying to do is possible. My plan is to make two DLL's one for '97 and another for '2000 and depending on the version (8.xxx or Not 8) call the one or the other. My hope is that the DLL will go off and find its ActiveX partners and find its version specific methods.

For those interested I've uploaded a kit to Lava so you can play with this too. It's LV 7.0

Yours Sincerely

JohnDownload File:post-230-1143202301.zip

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.