Hello,
I'd like to use Windows getuname.dll to get the name of a character
because I haven't found this functionality in the .Net framework. So far
I have done this on x86 with the follwing code, but it crashes on x64
Windows:
Declare Function GetUName Lib "getuname.d ll" Alias "GetUName" (ByVal
dwCodePoint As Int32, ByRef lpBuffer As Byte) As Int32
Public Function GetCharName(ByV al myChar As Char) As String
Dim dwCodePoint As Int32 = AscW(myChar)
Dim bytbuf(&H200&) As Byte
Dim strTmp As String = ""
Dim result As Long
result = GetUName(dwCode Point, bytbuf(0))
strTmp = System.Text.Enc oding.GetEncodi ng(1200).GetCha rs(bytbuf)
If strTmp.IndexOf( Chr(0)) 0 Then
strTmp = Left$(strTmp, strTmp.IndexOf( Chr(0)))
End If
Return strTmp
End Function
Applcation eventlog:
Source: .Net Runtime
Type: Error
Code: 1023
..NET Runtime version 2.0.50727.1433 - Fatal Execution Engine Error
(000006427F8A5D C8) (80131506)
And with error reporting enabled also:
Source: .Net Runtime 2.0
Type: Error
Code: 1000
Faulting application txt2txt.exe, version 1.3.0.0, stamp 4899da28,
faulting module mscorwks.dll, version 2.0.50727.1433, stamp 471ed580,
debug? 0, fault address 0x0000000000202 016.
It works on x64 when I compile it as a pure x86 application but I want
to use more than 2GB RAM on x64 and don't want to have separate programs
for each platform. Is it possible to late bind in a way that works on
x86 and x64?
Tanks,
Peter
I'd like to use Windows getuname.dll to get the name of a character
because I haven't found this functionality in the .Net framework. So far
I have done this on x86 with the follwing code, but it crashes on x64
Windows:
Declare Function GetUName Lib "getuname.d ll" Alias "GetUName" (ByVal
dwCodePoint As Int32, ByRef lpBuffer As Byte) As Int32
Public Function GetCharName(ByV al myChar As Char) As String
Dim dwCodePoint As Int32 = AscW(myChar)
Dim bytbuf(&H200&) As Byte
Dim strTmp As String = ""
Dim result As Long
result = GetUName(dwCode Point, bytbuf(0))
strTmp = System.Text.Enc oding.GetEncodi ng(1200).GetCha rs(bytbuf)
If strTmp.IndexOf( Chr(0)) 0 Then
strTmp = Left$(strTmp, strTmp.IndexOf( Chr(0)))
End If
Return strTmp
End Function
Applcation eventlog:
Source: .Net Runtime
Type: Error
Code: 1023
..NET Runtime version 2.0.50727.1433 - Fatal Execution Engine Error
(000006427F8A5D C8) (80131506)
And with error reporting enabled also:
Source: .Net Runtime 2.0
Type: Error
Code: 1000
Faulting application txt2txt.exe, version 1.3.0.0, stamp 4899da28,
faulting module mscorwks.dll, version 2.0.50727.1433, stamp 471ed580,
debug? 0, fault address 0x0000000000202 016.
It works on x64 when I compile it as a pure x86 application but I want
to use more than 2GB RAM on x64 and don't want to have separate programs
for each platform. Is it possible to late bind in a way that works on
x86 and x64?
Tanks,
Peter
Comment