02-28-2005 05:46 PM
06-21-2005 05:53 AM
@bobby wrote:
Hello Everybody,
I want to use a LAbView Application as Dll in a Console Application.
There is an Example Available (DLL_Example.zip)in (Displaying the Front Panel of a LabVIEW-Built DLL Function)
When I use this Example in a Windows Console Application, it Works fine (It is important for me, to see the LV Window!)
Code example:
/***********************************************************/
/* Example Start *******************************************/
/***********************************************************/
int main(int argc, char* argv[])
{
double Y = 4;
double X = 5;
double Result = 0;
SimpleCalculator(1, Y, X, &Result);
printf("Result = %f", Result);
return 0;
}
/***********************************************************/
/* Example Stop *******************************************/
/***********************************************************/
When I use the function "SimpleCalculator" in a Thread, the LabView Window never appear, what's wrong?
Code example:
/***********************************************************/
/* Example Start *******************************************/
/***********************************************************/
DWORD WINAPI LVThread(LPVOID lpParameter)
{
double Y = 4;
double X = 5;
double Result = 0;
SimpleCalculator(1, Y, X, &Result);
printf("Result = %f", Result);
return 0;
}
int main(int argc, char* argv[])
{
DWORD ThreadID;
CreateThread(NULL,0,LVThread, NULL, 0, &ThreadID);
getchar();
return 0;
}
/***********************************************************/
/* Example Stop *******************************************/
/***********************************************************/
I'm using Microsoft Visual Studio 6.0. and LabView 7.0
Thanks for every help.