The InitCVIRTE function is not listed in the NIDAQ function reference online help? Why? and where can I find a description of this function?

the InitCVIRTE function is not listed in the NIDAQ function reference online help? Why? and what does she do?and where can I find a description of this function? Can i use this function with visualc++ 6.0?

The InitCVIRTE function is in the CVI run time engine (cvirte.dll)..not part of NI-DAQ.
Applications written or using CVI may call this function..
How are you running into this ?
From the CVI help...
This function performs initialization of the CVI Run-Time Engine. It is needed only in executables or DLLs that are linked using an external compiler. Otherwise, it is harmless.
It should be called in your main, WinMain, or DllMain, function. The parameter values you should pass depend on which of these three functions you are calling InitCVIRTE from. The following examples show how to use InitCVIRTE in each case.
If you are using main, your code should be as follows.
int main (int argc, char *argv[])
if (InitCVIRTE (0, argv, 0) == 0)
return -1; /* out of memory */
/* your other code */
return 0;
If you are using WinMain, your code should be as follows.
int __stdcall WinMain (HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpszCmdLine,
int nCmdShow)
if (InitCVIRTE (hInstance, 0, 0) == 0)
return -1; /* out of memory */
/* your other code */
return 0;
If you are creating a DLL, you must call InitCVIRTE and CloseCVIRTE in your DllMain function, as in the following.
int __stdcall DllMain (void *hinstDLL, int fdwReason,
void *lpvReserved)
if (fdwReason == DLL_PROCESS_ATTACH)
if (InitCVIRTE (hinstDLL, 0, 0) == 0)
return 0; /* out of memory */
/* your other ATTACH code */
else if (fdwReason == DLL_PROCESS_DETACH)
/* your other DETACH code */
CloseCVIRTE ();
return 1;
NOTE: The prototype for InitCVIRTE is in cvirte.h, not
utility.h.
NOTE: In CVI 4.0.1, this function was expanded from one to
three parameters. Executables and DLLs that were
created using the one-parameter version of the function
will continue to work properly.
/*-------------------- Prototype ---------------------*/
int InitCVIRTE (void *HInstance, char *Argv[], void *Reserved);
Nandan Dharwadker
Staff Software Engineer
Measurement Studio Hardware Team

Similar Messages

Maybe you are looking for