CVP Restart Command (Dialog Version) Doesn't Properly Set argc

ID Number: Q48000

2.20 2.30 | 2.20 2.30

MS-DOS | OS/2

buglist2.20 buglist2.30 fixlist3.00

Summary:

When using the dialog version of the Restart command, you can restart

your program with command-line arguments; however, under CodeView

Protect (CVP) versions 2.2 and 2.3, argc does not get properly set.

Microsoft has confirmed this to be a problem with CodeView versions

2.2 and 2.3. This problem was corrected in CodeView version 3.0.

More Information:

The Dialog Restart command is often used to restart a program with

command-line arguments. For example, you could use the following:

L arg1 arg2 arg3

This example restarts the current executable file, retaining any

breakpoints, watchpoints, and tracepoints, with arg1, arg2, and arg3

loaded into argv[1], argv[2], and argv[3], respectively. Argv[0] is

always set to the name of the current executable file. Argc, at this

point, should be set to four. The problem presents itself here; argc

either remains unchanged from the value it was initially set to when

CodeView 2.2 or 2.3 was started, or is decremented by one. If, for

example, CodeView is started with two command-line arguments (argc

would then be set to three) and then executed, the previous example

argc (which should then set argc to four) would remain unchanged. When

using the Dialog Restart command and specifying fewer arguments than

were specified at start up, argc sometimes is decremented by one.

Additional reference words: 2.20 2.30 3.00