Changeset 192
- Timestamp:
- Mar 28, 2007, 10:29:58 AM (18 years ago)
- Location:
- Include
- Files:
-
- 1 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/Classes/System/String.ab
r183 r192 240 240 If AllocStringBuffer(textLengthW) <> 0 Then 241 241 MultiByteToWideChar(CP_THREAD_ACP, 0, text, textLengthA, Chars, textLengthW) 242 Chars[textLengthW] = 0 242 243 End If 243 244 #endif … … 249 250 If AllocStringBuffer(textLengthA) <> 0 Then 250 251 WideCharToMultiByte(CP_THREAD_ACP, 0, text, textLengthW, Chars, textLengthA, 0, 0) 252 Chars[textLengthA] = 0 251 253 End If 252 254 #else … … 466 468 memcpy(VarPtr(Remove.Chars[startIndex]), VarPtr(This.Chars[startIndex + count]), SizeOf (StrChar) * (m_Length - startIndex - count)) 467 469 End Function 468 /* 470 469 471 Static Function IsNullOrEmpty(s As String) As Boolean 470 472 If s <> Nothing Then … … 475 477 Return False 476 478 End Function 477 */ 479 478 480 Const Function Replace(oldChar As StrChar, newChar As StrChar) As String 479 481 Replace = Copy(This) -
Include/OAIdl.ab
r186 r192 21 21 Const VARIANT_FALSE = (0 As VARIANT_BOOL) ' WTypes.ab 22 22 TypeDef SCODE = Long 23 Type /*Class*/ CY ' WTypes.ab 24 Public 25 int64 As Int64 23 TypeDef CY = Int64 24 'Type /*Class*/ CY ' WTypes.ab 25 'Public 26 ' int64 As Int64 26 27 /* 27 28 Function Lo() As DWord … … 41 42 End Sub 42 43 */ 43 End Type'Class44 'End Type'Class 44 45 45 46 Type /*Class*/ DECIMAL ' WTypes.ab -
Include/OleAuto.ab
r150 r192 131 131 ' VARTYPE Coercion API 132 132 Declare Function VarUI1FromI2 Lib "oleaut32" (sIn As Integer, ByRef bOut As Byte) As HRESULT 133 Declare Function VarUI1FromI4 Lib "oleaut32" (lIn As L ONG, ByRef bOut As Byte) As HRESULT133 Declare Function VarUI1FromI4 Lib "oleaut32" (lIn As Long, ByRef bOut As Byte) As HRESULT 134 134 Declare Function VarUI1FromI8 Lib "oleaut32" (i64In As Int64, ByRef bOut As Byte) As HRESULT 135 135 Declare Function VarUI1FromR4 Lib "oleaut32" (fltIn As Single, ByRef bOut As Byte) As HRESULT … … 140 140 Declare Function VarUI1FromDisp Lib "oleaut32" (pdispIn As *IDispatch, lcid As LCID, ByRef bOut As Byte) As HRESULT 141 141 Declare Function VarUI1FromBool Lib "oleaut32" (boolIn As VARIANT_BOOL, ByRef bOut As Byte) As HRESULT 142 Declare Function VarUI1FromI1 Lib "oleaut32" (cIn As CHAR, ByRef bOut As Byte) As HRESULT142 Declare Function VarUI1FromI1 Lib "oleaut32" (cIn As SByte, ByRef bOut As Byte) As HRESULT 143 143 Declare Function VarUI1FromUI2 Lib "oleaut32" (uiIn As Word, ByRef bOut As Byte) As HRESULT 144 144 Declare Function VarUI1FromUI4 Lib "oleaut32" (ulIn As DWord, ByRef bOut As Byte) As HRESULT … … 147 147 148 148 Declare Function VarI2FromUI1 Lib "oleaut32" (bIn As Byte, ByRef sOut As Integer) As HRESULT 149 Declare Function VarI2FromI4 Lib "oleaut32" (lIn As L ONG, ByRef sOut As Integer) As HRESULT149 Declare Function VarI2FromI4 Lib "oleaut32" (lIn As Long, ByRef sOut As Integer) As HRESULT 150 150 Declare Function VarI2FromI8 Lib "oleaut32" (i64In As Int64, ByRef sOut As Integer) As HRESULT 151 151 Declare Function VarI2FromR4 Lib "oleaut32" (fltIn As Single, ByRef sOut As Integer) As HRESULT … … 156 156 Declare Function VarI2FromDisp Lib "oleaut32" (pdispIn As *IDispatch, lcid As LCID, ByRef sOut As Integer) As HRESULT 157 157 Declare Function VarI2FromBool Lib "oleaut32" (boolIn As VARIANT_BOOL, ByRef sOut As Integer) As HRESULT 158 Declare Function VarI2FromI1 Lib "oleaut32" (cIn As CHAR, ByRef sOut As Integer) As HRESULT158 Declare Function VarI2FromI1 Lib "oleaut32" (cIn As SByte, ByRef sOut As Integer) As HRESULT 159 159 Declare Function VarI2FromUI2 Lib "oleaut32" (uiIn As Word, ByRef sOut As Integer) As HRESULT 160 160 Declare Function VarI2FromUI4 Lib "oleaut32" (ulIn As DWord, ByRef sOut As Integer) As HRESULT … … 172 172 Declare Function VarI4FromDisp Lib "oleaut32" (pdispIn As *IDispatch, lcid As LCID, ByRef lOut As Long) As HRESULT 173 173 Declare Function VarI4FromBool Lib "oleaut32" (boolIn As VARIANT_BOOL, ByRef lOut As Long) As HRESULT 174 Declare Function VarI4FromI1 Lib "oleaut32" (cIn As CHAR, ByRef lOut As Long) As HRESULT174 Declare Function VarI4FromI1 Lib "oleaut32" (cIn As SByte, ByRef lOut As Long) As HRESULT 175 175 Declare Function VarI4FromUI2 Lib "oleaut32" (uiIn As Word, ByRef lOut As Long) As HRESULT 176 176 Declare Function VarI4FromUI4 Lib "oleaut32" (ulIn As DWord, ByRef lOut As Long) As HRESULT … … 180 180 Declare Function VarI8FromUI1 Lib "oleaut32" (bIn As Byte, ByRef i64Out As Int64) As HRESULT 181 181 Declare Function VarI8FromI2 Lib "oleaut32" (sIn As Integer, ByRef i64Out As Int64) As HRESULT 182 Declare Function VarI8FromI4 Lib "oleaut32" (lIn As L ONG, ByRef i64Out As Int64) As HRESULT182 Declare Function VarI8FromI4 Lib "oleaut32" (lIn As Long, ByRef i64Out As Int64) As HRESULT 183 183 Declare Function VarI8FromR4 Lib "oleaut32" (fltIn As Single, ByRef i64Out As Int64) As HRESULT 184 184 Declare Function VarI8FromR8 Lib "oleaut32" (dblIn As Double, ByRef i64Out As Int64) As HRESULT … … 188 188 Declare Function VarI8FromDisp Lib "oleaut32" (pdispIn As *IDispatch, lcid As LCID, ByRef i64Out As Int64) As HRESULT 189 189 Declare Function VarI8FromBool Lib "oleaut32" (boolIn As VARIANT_BOOL, ByRef i64Out As Int64) As HRESULT 190 Declare Function VarI8FromI1 Lib "oleaut32" (cIn As CHAR, ByRef i64Out As Int64) As HRESULT190 Declare Function VarI8FromI1 Lib "oleaut32" (cIn As SByte, ByRef i64Out As Int64) As HRESULT 191 191 Declare Function VarI8FromUI2 Lib "oleaut32" (uiIn As Word, ByRef i64Out As Int64) As HRESULT 192 192 Declare Function VarI8FromUI4 Lib "oleaut32" (ulIn As DWord, ByRef i64Out As Int64) As HRESULT … … 196 196 Declare Function VarR4FromUI1 Lib "oleaut32" (bIn As Byte, ByRef fltOut As Single) As HRESULT 197 197 Declare Function VarR4FromI2 Lib "oleaut32" (sIn As Integer, ByRef fltOut As Single) As HRESULT 198 Declare Function VarR4FromI4 Lib "oleaut32" (lIn As L ONG, ByRef fltOut As Single) As HRESULT198 Declare Function VarR4FromI4 Lib "oleaut32" (lIn As Long, ByRef fltOut As Single) As HRESULT 199 199 Declare Function VarR4FromI8 Lib "oleaut32" (i64In As Int64, ByRef fltOut As Single) As HRESULT 200 200 Declare Function VarR4FromR8 Lib "oleaut32" (dblIn As Double, ByRef fltOut As Single) As HRESULT … … 204 204 Declare Function VarR4FromDisp Lib "oleaut32" (pdispIn As *IDispatch, lcid As LCID, ByRef fltOut As Single) As HRESULT 205 205 Declare Function VarR4FromBool Lib "oleaut32" (boolIn As VARIANT_BOOL, ByRef fltOut As Single) As HRESULT 206 Declare Function VarR4FromI1 Lib "oleaut32" (cIn As CHAR, ByRef fltOut As Single) As HRESULT206 Declare Function VarR4FromI1 Lib "oleaut32" (cIn As SByte, ByRef fltOut As Single) As HRESULT 207 207 Declare Function VarR4FromUI2 Lib "oleaut32" (uiIn As Word, ByRef fltOut As Single) As HRESULT 208 208 Declare Function VarR4FromUI4 Lib "oleaut32" (ulIn As DWord, ByRef fltOut As Single) As HRESULT … … 212 212 Declare Function VarR8FromUI1 Lib "oleaut32" (bIn As Byte, ByRef dblOut As Double) As HRESULT 213 213 Declare Function VarR8FromI2 Lib "oleaut32" (sIn As Integer, ByRef dblOut As Double) As HRESULT 214 Declare Function VarR8FromI4 Lib "oleaut32" (lIn As L ONG, ByRef dblOut As Double) As HRESULT214 Declare Function VarR8FromI4 Lib "oleaut32" (lIn As Long, ByRef dblOut As Double) As HRESULT 215 215 Declare Function VarR8FromI8 Lib "oleaut32" (i64In As Int64, ByRef dblOut As Double) As HRESULT 216 216 Declare Function VarR8FromR4 Lib "oleaut32" (fltIn As Single, ByRef dblOut As Double) As HRESULT … … 220 220 Declare Function VarR8FromDisp Lib "oleaut32" (pdispIn As *IDispatch, lcid As LCID, ByRef dblOut As Double) As HRESULT 221 221 Declare Function VarR8FromBool Lib "oleaut32" (boolIn As VARIANT_BOOL, ByRef dblOut As Double) As HRESULT 222 Declare Function VarR8FromI1 Lib "oleaut32" (cIn As CHAR, ByRef dblOut As Double) As HRESULT222 Declare Function VarR8FromI1 Lib "oleaut32" (cIn As SByte, ByRef dblOut As Double) As HRESULT 223 223 Declare Function VarR8FromUI2 Lib "oleaut32" (uiIn As Word, ByRef dblOut As Double) As HRESULT 224 224 Declare Function VarR8FromUI4 Lib "oleaut32" (ulIn As DWord, ByRef dblOut As Double) As HRESULT … … 228 228 Declare Function VarDateFromUI1 Lib "oleaut32" (bIn As Byte, ByRef dateOut As DATE) As HRESULT 229 229 Declare Function VarDateFromI2 Lib "oleaut32" (sIn As Integer, ByRef dateOut As DATE) As HRESULT 230 Declare Function VarDateFromI4 Lib "oleaut32" (lIn As L ONG, ByRef dateOut As DATE) As HRESULT230 Declare Function VarDateFromI4 Lib "oleaut32" (lIn As Long, ByRef dateOut As DATE) As HRESULT 231 231 Declare Function VarDateFromI8 Lib "oleaut32" (i64In As Int64, ByRef dateOut As DATE) As HRESULT 232 232 Declare Function VarDateFromR4 Lib "oleaut32" (fltIn As Single, ByRef dateOut As DATE) As HRESULT … … 236 236 Declare Function VarDateFromDisp Lib "oleaut32" (pdispIn As *IDispatch, lcid As LCID, ByRef dateOut As DATE) As HRESULT 237 237 Declare Function VarDateFromBool Lib "oleaut32" (boolIn As VARIANT_BOOL, ByRef dateOut As DATE) As HRESULT 238 Declare Function VarDateFromI1 Lib "oleaut32" (cIn As CHAR, ByRef dateOut As DATE) As HRESULT238 Declare Function VarDateFromI1 Lib "oleaut32" (cIn As SByte, ByRef dateOut As DATE) As HRESULT 239 239 Declare Function VarDateFromUI2 Lib "oleaut32" (uiIn As Word, ByRef dateOut As DATE) As HRESULT 240 240 Declare Function VarDateFromUI4 Lib "oleaut32" (ulIn As DWord, ByRef dateOut As DATE) As HRESULT … … 244 244 Declare Function VarCyFromUI1 Lib "oleaut32" (bIn As Byte, ByRef cyOut As CY) As HRESULT 245 245 Declare Function VarCyFromI2 Lib "oleaut32" (sIn As Integer, ByRef cyOut As CY) As HRESULT 246 Declare Function VarCyFromI4 Lib "oleaut32" (lIn As L ONG, ByRef cyOut As CY) As HRESULT246 Declare Function VarCyFromI4 Lib "oleaut32" (lIn As Long, ByRef cyOut As CY) As HRESULT 247 247 Declare Function VarCyFromI8 Lib "oleaut32" (i64In As Int64, ByRef cyOut As CY) As HRESULT 248 248 Declare Function VarCyFromR4 Lib "oleaut32" (fltIn As Single, ByRef cyOut As CY) As HRESULT … … 252 252 Declare Function VarCyFromDisp Lib "oleaut32" (pdispIn As *IDispatch, lcid As LCID, ByRef cyOut As CY) As HRESULT 253 253 Declare Function VarCyFromBool Lib "oleaut32" (boolIn As VARIANT_BOOL, ByRef cyOut As CY) As HRESULT 254 Declare Function VarCyFromI1 Lib "oleaut32" (cIn As CHAR, ByRef cyOut As CY) As HRESULT254 Declare Function VarCyFromI1 Lib "oleaut32" (cIn As SByte, ByRef cyOut As CY) As HRESULT 255 255 Declare Function VarCyFromUI2 Lib "oleaut32" (uiIn As Word, ByRef cyOut As CY) As HRESULT 256 256 Declare Function VarCyFromUI4 Lib "oleaut32" (ulIn As DWord, ByRef cyOut As CY) As HRESULT … … 260 260 Declare Function VarBstrFromUI1 Lib "oleaut32" (bIn As Byte, lcid As LCID, dwFlags As DWord, ByRef bstrOut As BSTR) As HRESULT 261 261 Declare Function VarBstrFromI2 Lib "oleaut32" (sIn As Integer, lcid As LCID, dwFlags As DWord, ByRef bstrOut As BSTR) As HRESULT 262 Declare Function VarBstrFromI4 Lib "oleaut32" (lIn As L ONG, lcid As LCID, dwFlags As DWord, ByRef bstrOut As BSTR) As HRESULT262 Declare Function VarBstrFromI4 Lib "oleaut32" (lIn As Long, lcid As LCID, dwFlags As DWord, ByRef bstrOut As BSTR) As HRESULT 263 263 Declare Function VarBstrFromI8 Lib "oleaut32" (i64In As Int64, lcid As LCID, dwFlags As DWord, ByRef bstrOut As BSTR) As HRESULT 264 264 Declare Function VarBstrFromR4 Lib "oleaut32" (fltIn As Single, lcid As LCID, dwFlags As DWord, ByRef bstrOut As BSTR) As HRESULT … … 268 268 Declare Function VarBstrFromDisp Lib "oleaut32" (pdispIn As *IDispatch, lcid As LCID, dwFlags As DWord, ByRef bstrOut As BSTR) As HRESULT 269 269 Declare Function VarBstrFromBool Lib "oleaut32" (boolIn As VARIANT_BOOL, lcid As LCID, dwFlags As DWord, ByRef bstrOut As BSTR) As HRESULT 270 Declare Function VarBstrFromI1 Lib "oleaut32" (cIn As CHAR, lcid As LCID, dwFlags As DWord, ByRef bstrOut As BSTR) As HRESULT270 Declare Function VarBstrFromI1 Lib "oleaut32" (cIn As SByte, lcid As LCID, dwFlags As DWord, ByRef bstrOut As BSTR) As HRESULT 271 271 Declare Function VarBstrFromUI2 Lib "oleaut32" (uiIn As Word, lcid As LCID, dwFlags As DWord, ByRef bstrOut As BSTR) As HRESULT 272 272 Declare Function VarBstrFromUI4 Lib "oleaut32" (ulIn As DWord, lcid As LCID, dwFlags As DWord, ByRef bstrOut As BSTR) As HRESULT … … 276 276 Declare Function VarBoolFromUI1 Lib "oleaut32" (bIn As Byte, ByRef boolOut As VARIANT_BOOL) As HRESULT 277 277 Declare Function VarBoolFromI2 Lib "oleaut32" (sIn As Integer, ByRef boolOut As VARIANT_BOOL) As HRESULT 278 Declare Function VarBoolFromI4 Lib "oleaut32" (lIn As L ONG, ByRef boolOut As VARIANT_BOOL) As HRESULT278 Declare Function VarBoolFromI4 Lib "oleaut32" (lIn As Long, ByRef boolOut As VARIANT_BOOL) As HRESULT 279 279 Declare Function VarBoolFromI8 Lib "oleaut32" (i64In As Int64, ByRef boolOut As VARIANT_BOOL) As HRESULT 280 280 Declare Function VarBoolFromR4 Lib "oleaut32" (fltIn As Single, ByRef boolOut As VARIANT_BOOL) As HRESULT … … 284 284 Declare Function VarBoolFromStr Lib "oleaut32" (strIn As *OLECHAR, lcid As LCID, dwFlags As DWord, ByRef boolOut As VARIANT_BOOL) As HRESULT 285 285 Declare Function VarBoolFromDisp Lib "oleaut32" (pdispIn As *IDispatch, lcid As LCID, ByRef boolOut As VARIANT_BOOL) As HRESULT 286 Declare Function VarBoolFromI1 Lib "oleaut32" (cIn As CHAR, ByRef boolOut As VARIANT_BOOL) As HRESULT286 Declare Function VarBoolFromI1 Lib "oleaut32" (cIn As SByte, ByRef boolOut As VARIANT_BOOL) As HRESULT 287 287 Declare Function VarBoolFromUI2 Lib "oleaut32" (uiIn As Word, ByRef boolOut As VARIANT_BOOL) As HRESULT 288 288 Declare Function VarBoolFromUI4 Lib "oleaut32" (ulIn As DWord, ByRef boolOut As VARIANT_BOOL) As HRESULT … … 291 291 292 292 Declare Function VarI1FromI2 Lib "oleaut32" (sIn As Integer, ByRef cOut As Char) As HRESULT 293 Declare Function VarI1FromI4 Lib "oleaut32" (lIn As L ONG, ByRef cOut As Char) As HRESULT293 Declare Function VarI1FromI4 Lib "oleaut32" (lIn As Long, ByRef cOut As Char) As HRESULT 294 294 Declare Function VarI1FromI8 Lib "oleaut32" (i64In As Int64, ByRef cOut As Char) As HRESULT 295 295 Declare Function VarI1FromR4 Lib "oleaut32" (fltIn As Single, ByRef cOut As Char) As HRESULT … … 300 300 Declare Function VarI1FromDisp Lib "oleaut32" (pdispIn As *IDispatch, lcid As LCID, ByRef cOut As Char) As HRESULT 301 301 Declare Function VarI1FromBool Lib "oleaut32" (boolIn As VARIANT_BOOL, ByRef cOut As Char) As HRESULT 302 Declare Function VarI1FromI1 Lib "oleaut32" (cIn As CHAR, ByRef cOut As Char) As HRESULT302 Declare Function VarI1FromI1 Lib "oleaut32" (cIn As SByte, ByRef cOut As Char) As HRESULT 303 303 Declare Function VarI1FromUI2 Lib "oleaut32" (uiIn As Word, ByRef cOut As Char) As HRESULT 304 304 Declare Function VarI1FromUI4 Lib "oleaut32" (ulIn As DWord, ByRef cOut As Char) As HRESULT … … 308 308 Declare Function VarUI2FromUI1 Lib "oleaut32" (bIn As Byte, ByRef uiOut As Word) As HRESULT 309 309 Declare Function VarUI2FromI2 Lib "oleaut32" (uiIn As Integer, ByRef uiOut As Word) As HRESULT 310 Declare Function VarUI2FromI4 Lib "oleaut32" (lIn As L ONG, ByRef uiOut As Word) As HRESULT310 Declare Function VarUI2FromI4 Lib "oleaut32" (lIn As Long, ByRef uiOut As Word) As HRESULT 311 311 Declare Function VarUI2FromI8 Lib "oleaut32" (i64In As Int64, ByRef uiOut As Word) As HRESULT 312 312 Declare Function VarUI2FromR4 Lib "oleaut32" (fltIn As Single, ByRef uiOut As Word) As HRESULT … … 317 317 Declare Function VarUI2FromDisp Lib "oleaut32" (pdispIn As *IDispatch, lcid As LCID, ByRef uiOut As Word) As HRESULT 318 318 Declare Function VarUI2FromBool Lib "oleaut32" (boolIn As VARIANT_BOOL, ByRef uiOut As Word) As HRESULT 319 Declare Function VarUI2FromI1 Lib "oleaut32" (cIn As CHAR, ByRef uiOut As Word) As HRESULT319 Declare Function VarUI2FromI1 Lib "oleaut32" (cIn As SByte, ByRef uiOut As Word) As HRESULT 320 320 Declare Function VarUI2FromUI4 Lib "oleaut32" (ulIn As DWord, ByRef uiOut As Word) As HRESULT 321 321 Declare Function VarUI2FromUI8 Lib "oleaut32" (i64In As QWord, ByRef uiOut As Word) As HRESULT … … 324 324 Declare Function VarUI4FromUI1 Lib "oleaut32" (bIn As Byte, ByRef ulOut As DWord) As HRESULT 325 325 Declare Function VarUI4FromI2 Lib "oleaut32" (uiIn As Integer, ByRef ulOut As DWord) As HRESULT 326 Declare Function VarUI4FromI4 Lib "oleaut32" (lIn As L ONG, ByRef ulOut As DWord) As HRESULT326 Declare Function VarUI4FromI4 Lib "oleaut32" (lIn As Long, ByRef ulOut As DWord) As HRESULT 327 327 Declare Function VarUI4FromI8 Lib "oleaut32" (i64In As Int64, ByRef lOut As DWord) As HRESULT 328 328 Declare Function VarUI4FromR4 Lib "oleaut32" (fltIn As Single, ByRef ulOut As DWord) As HRESULT … … 333 333 Declare Function VarUI4FromDisp Lib "oleaut32" (pdispIn As *IDispatch, lcid As LCID, ByRef ulOut As DWord) As HRESULT 334 334 Declare Function VarUI4FromBool Lib "oleaut32" (boolIn As VARIANT_BOOL, ByRef ulOut As DWord) As HRESULT 335 Declare Function VarUI4FromI1 Lib "oleaut32" (cIn As CHAR, ByRef ulOut As DWord) As HRESULT335 Declare Function VarUI4FromI1 Lib "oleaut32" (cIn As SByte, ByRef ulOut As DWord) As HRESULT 336 336 Declare Function VarUI4FromUI2 Lib "oleaut32" (uiIn As Word, ByRef ulOut As DWord) As HRESULT 337 337 Declare Function VarUI4FromUI8 Lib "oleaut32" (ui64In As QWord, ByRef lOut As DWord) As HRESULT … … 340 340 Declare Function VarUI8FromUI1 Lib "oleaut32" (bIn As Byte, ByRef i64Out As QWord) As HRESULT 341 341 Declare Function VarUI8FromI2 Lib "oleaut32" (sIn As Integer, ByRef i64Out As QWord) As HRESULT 342 Declare Function VarUI8FromI4 Lib "oleaut32" (lIn As L ONG, ByRef i64Out As QWord) As HRESULT342 Declare Function VarUI8FromI4 Lib "oleaut32" (lIn As Long, ByRef i64Out As QWord) As HRESULT 343 343 Declare Function VarUI8FromI8 Lib "oleaut32" (ui64In As Int64, ByRef i64Out As QWord) As HRESULT 344 344 Declare Function VarUI8FromR4 Lib "oleaut32" (fltIn As Single, ByRef i64Out As QWord) As HRESULT … … 349 349 Declare Function VarUI8FromDisp Lib "oleaut32" (pdispIn As *IDispatch, lcid As LCID, ByRef i64Out As QWord) As HRESULT 350 350 Declare Function VarUI8FromBool Lib "oleaut32" (boolIn As VARIANT_BOOL, ByRef i64Out As QWord) As HRESULT 351 Declare Function VarUI8FromI1 Lib "oleaut32" (cIn As CHAR, ByRef i64Out As QWord) As HRESULT351 Declare Function VarUI8FromI1 Lib "oleaut32" (cIn As SByte, ByRef i64Out As QWord) As HRESULT 352 352 Declare Function VarUI8FromUI2 Lib "oleaut32" (uiIn As Word, ByRef i64Out As QWord) As HRESULT 353 353 Declare Function VarUI8FromUI4 Lib "oleaut32" (ulIn As DWord, ByRef i64Out As QWord) As HRESULT … … 356 356 Declare Function VarDecFromUI1 Lib "oleaut32" (bIn As Byte, ByRef decOut As DECIMAL) As HRESULT 357 357 Declare Function VarDecFromI2 Lib "oleaut32" (uiIn As Integer, ByRef decOut As DECIMAL) As HRESULT 358 Declare Function VarDecFromI4 Lib "oleaut32" (lIn As L ONG, ByRef decOut As DECIMAL) As HRESULT358 Declare Function VarDecFromI4 Lib "oleaut32" (lIn As Long, ByRef decOut As DECIMAL) As HRESULT 359 359 Declare Function VarDecFromI8 Lib "oleaut32" (i64In As Int64, ByRef decOut As DECIMAL) As HRESULT 360 360 Declare Function VarDecFromR4 Lib "oleaut32" (fltIn As Single, ByRef decOut As DECIMAL) As HRESULT … … 365 365 Declare Function VarDecFromDisp Lib "oleaut32" (pdispIn As *IDispatch, lcid As LCID, ByRef decOut As DECIMAL) As HRESULT 366 366 Declare Function VarDecFromBool Lib "oleaut32" (boolIn As VARIANT_BOOL, ByRef decOut As DECIMAL) As HRESULT 367 Declare Function VarDecFromI1 Lib "oleaut32" (cIn As CHAR, ByRef decOut As DECIMAL) As HRESULT367 Declare Function VarDecFromI1 Lib "oleaut32" (cIn As SByte, ByRef decOut As DECIMAL) As HRESULT 368 368 Declare Function VarDecFromUI2 Lib "oleaut32" (uiIn As Word, ByRef decOut As DECIMAL) As HRESULT 369 369 Declare Function VarDecFromUI4 Lib "oleaut32" (ulIn As DWord, ByRef decOut As DECIMAL) As HRESULT 370 370 Declare Function VarDecFromUI8 Lib "oleaut32" (ui64In As QWord, ByRef decOut As DECIMAL) As HRESULT 371 371 372 Declare Function VarUI1FromInt Lib "oleaut32" Alias "VarUI1FromI4" (lIn As L ONG, ByRef bOut As Byte) As HRESULT372 Declare Function VarUI1FromInt Lib "oleaut32" Alias "VarUI1FromI4" (lIn As Long, ByRef bOut As Byte) As HRESULT 373 373 Declare Function VarUI1FromUint Lib "oleaut32" Alias "VarUI1FromUI4" (ulIn As DWord, ByRef bOut As Byte) As HRESULT 374 Declare Function VarI2FromInt Lib "oleaut32" Alias "VarI2FromI4" (lIn As L ONG, ByRef sOut As Integer) As HRESULT374 Declare Function VarI2FromInt Lib "oleaut32" Alias "VarI2FromI4" (lIn As Long, ByRef sOut As Integer) As HRESULT 375 375 Declare Function VarI2FromUint Lib "oleaut32" Alias "VarI2FromUI4" (ulIn As DWord, ByRef sOut As Integer) As HRESULT 376 376 Declare Function VarI4FromUint Lib "oleaut32" Alias "VarI4FromUI4" (ulIn As DWord, ByRef lOut As Long) As HRESULT 377 Declare Function VarI8FromInt Lib "oleaut32" Alias "VarI8FromI4" (lIn As L ONG, ByRef i64Out As Int64) As HRESULT377 Declare Function VarI8FromInt Lib "oleaut32" Alias "VarI8FromI4" (lIn As Long, ByRef i64Out As Int64) As HRESULT 378 378 Declare Function VarI8FromUint Lib "oleaut32" Alias "VarI8FromUI4" (ulIn As DWord, ByRef i64Out As Int64) As HRESULT 379 Declare Function VarR4FromInt Lib "oleaut32" Alias "VarR4FromI4" (lIn As L ONG, ByRef fltOut As Single) As HRESULT379 Declare Function VarR4FromInt Lib "oleaut32" Alias "VarR4FromI4" (lIn As Long, ByRef fltOut As Single) As HRESULT 380 380 Declare Function VarR4FromUint Lib "oleaut32" Alias "VarR4FromUI4" (ulIn As DWord, ByRef fltOut As Single) As HRESULT 381 Declare Function VarR8FromInt Lib "oleaut32" Alias "VarR8FromI4" (lIn As L ONG, ByRef dblOut As Double) As HRESULT381 Declare Function VarR8FromInt Lib "oleaut32" Alias "VarR8FromI4" (lIn As Long, ByRef dblOut As Double) As HRESULT 382 382 Declare Function VarR8FromUint Lib "oleaut32" Alias "VarR8FromUI4" (ulIn As DWord, ByRef dblOut As Double) As HRESULT 383 Declare Function VarDateFromInt Lib "oleaut32" Alias "VarDateFromI4" (lIn As L ONG, ByRef dateOut As DATE) As HRESULT383 Declare Function VarDateFromInt Lib "oleaut32" Alias "VarDateFromI4" (lIn As Long, ByRef dateOut As DATE) As HRESULT 384 384 Declare Function VarDateFromUint Lib "oleaut32" Alias "VarDateFromUI4" (ulIn As DWord, ByRef dateOut As DATE) As HRESULT 385 Declare Function VarCyFromInt Lib "oleaut32" Alias "VarCyFromI4" (lIn As L ONG, ByRef cyOut As CY) As HRESULT385 Declare Function VarCyFromInt Lib "oleaut32" Alias "VarCyFromI4" (lIn As Long, ByRef cyOut As CY) As HRESULT 386 386 Declare Function VarCyFromUint Lib "oleaut32" Alias "VarCyFromUI4" (ulIn As DWord, ByRef cyOut As CY) As HRESULT 387 Declare Function VarBstrFromInt Lib "oleaut32" Alias "VarBstrFromI4" (lIn As L ONG, lcid As LCID, dwFlags As DWord, ByRef bstrOut As BSTR) As HRESULT387 Declare Function VarBstrFromInt Lib "oleaut32" Alias "VarBstrFromI4" (lIn As Long, lcid As LCID, dwFlags As DWord, ByRef bstrOut As BSTR) As HRESULT 388 388 Declare Function VarBstrFromUint Lib "oleaut32" Alias "VarBstrFromUI4" (ulIn As DWord, lcid As LCID, dwFlags As DWord, ByRef bstrOut As BSTR) As HRESULT 389 Declare Function VarBoolFromInt Lib "oleaut32" Alias "VarBoolFromI4" (lIn As L ONG, ByRef boolOut As VARIANT_BOOL) As HRESULT389 Declare Function VarBoolFromInt Lib "oleaut32" Alias "VarBoolFromI4" (lIn As Long, ByRef boolOut As VARIANT_BOOL) As HRESULT 390 390 Declare Function VarBoolFromUint Lib "oleaut32" Alias "VarBoolFromUI4" (ulIn As DWord, ByRef boolOut As VARIANT_BOOL) As HRESULT 391 Declare Function VarI1FromInt Lib "oleaut32" Alias "VarI1FromI4" (lIn As L ONG, ByRef cOut As Char) As HRESULT391 Declare Function VarI1FromInt Lib "oleaut32" Alias "VarI1FromI4" (lIn As Long, ByRef cOut As Char) As HRESULT 392 392 Declare Function VarI1FromUint Lib "oleaut32" Alias "VarI1FromUI4" (ulIn As DWord, ByRef cOut As Char) As HRESULT 393 Declare Function VarUI2FromInt Lib "oleaut32" Alias "VarUI2FromI4" (lIn As L ONG, ByRef uiOut As Word) As HRESULT393 Declare Function VarUI2FromInt Lib "oleaut32" Alias "VarUI2FromI4" (lIn As Long, ByRef uiOut As Word) As HRESULT 394 394 Declare Function VarUI2FromUint Lib "oleaut32" Alias "VarUI2FromUI4" (ulIn As DWord, ByRef uiOut As Word) As HRESULT 395 Declare Function VarUI4FromInt Lib "oleaut32" Alias "VarUI4FromI4" (lIn As L ONG, ByRef ulOut As DWord) As HRESULT396 Declare Function VarUI8FromInt Lib "oleaut32" Alias "VarUI8FromI4" (lIn As L ONG, ByRef i64Out As QWord) As HRESULT395 Declare Function VarUI4FromInt Lib "oleaut32" Alias "VarUI4FromI4" (lIn As Long, ByRef ulOut As DWord) As HRESULT 396 Declare Function VarUI8FromInt Lib "oleaut32" Alias "VarUI8FromI4" (lIn As Long, ByRef i64Out As QWord) As HRESULT 397 397 Declare Function VarUI8FromUint Lib "oleaut32" Alias "VarUI8FromUI4" (ulIn As DWord, ByRef i64Out As QWord) As HRESULT 398 Declare Function VarDecFromInt Lib "oleaut32" Alias "VarDecFromI4" (lIn As L ONG, ByRef decOut As DECIMAL) As HRESULT398 Declare Function VarDecFromInt Lib "oleaut32" Alias "VarDecFromI4" (lIn As Long, ByRef decOut As DECIMAL) As HRESULT 399 399 400 400 Declare Function VarIntFromUI1 Lib "oleaut32" Alias "VarI4FromUI1" (bIn As Byte, ByRef lOut As Long) As HRESULT … … 408 408 Declare Function VarIntFromDisp Lib "oleaut32" Alias "VarI4FromDisp" (pdispIn As *IDispatch, lcid As LCID, ByRef lOut As Long) As HRESULT 409 409 Declare Function VarIntFromBool Lib "oleaut32" Alias "VarI4FromBool" (boolIn As VARIANT_BOOL, ByRef lOut As Long) As HRESULT 410 Declare Function VarIntFromI1 Lib "oleaut32" Alias "VarI4FromI1" (cIn As CHAR, ByRef lOut As Long) As HRESULT410 Declare Function VarIntFromI1 Lib "oleaut32" Alias "VarI4FromI1" (cIn As SByte, ByRef lOut As Long) As HRESULT 411 411 Declare Function VarIntFromUI2 Lib "oleaut32" Alias "VarI4FromUI2" (uiIn As Word, ByRef lOut As Long) As HRESULT 412 412 Declare Function VarIntFromUI4 Lib "oleaut32" Alias "VarI4FromUI4" (ulIn As DWord, ByRef lOut As Long) As HRESULT … … 416 416 Declare Function VarIntFromUint Lib "oleaut32" Alias "VarI4FromUI4" (ulIn As DWord, ByRef lOut As Long) As HRESULT 417 417 Declare Function VarUintFromI2 Lib "oleaut32" Alias "VarUI4FromI2" (uiIn As Integer, ByRef ulOut As DWord) As HRESULT 418 Declare Function VarUintFromI4 Lib "oleaut32" Alias "VarUI4FromI4" (lIn As L ONG, ByRef ulOut As DWord) As HRESULT418 Declare Function VarUintFromI4 Lib "oleaut32" Alias "VarUI4FromI4" (lIn As Long, ByRef ulOut As DWord) As HRESULT 419 419 Declare Function VarUintFromI8 Lib "oleaut32" Alias "VarUI4FromI8" (i64In As Int64, ByRef lOut As DWord) As HRESULT 420 420 Declare Function VarUintFromR4 Lib "oleaut32" Alias "VarUI4FromR4" (fltIn As Single, ByRef ulOut As DWord) As HRESULT … … 425 425 Declare Function VarUintFromDisp Lib "oleaut32" Alias "VarUI4FromDisp" (pdispIn As *IDispatch, lcid As LCID, ByRef ulOut As DWord) As HRESULT 426 426 Declare Function VarUintFromBool Lib "oleaut32" Alias "VarUI4FromBool" (boolIn As VARIANT_BOOL, ByRef ulOut As DWord) As HRESULT 427 Declare Function VarUintFromI1 Lib "oleaut32" Alias "VarUI4FromI1" (cIn As CHAR, ByRef ulOut As DWord) As HRESULT427 Declare Function VarUintFromI1 Lib "oleaut32" Alias "VarUI4FromI1" (cIn As SByte, ByRef ulOut As DWord) As HRESULT 428 428 Declare Function VarUintFromUI2 Lib "oleaut32" Alias "VarUI4FromUI2" (uiIn As Word, ByRef ulOut As DWord) As HRESULT 429 429 Declare Function VarUintFromUI8 Lib "oleaut32" Alias "VarUI4FromUI8" (ui64In As QWord, ByRef lOut As DWord) As HRESULT 430 430 Declare Function VarUintFromDec Lib "oleaut32" Alias "VarUI4FromDec" (ByRef decIn As DECIMAL, ByRef ulOut As DWord) As HRESULT 431 Declare Function VarUintFromInt Lib "oleaut32" Alias "VarUI4FromI4" (lIn As L ONG, ByRef ulOut As DWord) As HRESULT431 Declare Function VarUintFromInt Lib "oleaut32" Alias "VarUI4FromI4" (lIn As Long, ByRef ulOut As DWord) As HRESULT 432 432 433 433 Sub VarI4FromInt(iIn As Long, ByRef lOut As Long) … … 566 566 End Type 567 567 568 Declare Function VarDateFromUdate Lib "oleaut32" ( udateIn As UDATE, dwFlags As DWord, ByRef dateOut As DATE) As HRESULT569 Declare Function VarDateFromUdateEx Lib "oleaut32" ( udateIn As UDATE, lcid As LCID, dwFlags As DWord, ByRef dateOut As DATE) As HRESULT568 Declare Function VarDateFromUdate Lib "oleaut32" (ByRef udateIn As UDATE, dwFlags As DWord, ByRef dateOut As DATE) As HRESULT 569 Declare Function VarDateFromUdateEx Lib "oleaut32" (ByRef udateIn As UDATE, lcid As LCID, dwFlags As DWord, ByRef dateOut As DATE) As HRESULT 570 570 Declare Function VarUdateFromDate Lib "oleaut32" (dateIn As DATE, dwFlags As DWord, ByRef udateOut As UDATE) As HRESULT 571 571 … … 586 586 587 587 ' ITypeLib 588 TypeDef PTYPELIB = VoidPtr '*ITypeLib588 TypeDef PTYPELIB = *ITypeLib 589 589 590 590 ' ITypeInfo -
Include/api_imm.sbp
r179 r192 115 115 TypeDef LPSTYLEBUF = LPSTYLEBUFA 116 116 #endif 117 118 '#if (WINVER >= 0x040A)119 117 120 118 Const IMEMENUITEM_STRING_SIZE = 80 … … 221 219 #endif 222 220 223 Declare Function ImmSetCompositionStringA Lib "imm32" (himc As HIMC, dwIndex As DWord, lpComp As VoidPtr, dwCompLen As DWord, lpRead As VoidPtr, dwReadLen As DWord 224 Declare Function ImmSetCompositionStringW Lib "imm32" (himc As HIMC, dwIndex As DWord, lpComp As VoidPtr, dwCompLen As DWord, lpRead As VoidPtr, dwReadLen As DWord 225 #ifdef UNICODE 226 Declare Function ImmSetCompositionString Lib "imm32" Alias "ImmSetCompositionStringW" (himc As HIMC, dwIndex As DWord, lpComp As VoidPtr, dwCompLen As DWord, lpRead As VoidPtr, dwReadLen As DWord 227 #else 228 Declare Function ImmSetCompositionString Lib "imm32" Alias "ImmSetCompositionStringA" (himc As HIMC, dwIndex As DWord, lpComp As VoidPtr, dwCompLen As DWord, lpRead As VoidPtr, dwReadLen As DWord 221 Declare Function ImmSetCompositionStringA Lib "imm32" (himc As HIMC, dwIndex As DWord, lpComp As VoidPtr, dwCompLen As DWord, lpRead As VoidPtr, dwReadLen As DWord) As BOOL 222 Declare Function ImmSetCompositionStringW Lib "imm32" (himc As HIMC, dwIndex As DWord, lpComp As VoidPtr, dwCompLen As DWord, lpRead As VoidPtr, dwReadLen As DWord) As BOOL 223 #ifdef UNICODE 224 Declare Function ImmSetCompositionString Lib "imm32" Alias "ImmSetCompositionStringW" (himc As HIMC, dwIndex As DWord, lpComp As VoidPtr, dwCompLen As DWord, lpRead As VoidPtr, dwReadLen As DWord) As BOOL 225 #else 226 Declare Function ImmSetCompositionString Lib "imm32" Alias "ImmSetCompositionStringA" (himc As HIMC, dwIndex As DWord, lpComp As VoidPtr, dwCompLen As DWord, lpRead As VoidPtr, dwReadLen As DWord) As BOOL 229 227 #endif 230 228 … … 245 243 #endif 246 244 247 Declare Function ImmGetGuideLineA (himc As HIMC, dwIndex As DWord, lpBuf As LPSTR, dwBufLen As DWord) As DWord248 Declare Function ImmGetGuideLineW (himc As HIMC, dwIndex As DWord, lpBuf As LPWSTR, dwBufLen As DWord) As DWord249 #ifdef UNICODE 250 Declare Function ImmGetGuideLine Alias "ImmGetGuideLineW" (himc As HIMC, dwIndex As DWord, lpBuf As LPWSTR, dwBufLen As DWord) As DWord251 #else 252 Declare Function ImmGetGuideLine Alias "ImmGetGuideLineA" (himc As HIMC, dwIndex As DWord, lpBuf As LPSTR, dwBufLen As DWord) As DWord253 #endif 254 255 Declare Function ImmGetConversionStatus (himc As HIMC, ByRef fdwConversion As DWord, ByRef fdwSentence As DWord) As BOOL256 Declare Function ImmSetConversionStatus (himc As HIMC, fdwConversion As DWord, fdwSentence As DWord) As BOOL257 Declare Function ImmGetOpenStatus (himc As HIMC) As BOOL258 Declare Function ImmSetOpenStatus (himc As HIMC, fOpen As BOOL) As BOOL245 Declare Function ImmGetGuideLineA Lib "imm32" (himc As HIMC, dwIndex As DWord, lpBuf As LPSTR, dwBufLen As DWord) As DWord 246 Declare Function ImmGetGuideLineW Lib "imm32" (himc As HIMC, dwIndex As DWord, lpBuf As LPWSTR, dwBufLen As DWord) As DWord 247 #ifdef UNICODE 248 Declare Function ImmGetGuideLine Lib "imm32" Alias "ImmGetGuideLineW" (himc As HIMC, dwIndex As DWord, lpBuf As LPWSTR, dwBufLen As DWord) As DWord 249 #else 250 Declare Function ImmGetGuideLine Lib "imm32" Alias "ImmGetGuideLineA" (himc As HIMC, dwIndex As DWord, lpBuf As LPSTR, dwBufLen As DWord) As DWord 251 #endif 252 253 Declare Function ImmGetConversionStatus Lib "imm32" (himc As HIMC, ByRef fdwConversion As DWord, ByRef fdwSentence As DWord) As BOOL 254 Declare Function ImmSetConversionStatus Lib "imm32" (himc As HIMC, fdwConversion As DWord, fdwSentence As DWord) As BOOL 255 Declare Function ImmGetOpenStatus Lib "imm32" (himc As HIMC) As BOOL 256 Declare Function ImmSetOpenStatus Lib "imm32" (himc As HIMC, fOpen As BOOL) As BOOL 259 257 260 258 #ifdef _INC_GDI '_WINGDI_ 261 #ifndef NOG ID259 #ifndef NOGDI 262 260 Declare Function ImmGetCompositionFontA Lib "imm32" (hIMC As HIMC, ByRef lf As LOGFONTA) As BOOL 263 261 Declare Function ImmGetCompositionFontW Lib "imm32" (hIMC As HIMC, ByRef lf As LOGFONTW) As BOOL … … 275 273 Declare Function ImmSetCompositionFont Lib "imm32" Alias "ImmSetCompositionFontA" (hIMC As HIMC, ByRef lf As LOGFONT) As Long 276 274 #endif 277 #endif 'NOG ID275 #endif 'NOGDI 278 276 #endif '_INC_GDI 277 #endif 279 278 280 279 Declare Function ImmConfigureIMEA Lib "imm32" (hkl As HKL, hwnd As HWND, dwMode As DWord, lpData As VoidPtr) As BOOL … … 368 367 Declare Function ImmGetImeMenuItems Lib "imm32" Alias "ImmGetImeMenuItemsA" (himc As HIMC, dwFlags As DWord, dwType As DWord, ByRef ImeParentMenu As IMEMENUITEMINFOA, lpImeMenu As LPIMEMENUITEMINFOA, dwSoze As DWord) As DWord 369 368 #endif 370 Declare Function ImmDisableTextFrameService (idThread As DWord) As BOOL369 Declare Function ImmDisableTextFrameService Lib "imm32"(idThread As DWord) As BOOL 371 370 372 371 ' wParam for WM_IME_CONTROL … … 705 704 Const SOFTKEYBOARD_TYPE_C1 = &h0002 706 705 707 708 706 #endif '_IMM_SDK_DEFINED_ 709 707 -
Include/basic/function.sbp
r175 r192 555 555 '値が0の場合 556 556 If value = 0 Then 557 _System_FillChar(_System_ecvt_buffer, count , &H30)557 _System_FillChar(_System_ecvt_buffer, count As SIZE_T, &H30 As StrChar) 558 558 _System_ecvt_buffer[count] = 0 559 559 dec = 0 -
Include/basic/prompt.sbp
r151 r192 494 494 495 495 'Create Prompt Window 496 _PromptSys_hWnd = CreateWindowEx(WS_EX_CLIENTEDGE, atom As ULONG_PTR As PCTSTR, "BASIC PROMPT",497 WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 496 _PromptSys_hWnd = CreateWindowEx(WS_EX_CLIENTEDGE, atom As ULONG_PTR As LPCTSTR, "BASIC PROMPT", _ 497 WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, _ 498 498 0, 0, wcl.hInstance, 0) 499 499 ShowWindow(_PromptSys_hWnd, SW_SHOW) … … 540 540 For i = 0 To 100 541 541 With _PromptSys_TextLine[i] 542 .Text[0] = 0 '_System_FillChar(_PromptSys_TextLine[i].Text, -1 As Char, 0)542 .Text[0] = 0 '_System_FillChar(_PromptSys_TextLine[i].Text, -1 As StrChar, 0) 543 543 .Length = 0 544 544 End With … … 646 646 Dim i = _PromptSys_TextLine[y].Length 647 647 If i < x Then 648 _System_FillChar(VarPtr(_PromptSys_TextLine[y].Text[i]), x - i, &h20 ) 'Asc(" ")648 _System_FillChar(VarPtr(_PromptSys_TextLine[y].Text[i]), x - i, &h20 As StrChar) 'Asc(" ") 649 649 Dim i2 As Long 650 650 For i2 = i To ELM(x) -
Include/com/bstring.ab
r175 r192 80 80 End Sub 81 81 82 Sub Attach( bstr As BSTR)82 Sub Attach(ByRef bstr As BSTR) 83 83 Clear() 84 84 BString.Move(bs, bstr) -
Include/com/index.ab
r142 r192 2 2 3 3 #require <com/bstring.ab> 4 #require <com/variant.ab> 5 #require <com/vbojbect.ab> 6 #require <com/currency.ab> -
Include/com/variant.ab
r175 r192 20 20 End Sub 21 21 22 Sub Variant( vAs VARIANT)22 Sub Variant(ByRef y As VARIANT) 23 23 VariantInit(v) 24 24 VariantCopy(v, y) … … 132 132 End Sub 133 133 134 Sub Assign(from As VARIANT) 135 Clear() 134 Sub Assign(ByRef from As VARIANT) 136 135 Variant.Copy(v, from) 136 End Sub 137 138 Sub AssignInd(ByRef from As VARIANT) 139 VariantCopyInd(v, from) 137 140 End Sub 138 141 … … 141 144 End Sub 142 145 146 Const Function Copy() As VARIANT 147 Variant.Copy(Copy, v) 148 End Function 149 143 150 Function Detach() As VARIANT 144 151 Variant.Move(Detach, v) … … 153 160 End Function 154 161 155 Function Operator -() As Variant 162 Const Function Operator +() As Variant 163 Return New Variant(This) 164 End Function 165 166 Const Function Operator -() As Variant 156 167 Dim ret As Variant 157 168 VarNeg(This.v, ret.v) … … 219 230 End Function 220 231 221 Function Operator Not() As Variant232 Const Function Operator Not() As Variant 222 233 Dim ret As Variant 223 234 VarNot(This.v, ret.v) … … 237 248 End Function 238 249 239 Function Abs() As Variant250 Const Function Abs() As Variant 240 251 Dim ret As Variant 241 252 VarAbs(This.v, ret.v) … … 243 254 End Function 244 255 245 Function Fix() As Variant256 Const Function Fix() As Variant 246 257 Dim ret As Variant 247 258 VarFix(This.v, ret.v) … … 249 260 End Function 250 261 251 Function Int() As Variant262 Const Function Int() As Variant 252 263 Dim ret As Variant 253 264 VarInt(This.v, ret.v) … … 255 266 End Function 256 267 257 Function Round(cDecimals As Long) As Variant268 Const Function Round(cDecimals As Long) As Variant 258 269 Dim ret As Variant 259 270 VarRound(This.v, cDecimals, ret) … … 261 272 End Function 262 273 263 Function Round() As Variant274 Const Function Round() As Variant 264 275 Return Round(0) 265 276 End Function … … 274 285 275 286 Const Function Operator ==(y As Variant) As Boolean 276 Return Compare(This, y) = VARCMP_EQ 287 Dim c = Compare(This, y) 288 If c = VARCMP_EQ Then 289 Return True 290 Else 291 Return False 292 End If 277 293 End Function 278 294 279 295 Const Function Operator <>(y As Variant) As Boolean 280 Return Compare(This, y) <> VARCMP_EQ 296 Dim c = Compare(This, y) 297 If c <> VARCMP_EQ Then 298 Return True 299 Else 300 Return False 301 End If 281 302 End Function 282 303 283 304 Const Function Operator <(y As Variant) As Boolean 284 Return Compare(This, y) = VARCMP_LT 285 End Function 286 287 ' Const Function Operator >(y As Variant) As Boolean 288 ' Return Compare(This, y) = VARCMP_GT 289 ' End Function 290 305 Dim c = Compare(This, y) 306 If c = VARCMP_LT Then 307 Return True 308 Else 309 Return False 310 End If 311 End Function 312 /* 313 Const Function Operator >(y As Variant) As Boolean 314 Dim c = Compare(This, y) 315 If c = VARCMP_GT Then 316 Return True 317 Else 318 Return False 319 End If 320 End Function 321 */ 291 322 Const Function Operator <=(y As Variant) As Boolean 292 Dim result = Compare(This, y) 293 Return result = VARCMP_LT Or result = VARCMP_EQ 323 Dim c = Compare(This, y) 324 If result = VARCMP_LT Or result = VARCMP_EQ Then 325 Return True 326 Else 327 Return False 328 End If 294 329 End Function 295 330 296 331 Const Function Operator >=(y As Variant) As Boolean 297 Dim result = Compare(This, y) 298 Return result = VARCMP_GT Or result = VARCMP_EQ 332 Dim c = Compare(This, y) 333 If result = VARCMP_GT Or result = VARCMP_EQ Then 334 Return True 335 Else 336 Return False 337 End If 299 338 End Function 300 339 … … 469 508 'ValDate 470 509 471 Const Function Val BStr() As BString510 Const Function ValStr() As BString 472 511 Dim r As VARIANT 473 512 ChangeType(r, 0, VT_BSTR) … … 477 516 End Function 478 517 479 Sub Val BStr(x As BString)518 Sub ValStr(x As BString) 480 519 Clear() 481 520 v.vt = VT_BSTR … … 497 536 Const Function ValObject() As VBObject 498 537 Dim r As VARIANT 499 ChangeType(r, 0, VT_DISPAT H)500 Dim o As VBO Bject538 ChangeType(r, 0, VT_DISPATCH) 539 Dim o As VBObject 501 540 o.Attach(GetPointer(VarPtr(r.val)) As *IDispatch) 502 541 Return o … … 517 556 Return VarPtr(v) 518 557 End Function 558 519 559 Private 520 560 v As VARIANT … … 523 563 VariantCopy(dst, src) 524 564 End Sub 525 565 526 566 527 567 Static Sub Move(ByRef dst As VARIANT, ByRef src As VARIANT) -
Include/com/vbobject.ab
r186 r192 12 12 End Sub 13 13 14 Sub VBObject(className As String) 15 VBObject(ToWCStr(className)) 16 End Sub 17 18 Sub VBObject(className As PCWSTR) 14 Sub VBObject(className As String, pOuter As *IUnknown, clsContext As DWord) 15 VBObject(ToWCStr(className), pOuter, clsContext) 16 End Sub 17 18 Sub VBObject(className As PCSTR, pOuter As *IUnknown, clsContext As DWord) 19 VBObject(ToWCStr(className), pOuter, clsContext) 20 End Sub 21 22 Sub VBObject(className As PCWSTR, pOuter As *IUnknown, clsContext As DWord) 19 23 pdisp = 0 20 24 Dim clsid As CLSID 21 25 Dim hr = _System_CLSIDFromString(className, clsid) 22 Dim hr2 = CoCreateInstance(clsid, 0, CLSCTX_ALL, IID_IDispatch, pdisp) 26 VBObject(clsid, pOuter, clsContext) 27 End Sub 28 29 Sub VBObject(ByRef clsid As CLSID, pOuter As *IUnknown, clsContext As DWord) 30 Dim hr = CoCreateInstance(clsid, pOuter, clsContext, IID_IDispatch, pdisp) 23 31 End Sub 24 32 … … 53 61 54 62 Function Equals(y As VBObject) As Boolean 55 Dim punkX = GetUnknown() 56 Dim punkY = y.GetUnknown() 57 Equals = (punkX == punkY) 58 punkX->Release() 59 punkY->Release() 63 Return _System_COMReferenceEquals(pdisp, y.pdisp) 60 64 End Function 61 65 /* 62 66 Override Function GetHashCode() As Long 63 Dim punk = GetUnknown()67 Dim punk = _System_GetUnknown(pdisp) 64 68 GetHashCode = _System_HashFromPtr(punk) 65 69 punk->Release() … … 79 83 End Sub 80 84 81 Function GetDispatch() As *IDispatch85 Function Copy() As *IDispatch 82 86 VBObject.Copy(GetDispatch, pdisp) 83 87 End Function … … 88 92 End Sub 89 93 90 Sub Detach()94 Function Detach() As *IDispatch 91 95 VBObject.Move(Detach, pdisp) 92 End Sub 96 End Function 97 98 Function Dispatch() As *IDispatch 99 Dispatch = pdisp 100 End Function 93 101 Private 94 102 Function GetCaller(name As PCWSTR) As DispatchCaller … … 96 104 Dim hr = pdisp->GetIDsOfNames(GUID_NULL, VarPtr(name), 1, LOCALE_USER_DEFAULT, VarPtr(dispid)) 97 105 Return New DispatchCaller(pdisp, dispid) 98 End Function99 100 Function GetUnknown() As *IUnknown101 If FAILDED(pdisp->QueryInterface(IID_Unknown, GetUnknown)) Then102 GetUnknown = 0103 End If104 106 End Function 105 107 … … 170 172 171 173 Sub Prop(ByRef arg As VARIANT) 172 Dim dispParams As DISPPARAMS 173 With dispParams 174 .rgvarg = VarPtr(arg) 175 .rgdispidNamedArgs = 0 176 .cArgs = 1 177 .cNamedArgs = 1 178 End With 179 Dim ret As VARIANT 180 Dim hr = pdisp->Invoke(dispid, GUID_NULL, LOCALE_USER_DEFAULT, DISPATCH_PROPERTYPUT, dispParams, ret, ByVal 0, 0) 181 Dispose() 174 setProp(arg, DISPATCH_PROPERTYPUT) 182 175 End Sub 183 176 … … 187 180 188 181 Sub PropRef(ByRef arg As VARIANT) 189 Dim dispParams As DISPPARAMS 190 With dispParams 191 .rgvarg = 1 192 .rgdispidNamedArgs = 0 193 .cArgs = VarPtr(arg) 194 .cNamedArgs = 0 195 End With 196 Dim ret As VARIANT 197 Dim hr = pdisp->Invoke(dispid, GUID_NULL, LOCALE_USER_DEFAULT, DISPATCH_PROPERTYPUTREF, dispParams, ret, ByVal 0, 0) 198 Dispose() 182 setProp(arg, DISPATCH_PROPERTYPUTREF) 199 183 End Sub 200 184 … … 228 212 Function Call(ByRef arg1 As Variant, ByRef arg2 As Variant) As Variant 229 213 Dim arg[1] As VARIANT 230 214 231 215 Return Call(2, VarPtr(arg1) As *VARIANT) 232 216 End Function 233 217 234 218 Private 219 Sub setProp(ByRef arg As VARIANT, callType As Word) 220 Dim dispidNamed = DISPID_PROPERTYPUT As DISPID 221 Dim dispParams As DISPPARAMS 222 With dispParams 223 .rgvarg = VarPtr(arg) 224 .rgdispidNamedArgs = VarPtr(dispidNamed) 225 .cArgs = 1 226 .cNamedArgs = 1 227 End With 228 Dim hr = pdisp->Invoke(dispid, GUID_NULL, LOCALE_USER_DEFAULT, callType, dispParams, ByVal 0, ByVal 0, 0) 229 Dispose() 230 End Sub 231 232 235 233 pdisp As *IDispatch 236 234 dispid As DISPID 237 235 End Class 238 /* 236 237 Function CallByName(obj As VBObject, procName As String, callType As Word, cArgs As Long, args As *VARIANT) As Variant 238 Return CallByName(obj.Dispatch, ToWCStr(procName), callType, cArgs, args) 239 End Function 240 241 Function CallByName(obj As VBObject, procName As PCWSTR, callType As Word, cArgs As Long, args As *VARIANT) As Variant 242 Return CallByName(obj.Dispatch, procName, callType, cArgs, args) 243 End Function 244 245 Function CallByName(obj As *IDispatch, name As PCWSTR, callType As Word, cArgs As Long, args As *VARIANT) As Variant 246 Dim dispid As DISPID 247 Dim hr = obj->GetIDsOfNames(GUID_NULL, VarPtr(name), 1, LOCALE_USER_DEFAULT, VarPtr(dispid)) 248 Dim dispParams As DISPPARAMS 249 With dispParams 250 .rgvarg = args 251 .rgdispidNamedArgs = 0 252 .cArgs = cArgs 253 .cNamedArgs = 0 254 End With 255 Dim ret As VARIANT 256 hr = obj->Invoke(dispid, GUID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, dispParams, ret, ByVal 0, 0) 257 CallByName.Attach(ret) 258 Return CallByName 259 End Function 260 239 261 Function CreateObject(className As PCWSTR) As VBObject 240 262 Return New VBObject(className) … … 244 266 Return New VBObject(ToWCStr(className)) 245 267 End Function 246 268 /* 247 269 #ifdef _WIN32_DCOM 248 270 Function CreateObject(className As PCWSTR, serverName As PCWSTR) As VBObject … … 250 272 Dim si As COSERVERINFO 251 273 Dim context As DWord 252 253 254 255 256 257 274 If /*Server = 0 OrElse* / Server[0] = 0 Then 275 context = CLSCTX_SERVER 276 Else 277 context = CLSCTX_REMOTE_SERVER 278 si.pwszName = serverName 279 End If 258 280 259 281 Dim hr = _System_CLSIDFromString(className, clsid) … … 270 292 Return Nothing 271 293 End If 272 End Function 294 End Function 273 295 274 296 Function CreateObject(className As String, serverName As String) As VBObject … … 279 301 Function _System_CLSIDFromString(pwString As PCWSTR, ByRef guid As GUID) As HRESULT 280 302 If pwString[0] = &h007b As WCHAR Then 281 ' 1文字目が { ならクラスIDの文字列表現と見なしCLSIDFromStringで変換。 282 _System_CLSIDFromString = CLSIDFromString(pwString, guid) 283 Else 284 _System_CLSIDFromString = CLSIDFromProgID(pwString, guid) 285 End If 303 ' 1文字目が { ならクラスIDの文字列表現と見なしCLSIDFromStringで変換。 304 _System_CLSIDFromString = CLSIDFromString(pwString, guid) 305 Else 306 _System_CLSIDFromString = CLSIDFromProgID(pwString, guid) 307 End If 308 End Function 309 310 Function _System_COMReferenceEquals(p As *IUnknown, q As *IUnknown) As Boolean 311 If p = q Then 312 Return True 313 Else If p = 0 Or q = 0 Then 314 Return False 315 End If 316 317 Dim punkX = _System_GetUnknown(p) 318 Dim punkY = _System_GetUnknown(q) 319 If punkX = punkY Then 320 _System_COMReferenceEquals = True 321 Else 322 _System_COMReferenceEquals = False 323 End If 324 punkX->Release() 325 punkY->Release() 326 End Function 327 328 Function _System_GetUnknown(p As *IUnknown) As *IUnknown 'pは任意のCOMインタフェース 329 If FAILDED(pdisp->QueryInterface(IID_Unknown, _System_GetUnknown)) Then 330 GetUnknown = 0 331 End If 286 332 End Function 287 333 -
Include/system/string.sbp
r177 r192 36 36 Function GetStr(psz As PSTR, len As SIZE_T, ByRef wcs As PWSTR) As SIZE_T 37 37 If psz = 0 Then Return 0 38 Dim sizeWCS = MultiByteToWideChar(CP_THREAD_ACP, 0, psz, len, 0, 0) + 139 wcs = _System_AllocForConvertedString(SizeOf (WCHAR) * sizeWCS) As PWSTR40 GetStr = MultiByteToWideChar(CP_THREAD_ACP, 0, psz, len, wcs, sizeWCS)38 Dim lenWCS = MultiByteToWideChar(CP_THREAD_ACP, 0, psz, len, 0, 0) 39 wcs = _System_AllocForConvertedString(SizeOf (WCHAR) * (lenWCS + 1)) As PWSTR 40 GetStr = MultiByteToWideChar(CP_THREAD_ACP, 0, psz, len, wcs, lenWCS) 41 41 wcs[GetStr] = 0 42 42 End Function … … 70 70 Function GetStr(psz As PWSTR, len As SIZE_T, ByRef mbs As PSTR) As SIZE_T 71 71 If psz = 0 Then Return 0 72 Dim sizeMBS = WideCharToMultiByte(CP_THREAD_ACP, 0, psz, len, 0, 0, 0, 0)73 mbs = _System_AllocForConvertedString(SizeOf (SByte) * ( sizeMBS + 1)) As PSTR74 GetStr = WideCharToMultiByte(CP_THREAD_ACP, 0, psz, len, mbs, sizeMBS, 0, 0) As SIZE_T72 Dim lenMBS = WideCharToMultiByte(CP_THREAD_ACP, 0, psz, len, 0, 0, 0, 0) 73 mbs = _System_AllocForConvertedString(SizeOf (SByte) * (lenMBS + 1)) As PSTR 74 GetStr = WideCharToMultiByte(CP_THREAD_ACP, 0, psz, len, mbs, lenMBS, 0, 0) As SIZE_T 75 75 mbs[GetStr] = 0 76 76 End Function -
Include/windows/WindowHandle.sbp
r178 r192 1 #ifndef __WINDOWS HANDLE_SBP__2 #define __WINDOWS HANDLE_SBP__1 #ifndef __WINDOWS_WINDOWHANDLE_SBP__ 2 #define __WINDOWS_WINDOWHANDLE_SBP__ 3 3 4 4 #ifdef _WIN64 5 Declare Function _System_GetWindowLongPtr Lib "user32" Alias "GetWindowLongPtrA"(hWnd As HWND, nIndex As Long) As LONG_PTR6 Declare Function _System_SetWindowLongPtr Lib "user32" Alias "SetWindowLongPtrA"(hWnd As HWND, nIndex As Long, l As LONG_PTR) As LONG_PTR5 Declare Function _System_GetWindowLongPtr Lib "user32" Alias _FuncName_GetWindowLongPtr (hWnd As HWND, nIndex As Long) As LONG_PTR 6 Declare Function _System_SetWindowLongPtr Lib "user32" Alias _FuncName_SetWindowLongPtr (hWnd As HWND, nIndex As Long, l As LONG_PTR) As LONG_PTR 7 7 #else 8 Declare Function _System_GetWindowLongPtr Lib "user32" Alias "GetWindowLongA"(hWnd As HWND, nIndex As Long) As LONG_PTR9 Declare Function _System_SetWindowLongPtr Lib "user32" Alias "SetWindowLongA"(hWnd As HWND, nIndex As Long, l As LONG_PTR) As LONG_PTR8 Declare Function _System_GetWindowLongPtr Lib "user32" Alias _FuncName_GetWindowLong (hWnd As HWND, nIndex As Long) As LONG_PTR 9 Declare Function _System_SetWindowLongPtr Lib "user32" Alias _FuncName_SetWindowLong (hWnd As HWND, nIndex As Long, l As LONG_PTR) As LONG_PTR 10 10 #endif 11 11 Declare Function _System_GetParent Lib "user32" Alias "GetParent" (hWnd As HWND) As HWND … … 18 18 Declare Function _System_ValidateRgn Lib "user32" Alias "ValidateRgn" (hWnd As HWND, hRgn As HRGN) As BOOL 19 19 Declare Function _System_BeginPaint Lib "user32" Alias "BeginPaint" (hWnd As HWND, ByRef ps As PAINTSTRUCT) As HDC 20 Declare Function _System_EndPaint Lib "user32" Alias "EndPaint" (hWnd As HWND, ByRef lpPaintAs PAINTSTRUCT) As HDC21 Declare Function _System_ClientToScreen Lib "user32" Alias "ClientToScreen" (hWnd As HWND, ByRef lpPoint As POINTAPI) As BOOL22 Declare Function _System_ScreenToClient Lib "user32" Alias "ScreenToClient" (hWnd As HWND, ByRef lpPoint As POINTAPI) As BOOL20 Declare Function _System_EndPaint Lib "user32" Alias "EndPaint" (hWnd As HWND, ByRef ps As PAINTSTRUCT) As HDC 21 Declare Function _System_ClientToScreen Lib "user32" Alias "ClientToScreen" (hWnd As HWND, ByRef Point As POINTAPI) As BOOL 22 Declare Function _System_ScreenToClient Lib "user32" Alias "ScreenToClient" (hWnd As HWND, ByRef Point As POINTAPI) As BOOL 23 23 Declare Function _System_CreateCaret Lib "user32" Alias "CreateCaret" (hWnd As HWND, hBitmap As HBITMAP, nWidth As Long, nHeight As Long) As BOOL 24 24 Declare Function _System_HideCaret Lib "user32" Alias "HideCaret" (hWnd As HWND) As BOOL … … 28 28 Declare Function _System_IsWindow Lib "user32" Alias "IsWindow" (hWnd As HWND) As BOOL 29 29 Declare Function _System_Isiconic Lib "user32" Alias "Isiconic" (hWnd As HWND) As BOOL 30 Declare Function _System_GetClientRect Lib "user32" Alias "GetClientRect" (hWnd As HWND, ByRef lpRect As RECT) As BOOL30 Declare Function _System_GetClientRect Lib "user32" Alias "GetClientRect" (hWnd As HWND, ByRef Rect As RECT) As BOOL 31 31 32 32 Class WindowHandle … … 41 41 End Sub 42 42 43 Sub WindowHandle( ByRefwnd As WindowHandle)43 Sub WindowHandle(wnd As WindowHandle) 44 44 hwnd = wnd.hwnd 45 45 End Sub … … 117 117 End Function 118 118 119 Const Function GetClassName(className As P STR, maxCount As Long) As Long119 Const Function GetClassName(className As PTSTR, maxCount As Long) As Long 120 120 Return GetClassName(className, maxCount) 121 121 End Function … … 145 145 End Function 146 146 147 Const Function GetDlgItemText(idDlgItem As Long, ps As P STR, maxCount As Long) As Long147 Const Function GetDlgItemText(idDlgItem As Long, ps As PTSTR, maxCount As Long) As Long 148 148 Return GetDlgItemText(hwnd, idDlgItem, ps, maxCount) 149 149 End Function … … 158 158 End Function 159 159 160 Const Function GetProp(psz As PCSTR) As HANDLE 160 Const Function GetProp(str As String) As HANDLE 161 Return GetProp(hwnd, ToTCStr(str)) 162 End Function 163 164 Const Function GetProp(psz As PCTSTR) As HANDLE 161 165 Return GetProp(hwnd, psz) 162 166 End Function 163 167 164 168 Const Function GetProp(atom As ATOM) As HANDLE 165 Return GetProp(hwnd, atom As ULONG_PTR As PC STR)169 Return GetProp(hwnd, atom As ULONG_PTR As PCTSTR) 166 170 End Function 167 171 … … 202 206 End Function 203 207 204 Const Function GetText(ps As P STR, maxCount As Long) As Boolean208 Const Function GetText(ps As PTSTR, maxCount As Long) As Boolean 205 209 Return GetWindowText(ps, maxCount) As Boolean 206 210 End Function … … 215 219 216 220 Const Function GetWindowProcessThreadId(ByRef processId As DWord) As DWord 217 Return GetWindowProcessThreadId(hwnd, processId)221 Return GetWindowProcessThreadId(hwnd, VarPtr(processId)) 218 222 End Function 219 223 … … 294 298 End Function 295 299 296 Const Function MessageBox(text As PC STR, caption As PCSTR, uType As DWord) As Long300 Const Function MessageBox(text As PCTSTR, caption As PCTSTR, uType As DWord) As Long 297 301 Return MessageBox(hwnd, text, caption, uType) 298 302 End Function 299 303 300 Const Function MessageBox(text As PC STR, caption As PCSTR) As Long304 Const Function MessageBox(text As PCTSTR, caption As PCTSTR) As Long 301 305 Return MessageBox(hwnd, text, caption, MB_OK) 302 306 End Function 303 307 304 Const Function MessageBox(text As PC STR) As Long308 Const Function MessageBox(text As PCTSTR) As Long 305 309 Return MessageBox(hwnd, text, 0, MB_OK) 306 310 End Function … … 350 354 End Function 351 355 352 Function RemoveProp(psz As PCSTR) As HANDLE 356 Function RemoveProp(str As String) As HANDLE 357 Return RemoveProp(hwnd, ToTCStr(str)) 358 End Function 359 360 Function RemoveProp(psz As PCTSTR) As HANDLE 353 361 Return RemoveProp(hwnd, psz) 354 362 End Function 355 363 356 364 Function RemoveProp(atom As ATOM) As HANDLE 357 Return RemoveProp(hwnd, atom As ULONG_PTR As PC STR)365 Return RemoveProp(hwnd, atom As ULONG_PTR As PCTSTR) 358 366 End Function 359 367 … … 386 394 End Function 387 395 388 Function SetDlgItemText(idDlgItem As Long, psz As PC STR) As Boolean396 Function SetDlgItemText(idDlgItem As Long, psz As PCTSTR) As Boolean 389 397 Return SetDlgItemText(hwnd, idDlgItem, psz) As Boolean 390 398 End Function … … 414 422 End Function 415 423 416 Function SetProp(psz As PCSTR, hData As HANDLE) As Boolean 424 Function SetProp(str As String, hData As HANDLE) As Boolean 425 Return SetProp(hwnd, ToTCStr(str), hData) As Boolean 426 End Function 427 428 Function SetProp(psz As PCTSTR, hData As HANDLE) As Boolean 417 429 Return SetProp(hwnd, psz, hData) As Boolean 418 430 End Function 419 431 420 432 Function SetProp(atom As ATOM, hData As HANDLE) As Boolean 421 Return SetProp(atom As ULONG_PTR As PC STR, hData) As Boolean433 Return SetProp(atom As ULONG_PTR As PCTSTR, hData) As Boolean 422 434 End Function 423 435 … … 468 480 End Function 469 481 470 Function SetText(psz As PC STR) As Boolean482 Function SetText(psz As PCTSTR) As Boolean 471 483 Return SetWindowText(hwnd, psz) As Boolean 484 End Function 485 486 Function SetText(str As String) As Boolean 487 Return SetWindowText(hwnd, ToTCStr(str)) As Boolean 472 488 End Function 473 489 … … 682 698 End Sub 683 699 700 Const Function Prop(str As String) As HANDLE 701 Return GetProp(str) 702 End Function 703 704 Const Function Prop(psz As PCTSTR) As HANDLE 705 Return GetProp(psz) 706 End Function 707 708 Const Function Prop(atom As ATOM) As HANDLE 709 Return GetProp(atom) 710 End Function 711 712 Sub Prop(str As PCTSTR, h As HANDLE) 713 SetProp(str, h) 714 End Sub 715 716 Sub Prop(psz As PCTSTR, h As HANDLE) 717 SetProp(psz, h) 718 End Sub 719 720 Sub Prop(atom As ATOM, h As HANDLE) 721 SetProp(atom, h) 722 End Sub 723 684 724 Const Function Text() As String 685 With Text 686 .ReSize(GetWindowTextLength(hwnd)) 687 .ReSize(GetWindowText(hwnd, .Chars, .Length + 1)) 688 End With 689 End Function 690 691 Sub Text(newText As PCSTR) 725 Dim size = GetWindowTextLength(hwnd) + 1 726 Dim p = _System_malloc(SizeOf (TCHAR) * size) As PTSTR 727 Dim length = GetWindowText(hwnd, p, size) 728 Return New String(p, length As SIZE_T) 729 End Function 730 731 Sub Text(newText As String) 732 SetWindowText(hwnd, ToTCStr(newText)) 733 End Sub 734 735 Sub Text(newText As PCTSTR) 692 736 SetWindowText(hwnd, newText) 693 737 End Sub … … 740 784 End Class 741 785 742 #endif '__WINDOWS HANDLE_SBP__786 #endif '__WINDOWS_WINDOWHANDLE_SBP__
Note:
See TracChangeset
for help on using the changeset viewer.