Guidance
指路人
g.yi.org
software / rapidq / Examples / String & Text / dos2win.bas

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
'From: "Bernt Figaro" Sat, 25 Oct 2003 00:04:56 +0200

'I have 2 functions for translate between DOS and WINDOWS and viceversa.
'Here is the fastest one...
     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
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Wed 2024-12-11  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2003-10-25 08:08:40