Name |
Description |
Every C and C++ program must have a program-startup function.
| |
Three parameters (arguments) are passed to main by the CodeGear C++Builder startup routine: argc, argv, and env.
| |
BCC32.EXE is the command-line compiler. The default libraries used with this compiler are C0W32.OBJ (startup code), CW32.LIB (static single-threaded runtime library), and IMPORT32.LIB (import library for Win32). | |
The dynamic-link library (DLL) versions of the runtime library are contained in the BIN subdirectory of your installation. These are listed below indicating whether they are multithreaded. Directory: BIN | |
Win32 programs can create more than one thread of execution. If your program creates multiple threads, and these threads also use the C++ runtime library, you must use the CW32MT.LIB or CW32MTI library instead. The multithread libraries provide the following functions which you use to create threads:
When you compile or link a... more | |
If your program uses the exec or spawn functions to create a new process, the new process will normally inherit all of the open file handles created by the original process. Some information, however, about these handles will be lost, including the access mode used to open the file. For example, if your program opens a file for read-only access in binary mode, and then spawns a child process, the child process might corrupt the file by writing to it, or by reading from it in text mode. To allow child processes to inherit such information about open files, you... more | |
Listed below is each of the C++Builder static library names and its use. Directory of BCB\LIB (LIB files) | |
The value returned by main is the status code of the program; it must be an int. If, however, your program uses the routine exit (or _exit) to terminate, the value returned by main is the argument passed to the call to exit (or to _exit). For example, if your program contains the call | |
If you compile your program using Pascal calling conventions, you must remember to explicitly declare main as a C type. Do this with the __cdecl keyword, like this: | |
Command-line arguments containing wildcard characters can be expanded to all the matching file names, much the same way DOS expands wildcards when used with commands like COPY. All you have to do to get wildcard expansion is to link your program with the WILDARGS.OBJ object file, which is included with CodeGear C++. Note: Wildcard arguments are used only in console-mode applications. Once WILDARGS.OBJ is linked into your program code, you can send wildcard arguments (such as *.* ) to your main function. The argument will be expanded (in the argv array) to all files matching the wildcard mask. The maximum... more |
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|