Changeset 226 for Include/com
- Timestamp:
- May 1, 2007, 1:21:27 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/com/bstring.ab
r208 r226 5 5 6 6 Class BString 7 Sub Init(s As PCSTR, len As DWord) 8 Dim lenBS = MultiByteToWideChar(CP_THREAD_ACP, 0, s, len As Long, 0, 0) 9 bs = SysAllocStringLen(0, lenBS) 10 MultiByteToWideChar(CP_THREAD_ACP, 0, s, len As Long, bs, lenBS) 11 End Sub 7 12 Public 8 13 Sub BString() … … 15 20 16 21 Sub BString(ByRef s As BString) 17 BString(s.bs, s.Length)22 Init(s.bs, s.Length) 18 23 End Sub 19 24 … … 27 32 28 33 Sub BString(s As PCSTR) 29 BString(s, lstrlenA(s))34 Init(s, lstrlenA(s)) 30 35 End Sub 31 36 … … 37 42 38 43 Sub BString(ByRef s As String) 39 BString(s.StrPtr, s.Length As DWord)44 Init(s.StrPtr, s.Length As DWord) 40 45 End Sub 41 46 … … 44 49 End Sub 45 50 46 Sub Operator =(ByRef bstr As BString)47 Clear()48 BString(bstr)49 End Sub50 51 Sub Operator =(s As LPCOLESTR)52 Clear()53 BString(s)54 End Sub55 56 51 Sub Assign(ByRef bstr As BString) 57 52 Clear() 58 BString(bstr)53 Init(bstr, bstr.Length) 59 54 End Sub 60 55 61 56 Sub Assign(s As LPCOLESTR) 62 57 Clear() 63 BString(s)58 Init(s, lstrlenW(s)) 64 59 End Sub 65 60
Note:
See TracChangeset
for help on using the changeset viewer.