OEMToAnsi32




Declare Function OemToCharBuff Lib "user32" Alias "OemToCharBuffA"
(ByVal lpszSrc As String, ByVal lpszDst As String, _
ByVal cchDstLength As Long) As Long
Declare Function CharToOemBuff Lib "user32" Alias "CharToOemBuffA"
(ByVal lpszSrc As String, ByVal lpszDst As String, _
ByVal cchDstLength As Long) As Long
'Uso:

Sub ConvToDos (S$)
lpAnsiStr$ = S$
lpOemStr$ = S$
L& = CharToOemBuff (lpAnsiStr$, lpOemStr$, Len(S$))
S$ = lpOemStr$
End Sub

Sub ConvToWin (S$)
lpAnsiStr$ = S$
lpOemStr$ = S$
L&= OemToCharBuff (lpOemStr$, lpAnsiStr$, Len(S$))
S$ = lpAnsiStr$
End Sub

Come convertire OEM in ANSI (32 bit)










( oemtoansi32.html )- by Paolo Puglisi - Modifica del 17/12/2023