03-26-2008 12:32 PM
double
__cdecl DMClockTestRoutine(LVRefNum *GPIBPort, LVRefNum *COMPort, char Command[], double DelayTime);How can I take the information from hComm which is defined at the end of the post and put pass it through a LVRefNum?
2) Do I need to install the LV runtime enviroment on PC's that will run this software?
Thanks, Robert.
HANDLE hComm
hComm = CreateFile(szCommPort,
GENERIC_READ | GENERIC_WRITE,
0,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL );
03-27-2008 02:48 AM
Hi Robert,
to point 2) yes you have to install the LV runtime engine on all PC´s that will run the program using this dll.
Mike
03-27-2008 04:07 AM
To 1) you basically can't. A LVRefnum is a LabVIEW private entity (in this case probably for both the GPIB and COM port really a VISA refnum) and only VISA functions can deal with that. As extra complication is the LabVIEW refnum really a LabVIEW internal wrapper around what you would get from the VISA refnum when using the C API for VISA.
@Hryniowski wrote:I'm trying to change an existing .exe written in C++ to use some LV code I have but I have two questions.1) When I compile the LV .dll and put it into the C++ code I getdouble __cdecl DMClockTestRoutine(LVRefNum *GPIBPort, LVRefNum *COMPort, char Command[], double DelayTime);
How can I take the information from hComm which is defined at the end of the post and put pass it through a LVRefNum?
2) Do I need to install the LV runtime enviroment on PC's that will run this software?
Thanks, Robert.
HANDLE hComm
hComm = CreateFile(szCommPort,
GENERIC_READ | GENERIC_WRITE,
0,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL );