int GetFullPathFromProject (char fileName[], char fullPathName[]);
Gets the full pathname for the file you specify, if the file is in the currently loaded project.
You can use GetFullPathFromProject when your program needs to access a file in the project and you do not know what directory the file is in.
In a stand-alone executable, GetFullPathFromProject assumes that the file is in the same directory as the executable file.
char *fileName;
char fullPath[MAX_PATHNAME_LEN];
fileName = "myfile.c";
if (GetFullPathFromProject (fileName, fullPath) < 0)
FmtOut ("File %s is not in the project\n", fileName);
![]() |
Note LabWindows/CVI does not report run-time errors for GetFullPathFromProject. |
Input | ||
Name | Type | Description |
fileName | string | The name of a file that is in the currently loaded project. The name must be a simple filename and should not contain any directory paths. For example, file.c is a simple filename, whereas dir\file.c is not. |
Output | ||
Name | Type | Description |
fullPathName | string | Full pathname of the file. fullPathName must be at least MAX_PATHNAME_LEN bytes long. |
Name | Type | Description | ||||||
result | integer | The result of the call.
|