Changeset 208 for Include/com/bstring.ab
- Timestamp:
- Apr 7, 2007, 10:20:40 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/com/bstring.ab
r192 r208 31 31 32 32 Sub BString(s As PCSTR, len As DWord) 33 Dim lenBS = MultiByteToWideChar(CP_THREAD_ACP, 0, s, len , 0, 0)33 Dim lenBS = MultiByteToWideChar(CP_THREAD_ACP, 0, s, len As Long, 0, 0) 34 34 bs = SysAllocStringLen(0, lenBS) 35 MultiByteToWideChar(CP_THREAD_ACP, 0, s, len , bs, lenBS)35 MultiByteToWideChar(CP_THREAD_ACP, 0, s, len As Long, bs, lenBS) 36 36 End Sub 37 37 … … 92 92 BStr = bs 93 93 End Function 94 /* 95 Static Function Assgin(bs As BSTR) As BString 96 Assgin = New BString 97 Assgin.Assgin(bs) 98 End Function 94 99 100 Static Function Attach(bs As BSTR) As BString 101 Attach = New BString 102 Attach.Attach(bs) 103 End Function 104 */ 95 105 Const Function Length() As DWord 96 106 Length = SysStringLen(bs) … … 116 126 117 127 Override Function ToString() As String 118 Dim s As String(bs As PCWSTR, Length As Long) 119 Return s 128 Return New String(bs As PCWSTR, Length As Long) 120 129 End Function 121 130
Note:
See TracChangeset
for help on using the changeset viewer.