>>54
win2000,vb6.0 or win2000,vbaです。以下のプログラムで、すべて同じ値しか返って来ませんでした。

'【指定された文字が先行バイトかどうかを調べます】
Declare Function IsDBCSLeadByte Lib "Kernel32" (TestChar As Byte) As Boolean
Declare Function IsDBCSLeadByteEx Lib "Kernel32" (CodePage As Integer, TestChar As Byte) As Boolean

Private Sub コマンド72_Click()

Dim length, cnt As Integer
Dim char1, msg, msg2, swork As String
Dim ascii As Byte

'* Stringの内容をチェック
swork = "abcあいう"
length = LenB(swork)
' length = LenB(StrConv(swork, vbFromUnicode))
msg = ""
msg2 = ""
For cnt = 1 To length

char1 = MidB(swork, cnt, 1) '1バイト取り出して、文字コードに変換する
' char1 = MidB(StrConv(swork, vbFromUnicode), cnt, 1)
ascii = AscB(char1)

msg = msg + Right("00" + Hex(ascii), 2) + "," '文字コードを16進数の文字列に変換する
msg2 = msg2 & CInt(IsDBCSLeadByte(ascii)) & ","
Next cnt
Call MsgBox("元の文字列=" & swork & Chr(10) & msg & Chr(10) & msg2)

End Sub