05-03-2008 12:48 AM
05-03-2008 02:23 AM
05-04-2008 02:41 AM
05-04-2008 03:05 AM
I have seen the structure it is in the folowing link http://www.eggntomatto.com/techforum/viewforum.php?f=2 now with this how to create LabVIEW supported DLL.
Bear me for asking step by step procedure.
Thanks
05-04-2008 03:55 AM
Hi MSS,
The first 512+ bytes are no problem (assuming TCHAR is one byte), but what is SKYTEK_DEVICE_FILE? If it's a structure, then readFD and writeFD each need to be packed. "user" and "internal" are pointers (probably 4 bytes each) - do they need be valid when calling the DLL, or is it ok if they're NULL (0) ?
MSS, LabVIEW can allocate the memory for this data-structure and pass a handle to your DLL, but the pointers and File-Descriptors (if that's what they are) may need to be defined/valid first. Are you sure it's OK to pass zero for the pointers?
typedef struct SKYETEK_DEVICE
{
TCHAR friendly[64];
TCHAR type[64];
TCHAR address[256];
unsigned char asynchronous;
unsigned int major;
SKYETEK_DEVICE_FILE readFD;
SKYETEK_DEVICE_FILE writeFD;
void *user;
void *internal;
} SKYETEK_DEVICE, *LPSKYETEK_DEVICE;
05-04-2008 04:15 AM
Hi
Thanks for you quick reply
Yes I think SKYTEK_DEVICE_FILE ia a structure but I could not locate it in .h files. If it is a structure, packing the readFD and writeFD, how to do?
I am not sure passing zero to the pointers. But I can find it out and post it.
Are you working in skyetek?
Thanks
05-04-2008 09:10 AM - edited 05-04-2008 09:11 AM
If you can't find a typedef or define for SKYTEK_DEVICE_FILE anywhere your interface would not even be usable in a normal C compiler and therefore of course also not from within LabVIEW.
@MSS wrote:
Hi
Thanks for you quick reply
Yes I think SKYTEK_DEVICE_FILE ia a structure but I could not locate it in .h files. If it is a structure, packing the readFD and writeFD, how to do?
I am not sure passing zero to the pointers. But I can find it out and post it.
Are you working in skyetek?
Thanks
05-04-2008 11:01 AM
Thanks Mr. Rolfk for your advice.
Where could I get details about creating wrapper dll. is it easy to do. what are the things that I have to have to do that?
Regards
05-04-2008 02:28 PM
I'm afraid there is no ready made tutorial about wrapper DLLs because they differ greatly depending on the actual API you want to interface too. The first thing you will need is some good C programming knowledge. Without that it is obviously difficult to write a DLL but if you don't have that knowledge interfacing to such a DLL without wrapper is even harder.
@MSS wrote:
Thanks Mr. Rolfk for your advice.
Where could I get details about creating wrapper dll. is it easy to do. what are the things that I have to have to do that?
Regards
05-04-2008 05:52 PM
Hi MSS,
Did your hardware come with programming examples? If so, and they're in C, consider obtaining a C++ compiler (free.) Get the examples working in C, then you'll be in a good position to "wrap" the functionality in a DLL for LabVIEW. Once you know how to compile your examples, creating the DLL for LabVIEW will be a small step. RIght now, though, it sounds like you have some learning to do!
Cheers
MSS wrote:
Thanks Mr. Rolfk for your advice.
Where could I get details about creating wrapper dll. is it easy to do. what are the things that I have to have to do that?
Regards