Incorrect Number of Parameters to Quick Library Can Hang QB (45483)
This article was previously published under Q45483
SUMMARY
When using FUNCTIONs or SUBprograms that are located in a Quick
library under QuickBasic Versions 4.00, 4.00b, and 4.50 and under
QuickBasic Extended in Basic PDS Version 7.00, it is important to
DECLARE all Quick library routines that your program will be CALLing.
If fewer parameters than expected are passed to a SUBprogram in a
Quick library, your machine may hang, sometimes requiring the power to
be cycled to reboot the machine. This problem occurs only within the
environment and only when CALLing a Quick library routine.
If the program is CALLing a routine in another module that is loaded
into the QB.EXE environment, the expected error of "Argument count
mismatch" displays. When compiled to an EXE file, the error "Illegal
function call" displays.
Microsoft does not consider this to be a problem with QuickBasic or
QBX.EXE of any version. The environment cannot perform parameter
checking without a DECLARE statement for each SUB or FUNCTION.
Therefore a DECLARE statement is required for each routine in a Quick
library in order for a program to function normally.
Modification Type: |
Minor |
Last Reviewed: |
1/8/2003 |
Keywords: |
KB45483 |
|