KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q48000: CVP Restart Command (Dialog Version) Doesn’t Properly Set argc

Article: Q48000
Product(s): See article
Version(s): 2.20 2.30 | 2.20 2.30
Operating System(s): MS-DOS | OS/2
Keyword(s): ENDUSER | buglist2.20 buglist2.30 | mspl13_basic
Last Modified: 28-AUG-1989

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.20 and 2.30, argc does not get properly set.

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 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.

Microsoft has confirmed this to be a problem with CodeView Versions
2.20 and 2.30. We are researching this problem and will post new
information as it becomes available.

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.