The error message is "Labview has encountered an inconvenience and needs to close".
I've had my eyes in the manual for several days now. My problem is the lack of bridges from ordinary C types to the LabView types. Sometimes I can't even find what the types are made of (eg, uChar or UPrt), and sometimes I can't write into LabView Structures because typically they are:
typedef LVlist{
int32 length;
basic_type content[1];
}
and I cannot assign a pointer to "content" because the compiler tells me "cannot assign array".
I work in XP home with LabWindows.
I do heavy signal computations in C and am trying to write the result in a file, the file name depends on time so I compute it in a C string. But the ordinary C file writing functions stop working when I turn my program into a CIN (they do as executable, but fopen() returns NULL in a CIN). That's why I am calling LabView functions as the back end.
I also tried the following:
CToPStr(pfilename,pformatted);
pathToCreate = FMakePath(NULL, fRelPath, pformatted, NULL);
myUptr = (UPtr) malloc(200);
printf("%d\n", FFlattenPath(pathToCreate, myUptr));
printf("%s\n", myUptr);
if (err = FCreate(&fileDescriptor, pathToCreate, PERMISSIONS, openReadWrite, denyNeither, NULL))
goto out;
besides the fact that Im not sure what UPtr is, I should print what was in pfilename.
But instead I get a wrong length for the flattened path, a meaningless string for the content,
and the FCreate creates a LabView error of execution inside the CIN (but does not crash LabView as the other error did).
So either way, I need a way to create a file whose name I have in a C string... can you help?