[170] | 1 | ' guiddef.ab
|
---|
| 2 |
|
---|
| 3 | Type GUID
|
---|
| 4 | Data1 As DWord
|
---|
| 5 | Data2 As Word
|
---|
| 6 | Data3 As Word
|
---|
| 7 | Data4[7] As Byte
|
---|
| 8 | End Type
|
---|
| 9 |
|
---|
| 10 | Dim GUID_NULL = [0, 0, 0, [0, 0, 0, 0, 0, 0, 0, 0]] As GUID
|
---|
| 11 |
|
---|
| 12 | TypeDef IID = GUID
|
---|
| 13 | TypeDef CLSID = GUID
|
---|
| 14 | TypeDef FMTID = GUID
|
---|
| 15 |
|
---|
| 16 | 'Dim IID_NULL = GUID_NULL
|
---|
| 17 | 'Dim CLSID_NULL = GUID_NULL
|
---|
| 18 | 'Dim FMTID_NULL = GUID_NULL
|
---|
| 19 |
|
---|
| 20 | Function IsEqualGUID(ByRef x As GUID, ByRef y As GUID) As BOOL
|
---|
| 21 | IsEqualGUID = (memcmp(VarPtr(x), VarPtr(y), SizeOf (GUID)) = 0)
|
---|
| 22 | End Function
|
---|
| 23 |
|
---|
| 24 | Function IsEqualIID(ByRef x As IID, ByRef y As IID) As BOOL
|
---|
| 25 | IsEqualIID = (memcmp(VarPtr(x), VarPtr(y), SizeOf (IID)) = 0)
|
---|
| 26 | End Function
|
---|
| 27 |
|
---|
| 28 | Function IsEqualCLSID(ByRef x As CLSID, ByRef y As CLSID) As BOOL
|
---|
| 29 | IsEqualCLSID = (memcmp(VarPtr(x), VarPtr(y), SizeOf (CLSID)) = 0)
|
---|
| 30 | End Function
|
---|
| 31 |
|
---|
| 32 | #ifndef _SYS_GUID_OPERATOR_EQ_
|
---|
| 33 | #ifdef _NO_SYS_GUID_OPERATOR_EQ_
|
---|
| 34 | #define _SYS_GUID_OPERATOR_EQ_
|
---|
| 35 | /*
|
---|
| 36 | Function Operator ==(ByRef x As GUID, ByRef y As GUID) As Boolean
|
---|
| 37 | Return IsEqualGUID(x, y) <> FALSE
|
---|
| 38 | End Function
|
---|
| 39 |
|
---|
| 40 | Function Operator <>(ByRef x As GUID, ByRef y As GUID) As Boolean
|
---|
| 41 | Return IsEqualGUID(x, y) = FALSE
|
---|
| 42 | End Function
|
---|
| 43 | */
|
---|
| 44 | #endif
|
---|
| 45 | #endif
|
---|