Results 1 to 3 of 3

Thread: Counterpart for CharToOEM$

  1. #1

    Counterpart for CharToOEM$

    dear all,

    is there Counterpart for CharToOEM$?
    I have files in CP850 and have to change this OEMToChar and can't found a function for this.
    Thanks for your support.

    Kind Regards

    Axel

  2. #2
    axelmoe, there is OemToCharBuff(var S:AmsiString) inside the unins000.exe in thinbasic folder, also can be seen in thinCore.dll. ( i am using Search and Replace utility from funduc to find things inside files)
    but it is not implemented nor OemToChar(...)
    its declarations can be found in win32api.inc like this
    Declare Function OemToChar Lib "USER32.DLL" Alias "OemToCharA" (lpszSrc As Asciiz, lpszDst As Asciiz) As Long
    so we have 3/4 of the road toward the solution
    the win32api.inc is here:
    http://www.neosoftware.com/community...227&p=11211778
    go down the page to app.box... and download it together with other inc files.
    but it does not suitable immediately to thinbasic ,it needs some manipulation. in fact i will do more research but now i have severe cough symptoms.
    and thanks for posting such thing, it can be useful for me also
    regards

  3. #3
    i hope this works:
    Uses "Console"
    Declare Function OemToChar Lib "USER32.DLL" Alias "OemToCharA" (lpszSrc As Asciiz, lpszDst As Asciiz) As Long
    Dim a As Long
    Dim strSrc, strDest, ss As Asciiz 
    strSrc = "hello world"
    a = OemToChar(strSrc, strDest) 
    PrintL VarPtr(strDest)
    ss = Peek$(Asciiz, VarPtr(strDest))  
    PrintL ss
    MsgBox(0, ss) 
    WaitKey
    
    yet i haven't done reading about what these functions do
    the thinbasic CHM lack the help for CharToOem$, it is available only in thinbasic web help
    the OemToChar and its sister are not available in the free powerbasic 9.07 it is available only in powerbasic 10

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •