LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What is a stub?

Howdy,

I am trying to use a .dll in a PDA program written in LabVIEW 7.1 PDA. The program works fine in Windows, but when I try to build for PDA, I get the "xxx is a missing VI or .C file." According to some of the previous discussions, I have to build a stub dll, but I do not know what this is or how to make it. I did not make the .dll file I am using, someone else did.

Can anybody explain or show me a document that can explain the "stub dll"?

Thanks for any help!

- Greg
0 Kudos
Message 1 of 6
(6,891 Views)
I haven't had any experience with calling DLLs in the PDA module (luckily), but I believe in this case the stub is a dummy DLL which only has the names (and definitions?) of the functions the real DLL has, but without any real code. If I remember correctly, this was supposed to allow LV (or C, because I think [no way of knowing] that LV PDA actually translates your code into C code and then compiles it) to be able to link the DLLs properly. I would try looking at the documentation for the module (click Support on the top of the page and then Manuals or search for PDA).

___________________
Try to take over the world!
0 Kudos
Message 2 of 6
(6,875 Views)

I haven't created code that uses dlls in a PDA, but we do have a couple of great resources that tell all about it in the links below. I added them both for Pocket PC and Palm OS since I don't know what your using. Hope this helps.

How To Call External Code in LabVIEW PDA for Pocket PC?

How To Call External Code in LabVIEW PDA for Palm OS

Tyler H.

National Instruments

0 Kudos
Message 3 of 6
(6,843 Views)
Ok, this kind of helps... or at least points me in the right direction. It says I need 4 files
1. a LabVIEW VI - got it
2. a Windows stub dll - don't got it (still uncertain as to what this is, or how its different from my main VI calling a library function)
3. a .dll file built for Pocket PC - don't got it (the dll I have is built for Windows)
4. the .c file the dll was built from - got it (but its a .cpp file)

The major problem here is I've never created a .dll file for PDA before, and I have not yet successfully compiled a PDA program with MS eMbedded CV++ tools. I'm going over the example PPCBatt VI right now, but its clear as mud at the moment.

Can anybody help me out here? If I send my .dll and .cpp file, would anyone like to help? This is kinda urgent, so any assistance would be greatly appreciated!

- Greg
0 Kudos
Message 4 of 6
(6,817 Views)
I worked with Embedded C++ years ago, but I don't remember the details.  I can say that you have to compile the .cpp file using Embedded C++ to create the PDA DLL.  When compiling, you have to choose the target.  These are the details I don't remember, but one particular screen will give you a choice of compiling to a simulator or a certain device, like PocketPC 2000.  There is another screen with a bunch of tabs that offer many options and choices, like where to put the DLL on the PDA (which directory), what include files to use (.H files and such), and other options.  I learned it once by looking at examples and playing around with it.  There is no good information on MS website on how to use Embedded C++, so good luck.  I wish I could be of more help.
Wait, I just found some info in some old notes.  See if you can make sense of these:
 
Workfile is a .vcw file.  Open it with Embedded Visual C++.  Make sure tool bar selections are:  System Info | PocketPC2002 | Win32(WCE ARM)Release | PocketPC2002(Default Device)
From Embedded Studio, on Build:  All programs are compiled, linked, then downloaded to device.
When installing SDK tools for PocketPC, had to change security for folder "C:\Windows CE Tools" to allow everyone full control, otherwise install procedure could not write to folder, even when logged in as administrator.
To switch between debug and release builds:  Menu Bar: Build - Set Active Configuration,  Select Win32Debug or Win32Release.
Project settings: c/c++ optimizations=Disable(Debug),  c/c++ Debug Info=Prog.Database for Edit & Control,  Link catagory=Debug, Debug Info in MSformat.
 
Sorry, this is all I could find.  Good luck.
- tbob

Inventor of the WORM Global
0 Kudos
Message 5 of 6
(6,796 Views)

Hi Greg,

I am facing the same problem as u had faced for calling an external dll in labview PDA. Hope your problem must have been solved til now.

I would appreciate, if you could help solving out the same.

I have a HP iPAQ 2490 PDA with a USB Host CFU1U card inserted in the CF slot of the PDA to incorporate USB Host functionality in the PDA. I have a sensor which sends out USB data. I have a Pocket PC dll for the sensor but I dont know how to write a stub dll for it and also I dont have the cpp file/lib file from which the sensor dll is created. SO, I would first like to know how to write a stub dll for the sesnor dll and how to integrate that dll with labview and communicate with the sensor.

Please help me.

Thanks,

Alifiya

 

 

 

 

 

0 Kudos
Message 6 of 6
(6,109 Views)