KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q37772: BASIC Example to Call OS/2 Function DosSetVerify, DosQVerify

Article: Q37772
Product(s): See article
Version(s): 6.00 6.00b 7.00
Operating System(s): OS/2
Keyword(s): ENDUSER | | mspl13_basic
Last Modified: 1-FEB-1990

The sample program below makes a call to the MS OS/2 functions
DosSetVerify and DosQVerify. This program can be compiled in Microsoft
BASIC Compiler Versions 6.00 and 6.00b for MS OS/2 and in Microsoft
BASIC Professional Development System (PDS) Version 7.00 for MS OS/2.

The program is as follows:

DEFINT A-Z

'The declarations can be found in BSEDOSFL.BI

DECLARE FUNCTION DosSetVerify%(_
                 BYVAL P1 AS INTEGER)

DECLARE FUNCTION DosQVerify%(_
                 SEG P1 AS INTEGER)

x=DosQVerify(opt%)

IF (x) THEN
  Print "An error occurred.  The number is : ";x
ELSE
  SELECT CASE opt%
     CASE 0
        Print "Verify is off"
     CASE 1
        PRINT "Verify is on"
     CASE ELSE
        PRINT "An unexpected error occurred."
  END SELECT
END IF

Print  "(0) to deactivate verify "
input  "(1) to activate for this Application : ";opt%

x=DosSetVerify(opt%)

IF (x) THEN
  Print "An error occurred.  The number is : ";x
ELSE
  SELECT CASE opt%
     CASE 0
        Print "Verify is set off"
     CASE 1
        PRINT "Verify is set on"
     CASE ELSE
        PRINT "An unexpected error occurred."
  END SELECT
END IF
INPUT "Enter Any Key to Verify the Status of VERIFY";a$

x=DosQVerify(opt%)

IF (x) THEN
  Print "An error occurred.  The number is : ";x
ELSE
  SELECT CASE opt%
     CASE 0
        Print "Verify is off"
     CASE 1
        PRINT "Verify is on"
     CASE ELSE
        PRINT "An unexpected error occurred."
  END SELECT
END IF
END

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.