#include #include #include /* Needed if linking in external compiler; harmless otherwise */ #include #include "vibwire.h" #include "vibwireui.h" #include "vibwireparam.h" int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow) { /* Declare variables */ char log_file[80]; FILE* file_ptr; struct vibwire_param_struct vibwire_param; /* Initialize all files */ strcpy(log_file, "testlog.ru1"); file_ptr = fopen(log_file, "w"); if (file_ptr == NULL) return 0; fclose(file_ptr); //mmm Why close the file you just opened? if (InitCVIRTE(hInstance, 0, 0) == 0) /* Needed if linking in external compiler; harmless otherwise */ return -1; /* out of memory */ SetStdioPort(CVI_STDIO_WINDOW); SetStdioWindowPosition(50 + 375 + 40, 50); SetStdioWindowSize(300, 325 + 25 + 250); vibwireparam_fill_param_struct(&vibwire_param); vibwire_init(log_file, vibwire_param); vibwireui_init(50, 50, vibwire_param); vibwireopui_init(50, 400); RunUserInterface(); return 0; }