National Instruments 320685D-01 Drums User Manual


 
Chapter 7 Creating and Distributing Standalone Executables and DLLs
©
National Instruments Corporation 7-19 LabWindows/CVI Programmer Reference Manual
Rules for Accessing Other Files
The functions for accessing files, such as fopen, OpenFile, SetFileAttrs, DeleteFile,
and so on, interpret relative pathnames as being relative to the current working directory.
Under Windows, the initial current working directory is normally the directory of the
executable. However, if a different directory exists in the Working Directory or Start In field
of the Properties dialog box for the executable, then it is the initial current working directory.
Under UNIX, the initial current working directory is the directory from which you invoke the
executable. You can create an absolute path for a file in the executable directory by using
GetProjectDir and MakePathname.
Error Checking in Your Standalone Executable or DLL
Usually, you enable debugging and the Break on Library Errors option while you develop
your application in LabWindows/CVI. With these features enabled, LabWindows/CVI checks
for programming errors in your source code. Consequently, you might have a tendency to
relax your own error checking.
When you create a standalone executable program or DLL, all your source modules are
compiled. Compiled modules always disable debugging and the Break on Library Errors
option, resulting in smaller and faster code. Thus, you must perform your own error checking
when you create a standalone executable program or DLL. Refer to Chapter 9, Checking for
Errors in LabWindows/CVI, for details about performing error checking in your code.
00ProRef.book : 06chap07.fm Page 19 Monday, March 9, 1998 3:23 PM