LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PDA dlls and External Code Calling

Hello,

I have created a VI with LabView 8.0 and I now want to run it on Pocket PC 2003 (having the LabView PDA Module). My VI contains two dlls. I want to know in what way I can “pass” these dlls into Pocket PC, so that the Pocket PC Device VI that I create can detect them in the PDA device and run properly.

How can I transform the WINDOWS dlls into PDA dlls?

I am really not familiar with dlls or .lib files, so if there is need of creating any of these please be as thorough as possible.

A step by step approach of the process would be greatly appreciated.

Thank you in advance for your time.

Panagiotis Tsapralis

0 Kudos
Message 1 of 6
(3,964 Views)
Hi Panagiotis,
 
Generally speaking, you are able to call DLL's from LabVIEW PDA after your application has been downloaded to the device. However, your description is a little vague. A Windows DLL will not run on a PDA without modification -- you will have to recompile it. This could be a significant roadblock if you do not have the source code. You also have to consider what the DLL is doing. Is it a driver of some kind? Is it making any Windows-specific (SDK) function calls? We have to be careful because not everything may be supported on PocketPC 2003 -- it a completely different operating system altogether.
 
There is a knowledgebase article on our website that describes the process, provided you have a DLL built for PocketPC 2003:
 
How To Call External Code in LabVIEW PDA for Pocket PC?
 
If you have to build the DLL yourself, you will likely have to use embedded Visual C++ -- something that I am not familiar with. If this is the case, you might start here:
 
 
To answer your other question: A dll is a dyanamic link library, which means (essentially) that it is compiled code that can be called dynamically from any application. The .lib is an import library, which basically allows LVPDA to *know* what functions are available in the DLL.
 
I hope this helps get you started -- good luck!
Charlie S.

Visit ni.com/gettingstarted for step-by-step help in setting up your system
0 Kudos
Message 2 of 6
(3,947 Views)
Hello Charlie S.
Thank you for your reply. I was mostly interested into using DLLs that already exist into the Windows Registry (and elsewhere), without having to know their source code. Visual C++ is out of my knowledge, so that I couldn't build the DLLs myself for the moment. I was hoping there would be a way to "transform" Windows DLLs without having to build them all over again.
Your reply helped me clear things out in my mind and I greatly appreciate that. Thank you once again.
 
Sincerely,
Panagiotis Tsapralis
 
P.S. Is there a chance that there are ready DLLs build for PDA operating system, available anywhere online???
Or at least some DLLs that I can have access to their source code, so that I can then recompile them myself.
0 Kudos
Message 3 of 6
(3,903 Views)
Hi Panagiotis,
 
I think your best option in this situation is to use calls to the PocketPC 2003 SDK. You have to download this anyway to use the LabVIEW PDA module. You can find links for everything you need to download here:
 
 
The SDK includes a function reference. Once you've completed the installation, go to Start >> Programs >> Microsoft PocketPC 2003 SDK >> Pocket PC 2003 Help. You may also find the Developer Resources useful:
 
 
Have a great weekend!
Charlie S.

Visit ni.com/gettingstarted for step-by-step help in setting up your system
0 Kudos
Message 4 of 6
(3,884 Views)


@Charlie S. wrote:
 
I think your best option in this situation is to use calls to the PocketPC 2003 SDK.

Is this an option?

I was under the impression that you have to have the source code (or, at the very least, a properly built stub) or your application won't work (something which actually kind of defeates the purpose of a DLL, which is supposed to be a precompiled source of functionality, and which I suspect is required because LV PDA converts its code into C before compiling).

I remember trying to use a windows API function once (I believe it was GetCursorPos, in 7.0, before the mouse down event was supported) and it worked for me on the emulator (using the function from one of the coredll.dll files found on the PC), but it either wouldn't compile or wouldn't work on the PDA itself, I don't remember which.


___________________
Try to take over the world!
0 Kudos
Message 5 of 6
(3,874 Views)
Hello all,
 
tst is correct -- I over-simplified in my previous post. Thanks for bringing this up! You must have a stub DLL in order to properly configure the call library function node. The shipping example for the PDA module also includes a wrapper DLL that is compiled for PocketPC 2003. While you *may* be able to make SDK calls without doing this, the stub/wrapper method is what we recommend. The reason is that *.lib requirement when compiling the C code from the VI. You don't have to have the SDK source code itself -- you just need to be able to include a header file for your wrapper DLL. You can read more about it here:
 
 
Sorry for the confusio!
Charlie S.

Visit ni.com/gettingstarted for step-by-step help in setting up your system
0 Kudos
Message 6 of 6
(3,821 Views)