Convert_Boolean_String

include vmm.inc

mov     edx, OFFSET32 String    ; address of Boolean string
VMMCall Convert_Boolean_String

jc      not_valid               ; carry set if invalid string
mov     [Result], eax           ; 0 if false, -1 if true
 

Converts a string representing a Boolean value, and returns either – 1 or 0 to indicate that the string is true or false. This service is available during initialization only. Uses EAX, Flags.

String
Address of a null-terminated string representing a Boolean value.

Valid boolean strings that signify false are 0, False, N, No, and Off. Valid boolean strings that signify true are 1, On, True, Y, and Yes. Non-English versions of Windows may have language-specific additions to this list.

See Also

Convert_Decimal_String, Convert_Fixed_Point_String, Convert_Hex_String