3.37 DM_Initialize
Using this function DM-internal data structures are initialized. This function must be called exactly once before the application is started.
DM_Boolean DML_default DM_EXPORT DM_Initialize
(
int far *argc,
char far * far *argv,
DM_Options options
)
Parameters
<-> int far *argc
In this parameter a pointer is transferred to the number of command-line arguments. DM changes this parameter. It removes all arguments it can process in the following argument vector and reduces the number of arguments accordingly.
<-> char far * far *argv
Vector to the argument list. DM removes from this list all arguments it can process directly.
-> DM_Options options
Option |
Meaning |
---|---|
0 |
To set no option |
Sets a compatible behavior to the IDM versions before A.05.01.d for the Distributed Dialog Managers (DDM), enforcing an immediate termination on client and server side when a network, protocol or version error occurs. This means that except for local applications no more start and finish events will be triggered and AppFinish will not be called. Thus the option DMF_FatalNetErrors is applicable within the function AppMain of the client application as well as on the server side by recompiling startup.c (with the additional compiler define XXX_FATALNETERRORS) and relinking the server application This option is intended primarily for use cases where the use of the command line option -IDMfataneterrors is impossible. DMF_FatalNetErrors takes precedence over -IDMfatalneterrors. See Also Command line option -IDMfatalneterrors in chapter “Command Line Options” of manual “Development Environment” |
Return Value
TRUE |
DM has successfully executed the initialization. |
FALSE |
DM was unable to initialize its internal structures correctly. In this case the application should be canceled, because it cannot continue operating correctly. |
When calling this function you should keep in mind that all arguments which the application cannot process in the function have to be transferred. DM then removes the arguments it needs from this argument vector and passes the remaining vector on to the window system. The window system is also initialized with this function. This behavior enables the user to start the application with certain options designed for the relevant window system.
Example
Start of a standard main program:
int DML_c AppMain (argc, argv)
int argc;
char far * far *argv;
{
DM_ID dialogID;
/* Initializtion
if (!DM_Initialize (&argc, argv, 0))
return (1);