Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

How does one use "fflattenpath"?

Hi,

I am programming a DLL for use with a Code Library VI.

One procedure in this DLL gets a LabVIEW Path as a parameter.

So far so good:

FNamePtr(path, strptr) gives the proper filename, etc. FExists(path) reports the file exists, and is a file, as expected.

However: I need the full path and filename written to a conventional C-string, so that this can be passed to another function.

I think FFlattenPath() is meant to do this, but it does not work.

I have:

...
fprintf(file, "len = %d\n", FFlattenPath(filepath, 0));
FFlattenPath(filepath, filenameP);
PToCStr(filenameP, filenameC);
fprintf(file, "file = %s\n", filenameC);
...

Two problems:

- the debugging text "len = %d" does not show the correct length
.

- the filename written to the debug file is also very incorrect.

How is one supposed to use this function?

Thanks,

Kevin
0 Kudos
Message 1 of 1
(2,920 Views)