- Timestamp:
- Apr 2, 2007, 11:55:39 PM (18 years ago)
- Location:
- Include
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/OAIdl.ab
r192 r200 1326 1326 TypeDef LPTYPEINFO = /* [unique] */ *ITypeInfo 1327 1327 1328 Dim IID_ITypeInfo = [& H00020401, &h0000, &h0000, [&hC0, &h00, &h00, &h00, &h00, &h00, &h00, &h46]] As IID1328 Dim IID_ITypeInfo = [&h00020401, &h0000, &h0000, [&hC0, &h00, &h00, &h00, &h00, &h00, &h00, &h46]] As IID 1329 1329 1330 1330 Interface ITypeInfo … … 1429 1429 TypeDef LPTYPEINFO2 = /* [unique] */ *ITypeInfo2 1430 1430 1431 Dim IID_ITypeInfo2 = [& H00020412, &h0000, &h0000, [&hC0, &h00, &h00, &h00, &h00, &h00, &h00, &h46]] As IID1431 Dim IID_ITypeInfo2 = [&h00020412, &h0000, &h0000, [&hC0, &h00, &h00, &h00, &h00, &h00, &h00, &h46]] As IID 1432 1432 1433 1433 Interface ITypeInfo2 … … 1490 1490 #endif /* __ITypeInfo2_INTERFACE_DEFINED__ */ 1491 1491 1492 #ifdef __UNDECLARED__1493 1494 1492 #ifndef __ITypeLib_INTERFACE_DEFINED__ 1495 1493 #define __ITypeLib_INTERFACE_DEFINED__ … … 1499 1497 1500 1498 /* [v1_enum] */ 1501 Enum SYSKIND1499 Const Enum SYSKIND 1502 1500 SYS_WIN16 = 0 1503 SYS_WIN32 = SYS_WIN16 +11504 SYS_MAC = SYS_WIN32 + 11505 SYS_WIN64 = SYS_MAC + 11501 SYS_WIN32 = 1 1502 SYS_MAC = 2 1503 SYS_WIN64 = 3 1506 1504 End Enum 1507 1505 1508 1506 /* [v1_enum] */ 1509 Enum LIBFLAGS1507 Const Enum LIBFLAGS 1510 1508 LIBFLAG_FRESTRICTED = &h1 1511 1509 LIBFLAG_FCONTROL = &h2 … … 1514 1512 End Enum 1515 1513 1516 TypeDef /* [unique] */ ITypeLib *LPTYPELIB;1514 TypeDef LPTYPELIB = /* [unique] */ *ITypeLib 1517 1515 1518 1516 Type TLIBATTR … … 1525 1523 End Type 1526 1524 1527 TypeDef struct tagTLIBATTR *LPTLIBATTR; 1528 1529 1530 EXTERN_C const IID IID_ITypeLib; 1531 1532 MIDL_INTERFACE("00020402-0000-0000-C000-000000000046") 1533 ITypeLib : public IUnknown 1534 { 1535 public: 1536 virtual /* [local] */ UINT STDMETHODCALLTYPE GetTypeInfoCount( void) As HRESULT 1537 1538 Function GetTypeInfo( 1539 /* [in] */ UINT index, 1540 /* [out] */ ITypeInfo **ppTInfo) As HRESULT 1541 1542 Function GetTypeInfoType( 1543 /* [in] */ UINT index, 1544 /* [out] */ TYPEKIND *pTKind) As HRESULT 1545 1546 Function GetTypeInfoOfGuid( 1547 /* [in] */ REFGUID guid, 1548 /* [out] */ ITypeInfo **ppTinfo) As HRESULT 1549 1550 virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetLibAttr( 1551 /* [out] */ TLIBATTR **ppTLibAttr) As HRESULT 1552 1553 Function GetTypeComp( 1554 /* [out] */ ITypeComp **ppTComp) As HRESULT 1555 1556 virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetDocumentation( 1557 /* [in] */ INT index, 1558 /* [out] */ BSTR *pBstrName, 1559 /* [out] */ BSTR *pBstrDocString, 1560 /* [out] */ DWORD *pdwHelpContext, 1561 /* [out] */ BSTR *pBstrHelpFile) As HRESULT 1562 1563 virtual /* [local] */ HRESULT STDMETHODCALLTYPE IsName( 1564 /* [out][in] */ LPOLESTR szNameBuf, 1565 /* [in] */ ULONG lHashVal, 1566 /* [out] */ BOOL *pfName) As HRESULT 1567 1568 virtual /* [local] */ HRESULT STDMETHODCALLTYPE FindName( 1569 /* [out][in] */ LPOLESTR szNameBuf, 1570 /* [in] */ ULONG lHashVal, 1571 /* [length_is][size_is][out] */ ITypeInfo **ppTInfo, 1572 /* [length_is][size_is][out] */ MEMBERID *rgMemId, 1573 /* [out][in] */ USHORT *pcFound) As HRESULT 1574 1575 virtual /* [local] */ void STDMETHODCALLTYPE ReleaseTLibAttr( 1576 /* [in] */ TLIBATTR *pTLibAttr) As HRESULT 1577 1578 }; 1525 TypeDef LPTLIBATTR = TLIBATTR 1526 1527 Dim ITypeLib = [&h00020402, &h0000, &h0000, [&hC0, &h00, &h00, &h00, &h00, &h00, &h00, &h46]] As IID 1528 1529 Interface ITypeLib 1530 Inherits IUnknown 1531 1532 Function /* [local] */ GetTypeInfoCount() As DWord 1533 Function GetTypeInfo( 1534 /* [in] */ index As DWord, 1535 /* [out] */ ByRef pTInfo As *ITypeInfo) As HRESULT 1536 Function GetTypeInfoType( 1537 /* [in] */ index As DWord, 1538 /* [out] */ ByRef TKind As TYPEKIND) As HRESULT 1539 Function GetTypeInfoOfGuid( 1540 /* [in] */ ByRef guid As GUID, 1541 /* [out] */ ByRef pTInfo As *ITypeInfo) As HRESULT 1542 Function /* [local] */ GetLibAttr( 1543 /* [out] */ ByRef pTLibAttr As *TLIBATTR) As HRESULT 1544 Function GetTypeComp( 1545 /* [out] */ ByRef ppTComp As *ITypeComp) As HRESULT 1546 Function /* [local] */ GetDocumentation( 1547 /* [in] */ index As Long, 1548 /* [out] */ ByRef BstrName As BSTR, 1549 /* [out] */ ByRef BstrDocString As BSTR, 1550 /* [out] */ ByRef dwHelpContext As DWord, 1551 /* [out] */ ByRef BstrHelpFile As BSTR) As HRESULT 1552 Function /* [local] */ IsName( 1553 /* [out][in] */ szNameBuf As LPOLESTR, 1554 /* [in] */ lHashVal As DWord, 1555 /* [out] */ ByRef pfName As BOOL) As HRESULT 1556 Function /* [local] */ FindName( 1557 /* [out][in] */ szNameBuf As LPOLESTR, 1558 /* [in] */ lHashVal As DWord, 1559 /* [length_is][size_is][out] */ ppTInfo As **ITypeInfo, 1560 /* [length_is][size_is][out] */ rgMemId As *MEMBERID, 1561 /* [out][in] */ ByRef cFound As Word) As HRESULT 1562 Sub /* [local] */ ReleaseTLibAttr( 1563 /* [in] */ ByRef TLibAttr As TLIBATTR) 1564 End Interface 1579 1565 1580 1566 #endif /* __ITypeLib_INTERFACE_DEFINED__ */ 1581 1567 1568 1569 #ifdef __UNDECLARED__ 1582 1570 1583 1571 #ifndef __ITypeLib2_INTERFACE_DEFINED__ -
Include/OleAuto.ab
r192 r200 24 24 #include <oaidl.ab> 25 25 'Dummy 26 Interface ITypeLib27 Inherits IUnknown28 End Interface29 30 26 Interface IErrorInfo 31 27 Inherits IUnknown -
Include/com/currency.ab
r192 r200 1 1 ' com/currency.ab 2 3 #require <com/variant.ab> 4 5 #ifndef _COM_CURRENCY_AB 6 #define _COM_CURRENCY_AB 2 7 3 8 Class Currency 4 9 Public 10 /* 11 Sub Currency(x As CY) 12 cy = x 13 End Sub 14 */ 15 Sub Currency(x As Double) 16 VarCyFromR8(x, cy) 17 End Sub 18 /* 19 Sub Currency(x As Int64) 20 VarCyFromI8(x, cy) 21 End Sub 22 */ 5 23 Const Function Operator +() As Currency 6 24 Return New Currency(This) … … 68 86 VarCyRound(This.cy, c, Round.cy) 69 87 End Function 88 89 Const Function Cy() As CY 90 Return cy 91 End Function 92 93 Sub Cy(c As CY) 94 cy = c 95 End Sub 96 97 Const Function ToDouble() As Double 98 VarR8FromCy(cy, ToDouble) 99 End Function 100 101 Const Function ToInt64() As Int64 102 VarI8FromCy(cy, ToInt64) 103 End Function 104 105 Const Function ToVariant() As Variant 106 Return New Variant(This) 107 End Function 108 109 Override Function ToString() As String 110 Dim bs As BSTR 111 VarBstrFromCy(cy, LOCALE_USER_DEFAULT, LOCALE_USE_NLS, bs) 112 ToString = New String(bs As PCWSTR, SysStringLen(bs) As Long) 113 SysFreeString(bs) 114 End Function 115 116 Override Function GetHashCode() As Long 117 Return HIDWORD(cy) Xor LODWORD(cy) 118 End Function 70 119 Private 71 120 cy As CY 72 121 End Class 122 123 #endif '_COM_CURRENCY_AB -
Include/com/index.ab
r192 r200 3 3 #require <com/bstring.ab> 4 4 #require <com/variant.ab> 5 #require <com/vbo jbect.ab>5 #require <com/vbobject.ab> 6 6 #require <com/currency.ab> -
Include/com/variant.ab
r192 r200 6 6 #require <oaidl.ab> 7 7 #require <oleauto.ab> 8 #require <com/bstring.ab> 9 #include <com/vbobject.ab> 8 #require <com/index.ab> 10 9 11 10 Class Variant … … 111 110 End Sub 112 111 112 Sub Variant(n As Currency) 113 v.vt = VT_CY 114 SetQWord(VarPtr(v.val), n.Cy As QWord) 115 End Sub 116 117 113 118 Sub ~Variant() 114 119 Clear() … … 504 509 End Sub 505 510 506 'ValCy 507 511 Const Function ValCy() As Currency 512 End Function 513 514 Sub ValCy(x As Currency) 515 End Sub 516 508 517 'ValDate 509 518 … … 557 566 End Function 558 567 568 Static Function OptionalParam() As Variant 569 ' If _System_VariantOptionalParam = Nothing Then 570 ' 'ToDo マルチスレッド対応 571 _System_VariantOptionalParam = New Variant 572 _System_VariantOptionalParam.ValError = DISP_E_PARAMNOTFOUND 573 ' End If 574 Return _System_VariantOptionalParam 575 End Function 559 576 Private 560 577 v As VARIANT … … 570 587 End Sub 571 588 End Class 589 590 Dim _System_VariantOptionalParam = Nothing As Variant 591 572 592 /* 573 593 Function Abs(v As Variant) As Variant -
Include/com/vbobject.ab
r192 r200 34 34 pdisp = obj.pdisp 35 35 pdisp->AddRef() 36 End Sub37 38 Sub Operator =(ByRef obj As VBObject)39 ~VBObject()40 VBObject(obj)41 36 End Sub 42 37 … … 206 201 End Function 207 202 208 Function Call(arg1 As Variant) As Variant 209 Return Call(1, arg1.PtrToVariant) 210 End Function 211 212 Function Call(ByRef arg1 As Variant, ByRef arg2 As Variant) As Variant 213 Dim arg[1] As VARIANT 214 215 Return Call(2, VarPtr(arg1) As *VARIANT) 216 End Function 217 203 Function Call(arg0 As Variant) As Variant 204 Return Call(1, arg0.PtrToVariant) 205 End Function 206 207 Function Call(arg0 As Variant, arg1 As Variant) As Variant 208 Dim arg[ELM(2)] As VARIANT 209 arg[0] = arg0.Copy() 210 arg[1] = arg1.Copy() 211 Return Call(2, arg) 212 End Function 213 214 Function Call(arg0 As Variant, arg1 As Variant, arg2 As Variant) As Variant 215 Dim arg[ELM(3)] As VARIANT 216 arg[0] = arg0.Copy() 217 arg[1] = arg1.Copy() 218 arg[2] = arg2.Copy() 219 Return Call(3, arg) 220 End Function 221 222 Function Call(arg0 As Variant, arg1 As Variant, arg2 As Variant, arg3 As Variant) As Variant 223 Dim arg[ELM(4)] As VARIANT 224 arg[0] = arg0.Copy() 225 arg[1] = arg1.Copy() 226 arg[2] = arg2.Copy() 227 arg[3] = arg3.Copy() 228 Return Call(4, arg) 229 End Function 230 231 /* 232 Function Call(arg0 = Variant.OptionalParam As Variant, arg1 = Variant.OptionalParam As Variant, 233 arg2 = Variant.OptionalParam As Variant, arg3 = Variant.OptionalParam As Variant, 234 arg4 = Variant.OptionalParam As Variant, arg5 = Variant.OptionalParam As Variant, 235 arg6 = Variant.OptionalParam As Variant, arg7 = Variant.OptionalParam As Variant, 236 arg8 = Variant.OptionalParam As Variant, arg9 = Variant.OptionalParam As Variant) As Variant 237 Dim arg[ELM(10)] As VARIANT 238 arg[0] = arg0.Copy() 239 arg[1] = arg1.Copy() 240 arg[2] = arg2.Copy() 241 arg[3] = arg3.Copy() 242 arg[4] = arg3.Copy() 243 arg[5] = arg4.Copy() 244 arg[6] = arg5.Copy() 245 arg[7] = arg6.Copy() 246 arg[8] = arg7.Copy() 247 arg[9] = arg8.Copy() 248 Return Call(10, arg) 249 End Function 250 */ 218 251 Private 219 252 Sub setProp(ByRef arg As VARIANT, callType As Word)
Note:
See TracChangeset
for help on using the changeset viewer.