REM msdos2win
DECLARE FUNCTION OemToChar LIB "user32" ALIAS "OemToCharA" (BYVAL lpszSrc AS STRING, _
BYVAL lpszDst AS STRING) AS LONG
DECLARE FUNCTION CharToOem LIB "user32" ALIAS "CharToOemA" (BYVAL lpszSrc AS STRING, _
BYVAL lpszDst AS STRING) AS LONG
FUNCTION dos2win(DosText AS STRING) AS STRING
REM
REM Task: The functions convert a MsDos text in a Windows text AND viceversa.
REM Inputs: strings TO convert
REM Returns:strings converted
DIM Dos$, Oem$
Dos$ = DosText
Oem$ = SPACE$(255)
OemToChar Dos$, Oem$
dos2win = Oem$
END FUNCTION
|