home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 16 / IOPROG_16.ISO / soft / macaxsdk / macsdk.hqx / ActiveX DR3 SDK / ActiveX SDK / Common / CXBindCtx.cpp < prev    next >
MacBinary  |  1997-07-21  |  9.4 KB  |  [TEXT/CWIE]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Mon Jul 21 15:22:40 1997, modified Mon Jul 21 15:22:40 1997, creator 'CWIE', type ASCII, 8879 bytes "CXBindCtx.cpp" , at 0x232f 474 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[CWIE]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0d 43 58 42 69 6e 64 | 43 74 78 2e 63 70 70 00 |..CXBind|Ctx.cpp.|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 01 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 22 af 00 | 00 01 da af f9 67 80 af |....."..|.....g..|
|00000060| f9 67 80 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.g......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 3f d0 00 00 |........|....?...|
|00000080| 2f 2f 0d 2f 2f 20 20 43 | 58 42 69 6e 64 43 74 78 |//.// C|XBindCtx|
|00000090| 2e 63 70 70 0d 2f 2f 0d | 2f 2f 20 3e 3e 3e 20 a9 |.cpp.//.|// >>> .|
|000000a0| 20 31 39 39 36 2d 31 39 | 39 37 20 4d 69 63 72 6f | 1996-19|97 Micro|
|000000b0| 73 6f 66 74 20 43 6f 72 | 70 6f 72 61 74 69 6f 6e |soft Cor|poration|
|000000c0| 2e 20 20 41 6c 6c 20 72 | 69 67 68 74 73 20 72 65 |. All r|ights re|
|000000d0| 73 65 72 76 65 64 2e 20 | 3c 3c 3c 0d 2f 2f 0d 2f |served. |<<<.//./|
|000000e0| 2f 20 20 56 65 72 79 20 | 62 61 73 69 63 20 69 6d |/ Very |basic im|
|000000f0| 70 6c 65 6d 65 6e 74 61 | 74 69 6f 6e 20 6f 66 20 |plementa|tion of |
|00000100| 74 68 65 20 49 42 69 6e | 64 43 74 78 20 69 6e 74 |the IBin|dCtx int|
|00000110| 65 72 66 61 63 65 2e 20 | 20 57 65 20 61 73 73 75 |erface. | We assu|
|00000120| 6d 65 20 74 68 61 74 20 | 77 65 20 6f 6e 6c 79 0d |me that |we only.|
|00000130| 2f 2f 20 20 68 61 76 65 | 20 74 68 65 20 62 61 73 |// have| the bas|
|00000140| 69 63 20 69 6e 2d 70 72 | 6f 63 20 43 4f 4d 20 44 |ic in-pr|oc COM D|
|00000150| 4c 4c 20 77 68 69 63 68 | 20 64 6f 65 73 6e 27 74 |LL which| doesn't|
|00000160| 20 73 75 70 70 6f 72 74 | 20 74 68 65 20 43 72 65 | support| the Cre|
|00000170| 61 74 65 42 69 6e 64 43 | 74 78 20 41 50 49 2e 0d |ateBindC|tx API..|
|00000180| 2f 2f 20 20 54 68 69 73 | 20 69 6d 70 6c 65 6d 65 |// This| impleme|
|00000190| 6e 74 61 74 69 6f 6e 20 | 6e 65 65 64 20 6f 6e 6c |ntation |need onl|
|000001a0| 79 20 73 75 70 70 6f 72 | 74 20 74 68 65 20 6d 69 |y suppor|t the mi|
|000001b0| 6e 69 6d 75 6d 20 73 65 | 74 20 6f 66 20 66 75 6e |nimum se|t of fun|
|000001c0| 63 74 69 6f 6e 61 6c 69 | 74 79 20 66 6f 72 0d 2f |ctionali|ty for./|
|000001d0| 2f 20 20 6f 75 72 20 4e | 65 74 73 63 61 70 65 20 |/ our N|etscape |
|000001e0| 55 52 4c 20 6d 6f 6e 69 | 6b 65 72 2e 0d 2f 2f 0d |URL moni|ker..//.|
|000001f0| 0d 23 64 65 66 69 6e 65 | 20 46 41 52 0d 23 69 6e |.#define| FAR.#in|
|00000200| 63 6c 75 64 65 20 22 41 | 58 43 6f 6e 66 69 67 2e |clude "A|XConfig.|
|00000210| 68 22 0d 0d 23 69 6e 63 | 6c 75 64 65 20 3c 6f 6c |h"..#inc|lude <ol|
|00000220| 65 32 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 20 3c |e2.h>.#i|nclude <|
|00000230| 64 69 73 70 61 74 63 68 | 2e 68 3e 0d 23 69 6e 63 |dispatch|.h>.#inc|
|00000240| 6c 75 64 65 20 3c 77 69 | 6e 74 79 70 65 73 2e 68 |lude <wi|ntypes.h|
|00000250| 3e 0d 23 69 6e 63 6c 75 | 64 65 20 22 43 58 42 69 |>.#inclu|de "CXBi|
|00000260| 6e 64 43 74 78 2e 68 22 | 0d 0d 43 58 42 69 6e 64 |ndCtx.h"|..CXBind|
|00000270| 43 74 78 3a 3a 7e 43 58 | 42 69 6e 64 43 74 78 28 |Ctx::~CX|BindCtx(|
|00000280| 29 0d 7b 0d 20 20 20 20 | 4c 50 58 4f 42 4a 45 43 |).{. |LPXOBJEC|
|00000290| 54 50 41 52 41 4d 20 70 | 43 75 72 72 65 6e 74 50 |TPARAM p|CurrentP|
|000002a0| 61 72 61 6d 3b 0d 20 20 | 20 20 4c 50 58 4f 42 4a |aram;. | LPXOBJ|
|000002b0| 45 43 54 50 41 52 41 4d | 20 70 54 65 6d 70 50 61 |ECTPARAM| pTempPa|
|000002c0| 72 61 6d 3b 0d 0d 20 20 | 20 20 2f 2f 20 20 55 73 |ram;.. | // Us|
|000002d0| 65 66 75 6c 20 6f 6e 6c | 79 20 69 66 20 6f 75 72 |eful onl|y if our|
|000002e0| 20 55 52 4c 20 6d 6f 6e | 69 6b 65 72 20 73 75 70 | URL mon|iker sup|
|000002f0| 70 6f 72 74 73 20 42 69 | 6e 64 54 6f 4f 62 6a 65 |ports Bi|ndToObje|
|00000300| 63 74 2e 0d 20 20 20 20 | 2f 2f 20 20 52 65 6c 65 |ct.. |// Rele|
|00000310| 61 73 65 42 6f 75 6e 64 | 4f 62 6a 65 63 74 73 28 |aseBound|Objects(|
|00000320| 29 3b 0d 0d 20 20 20 20 | 2f 2f 20 20 52 65 6c 65 |);.. |// Rele|
|00000330| 61 73 65 20 61 6e 79 20 | 72 65 67 69 73 74 65 72 |ase any |register|
|00000340| 65 64 20 6f 62 6a 65 63 | 74 20 70 61 72 61 6d 65 |ed objec|t parame|
|00000350| 74 65 72 73 20 61 6e 64 | 20 64 65 73 74 72 6f 79 |ters and| destroy|
|00000360| 20 74 68 65 20 6c 69 73 | 74 2e 0d 20 20 20 20 66 | the lis|t.. f|
|00000370| 6f 72 20 28 70 43 75 72 | 72 65 6e 74 50 61 72 61 |or (pCur|rentPara|
|00000380| 6d 20 3d 20 6d 5f 70 50 | 61 72 61 6d 4c 69 73 74 |m = m_pP|aramList|
|00000390| 3b 20 70 43 75 72 72 65 | 6e 74 50 61 72 61 6d 20 |; pCurre|ntParam |
|000003a0| 21 3d 20 4e 55 4c 4c 3b | 20 29 20 7b 0d 20 20 20 |!= NULL;| ) {. |
|000003b0| 20 20 20 20 20 70 54 65 | 6d 70 50 61 72 61 6d 20 | pTe|mpParam |
|000003c0| 3d 20 70 43 75 72 72 65 | 6e 74 50 61 72 61 6d 3b |= pCurre|ntParam;|
|000003d0| 0d 20 20 20 20 20 20 20 | 20 70 43 75 72 72 65 6e |. | pCurren|
|000003e0| 74 50 61 72 61 6d 20 3d | 20 70 43 75 72 72 65 6e |tParam =| pCurren|
|000003f0| 74 50 61 72 61 6d 2d 3e | 70 4e 65 78 74 50 61 72 |tParam->|pNextPar|
|00000400| 61 6d 3b 0d 20 20 20 20 | 20 20 20 20 70 54 65 6d |am;. | pTem|
|00000410| 70 50 61 72 61 6d 2d 3e | 70 75 6e 6b 4f 62 6a 65 |pParam->|punkObje|
|00000420| 63 74 2d 3e 52 65 6c 65 | 61 73 65 28 29 3b 0d 20 |ct->Rele|ase();. |
|00000430| 20 20 20 20 20 20 20 43 | 6f 54 61 73 6b 4d 65 6d | C|oTaskMem|
|00000440| 46 72 65 65 28 70 54 65 | 6d 70 50 61 72 61 6d 29 |Free(pTe|mpParam)|
|00000450| 3b 0d 20 20 20 20 7d 0d | 7d 0d 0d 2f 2f 0d 2f 2f |;. }.|}..//.//|
|00000460| 20 20 43 58 42 69 6e 64 | 43 74 78 3a 3a 4c 6f 6f | CXBind|Ctx::Loo|
|00000470| 6b 75 70 0d 2f 2f 0d 0d | 42 4f 4f 4c 0d 43 58 42 |kup.//..|BOOL.CXB|
|00000480| 69 6e 64 43 74 78 3a 3a | 4c 6f 6f 6b 75 70 28 4c |indCtx::|Lookup(L|
|00000490| 50 4f 4c 45 53 54 52 20 | 70 73 7a 4b 65 79 2c 20 |POLESTR |pszKey, |
|000004a0| 4c 50 58 4f 42 4a 45 43 | 54 50 41 52 41 4d 20 2a |LPXOBJEC|TPARAM *|
|000004b0| 70 70 50 61 72 61 6d 2c | 20 42 4f 4f 4c 20 66 52 |ppParam,| BOOL fR|
|000004c0| 65 6d 6f 76 65 29 0d 7b | 0d 20 20 20 20 4c 50 58 |emove).{|. LPX|
|000004d0| 4f 42 4a 45 43 54 50 41 | 52 41 4d 20 70 50 72 65 |OBJECTPA|RAM pPre|
|000004e0| 76 50 61 72 61 6d 3b 0d | 20 20 20 20 4c 50 58 4f |vParam;.| LPXO|
|000004f0| 42 4a 45 43 54 50 41 52 | 41 4d 20 70 43 75 72 72 |BJECTPAR|AM pCurr|
|00000500| 65 6e 74 50 61 72 61 6d | 3b 0d 0d 20 20 20 20 66 |entParam|;.. f|
|00000510| 6f 72 20 28 70 50 72 65 | 76 50 61 72 61 6d 20 3d |or (pPre|vParam =|
|00000520| 20 4e 55 4c 4c 2c 20 70 | 43 75 72 72 65 6e 74 50 | NULL, p|CurrentP|
|00000530| 61 72 61 6d 20 3d 20 6d | 5f 70 50 61 72 61 6d 4c |aram = m|_pParamL|
|00000540| 69 73 74 3b 20 70 43 75 | 72 72 65 6e 74 50 61 72 |ist; pCu|rrentPar|
|00000550| 61 6d 20 21 3d 20 4e 55 | 4c 4c 3b 0d 20 20 20 20 |am != NU|LL;. |
|00000560| 20 20 20 20 70 50 72 65 | 76 50 61 72 61 6d 20 3d | pPre|vParam =|
|00000570| 20 70 43 75 72 72 65 6e | 74 50 61 72 61 6d 2c 20 | pCurren|tParam, |
|00000580| 70 43 75 72 72 65 6e 74 | 50 61 72 61 6d 20 3d 20 |pCurrent|Param = |
|00000590| 70 43 75 72 72 65 6e 74 | 50 61 72 61 6d 2d 3e 70 |pCurrent|Param->p|
|000005a0| 4e 65 78 74 50 61 72 61 | 6d 29 20 7b 0d 20 20 20 |NextPara|m) {. |
|000005b0| 20 20 20 20 20 69 66 20 | 28 73 74 72 63 6d 70 28 | if |(strcmp(|
|000005c0| 70 43 75 72 72 65 6e 74 | 50 61 72 61 6d 2d 3e 6b |pCurrent|Param->k|
|000005d0| 65 79 2c 20 70 73 7a 4b | 65 79 29 20 3d 3d 20 30 |ey, pszK|ey) == 0|
|000005e0| 29 20 7b 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |) {. | |
|000005f0| 2f 2f 20 20 52 65 6d 6f | 76 65 20 74 68 65 20 70 |// Remo|ve the p|
|00000600| 61 72 61 6d 65 74 65 72 | 20 66 72 6f 6d 20 74 68 |arameter| from th|
|00000610| 65 20 6c 69 73 74 20 69 | 66 20 72 65 71 75 65 73 |e list i|f reques|
|00000620| 74 65 64 2e 0d 20 20 20 | 20 20 20 20 20 20 20 20 |ted.. | |
|00000630| 20 69 66 20 28 66 52 65 | 6d 6f 76 65 29 20 7b 0d | if (fRe|move) {.|
|00000640| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000650| 69 66 20 28 70 50 72 65 | 76 50 61 72 61 6d 20 3d |if (pPre|vParam =|
|00000660| 3d 20 4e 55 4c 4c 29 0d | 20 20 20 20 20 20 20 20 |= NULL).| |
|00000670| 20 20 20 20 20 20 20 20 | 20 20 20 20 6d 5f 70 50 | | m_pP|
|00000680| 61 72 61 6d 4c 69 73 74 | 20 3d 20 70 43 75 72 72 |aramList| = pCurr|
|00000690| 65 6e 74 50 61 72 61 6d | 2d 3e 70 4e 65 78 74 50 |entParam|->pNextP|
|000006a0| 61 72 61 6d 3b 0d 20 20 | 20 20 20 20 20 20 20 20 |aram;. | |
|000006b0| 20 20 20 20 20 20 65 6c | 73 65 0d 20 20 20 20 20 | el|se. |
|000006c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 70 | | p|
|000006d0| 50 72 65 76 50 61 72 61 | 6d 2d 3e 70 4e 65 78 74 |PrevPara|m->pNext|
|000006e0| 50 61 72 61 6d 20 3d 20 | 70 43 75 72 72 65 6e 74 |Param = |pCurrent|
|000006f0| 50 61 72 61 6d 2d 3e 70 | 4e 65 78 74 50 61 72 61 |Param->p|NextPara|
|00000700| 6d 3b 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 7d |m;. | }|
|00000710| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 2a 70 70 |. | *pp|
|00000720| 50 61 72 61 6d 20 3d 20 | 70 43 75 72 72 65 6e 74 |Param = |pCurrent|
|00000730| 50 61 72 61 6d 3b 0d 20 | 20 20 20 20 20 20 20 20 |Param;. | |
|00000740| 20 20 20 72 65 74 75 72 | 6e 20 54 52 55 45 3b 0d | retur|n TRUE;.|
|00000750| 20 20 20 20 20 20 20 20 | 7d 0d 20 20 20 20 7d 0d | |}. }.|
|00000760| 0d 20 20 20 20 72 65 74 | 75 72 6e 20 46 41 4c 53 |. ret|urn FALS|
|00000770| 45 3b 0d 7d 0d 0d 2f 2f | 0d 2f 2f 20 20 43 58 42 |E;.}..//|.// CXB|
|00000780| 69 6e 64 43 74 78 3a 3a | 49 55 6e 6b 6e 6f 77 6e |indCtx::|IUnknown|
|00000790| 3a 3a 51 75 65 72 79 49 | 6e 74 65 72 66 61 63 65 |::QueryI|nterface|
|000007a0| 0d 2f 2f 0d 2f 2f 20 20 | 52 65 74 75 72 6e 73 20 |.//.// |Returns |
|000007b0| 61 20 70 6f 69 6e 74 65 | 72 20 74 6f 20 74 68 65 |a pointe|r to the|
|000007c0| 20 73 70 65 63 69 66 69 | 65 64 20 69 6e 74 65 72 | specifi|ed inter|
|000007d0| 66 61 63 65 20 6f 6e 20 | 61 20 63 6f 6d 70 6f 6e |face on |a compon|
|000007e0| 65 6e 74 20 74 6f 20 77 | 68 69 63 68 20 61 0d 2f |ent to w|hich a./|
|000007f0| 2f 20 20 63 6c 69 65 6e | 74 20 63 75 72 72 65 6e |/ clien|t curren|
|00000800| 74 6c 79 20 68 6f 6c 64 | 73 20 61 6e 20 69 6e 74 |tly hold|s an int|
|00000810| 65 72 66 61 63 65 20 70 | 6f 69 6e 74 65 72 2e 0d |erface p|ointer..|
|00000820| 2f 2f 0d 0d 53 54 44 4d | 45 54 48 4f 44 49 4d 50 |//..STDM|ETHODIMP|
|00000830| 0d 43 58 42 69 6e 64 43 | 74 78 3a 3a 51 75 65 72 |.CXBindC|tx::Quer|
|00000840| 79 49 6e 74 65 72 66 61 | 63 65 28 52 45 46 49 49 |yInterfa|ce(REFII|
|00000850| 44 20 72 69 69 64 2c 20 | 4c 50 56 4f 49 44 20 2a |D riid, |LPVOID *|
|00000860| 70 70 76 4f 62 6a 29 0d | 7b 0d 20 20 20 20 48 52 |ppvObj).|{. HR|
|00000870| 45 53 55 4c 54 20 68 72 | 3b 0d 20 20 20 20 4c 50 |ESULT hr|;. LP|
|00000880| 56 4f 49 44 20 70 76 3b | 0d 0d 20 20 20 20 69 66 |VOID pv;|.. if|
|00000890| 20 28 72 69 69 64 20 3d | 3d 20 49 49 44 5f 49 55 | (riid =|= IID_IU|
|000008a0| 6e 6b 6e 6f 77 6e 20 7c | 7c 20 72 69 69 64 20 3d |nknown ||| riid =|
|000008b0| 3d 20 49 49 44 5f 49 42 | 69 6e 64 43 74 78 29 20 |= IID_IB|indCtx) |
|000008c0| 7b 0d 20 20 20 20 20 20 | 20 20 70 76 20 3d 20 28 |{. | pv = (|
|000008d0| 4c 50 56 4f 49 44 29 28 | 4c 50 42 49 4e 44 43 54 |LPVOID)(|LPBINDCT|
|000008e0| 58 29 20 74 68 69 73 3b | 0d 20 20 20 20 20 20 20 |X) this;|. |
|000008f0| 20 2b 2b 6d 5f 63 52 65 | 66 3b 0d 20 20 20 20 20 | ++m_cRe|f;. |
|00000900| 20 20 20 68 72 20 3d 20 | 52 65 73 75 6c 74 46 72 | hr = |ResultFr|
|00000910| 6f 6d 53 63 6f 64 65 28 | 53 5f 4f 4b 29 3b 0d 20 |omScode(|S_OK);. |
|00000920| 20 20 20 7d 20 65 6c 73 | 65 20 7b 0d 20 20 20 20 | } els|e {. |
|00000930| 20 20 20 20 70 76 20 3d | 20 4e 55 4c 4c 3b 0d 20 | pv =| NULL;. |
|00000940| 20 20 20 20 20 20 20 68 | 72 20 3d 20 52 65 73 75 | h|r = Resu|
|00000950| 6c 74 46 72 6f 6d 53 63 | 6f 64 65 28 45 5f 4e 4f |ltFromSc|ode(E_NO|
|00000960| 49 4e 54 45 52 46 41 43 | 45 29 3b 0d 20 20 20 20 |INTERFAC|E);. |
|00000970| 7d 0d 0d 20 20 20 20 2a | 70 70 76 4f 62 6a 20 3d |}.. *|ppvObj =|
|00000980| 20 70 76 3b 0d 20 20 20 | 20 72 65 74 75 72 6e 20 | pv;. | return |
|00000990| 68 72 3b 0d 7d 0d 0d 2f | 2f 0d 2f 2f 20 20 43 58 |hr;.}../|/.// CX|
|000009a0| 42 69 6e 64 43 74 78 3a | 3a 49 55 6e 6b 6e 6f 77 |BindCtx:|:IUnknow|
|000009b0| 6e 3a 3a 41 64 64 52 65 | 66 0d 2f 2f 0d 2f 2f 20 |n::AddRe|f.//.// |
|000009c0| 20 49 6e 63 72 65 6d 65 | 6e 74 73 20 74 68 65 20 | Increme|nts the |
|000009d0| 72 65 66 65 72 65 6e 63 | 65 20 63 6f 75 6e 74 20 |referenc|e count |
|000009e0| 66 6f 72 20 74 68 65 20 | 63 61 6c 6c 69 6e 67 20 |for the |calling |
|000009f0| 69 6e 74 65 72 66 61 63 | 65 2e 0d 2f 2f 0d 0d 53 |interfac|e..//..S|
|00000a00| 54 44 4d 45 54 48 4f 44 | 49 4d 50 5f 28 55 4c 4f |TDMETHOD|IMP_(ULO|
|00000a10| 4e 47 29 0d 43 58 42 69 | 6e 64 43 74 78 3a 3a 41 |NG).CXBi|ndCtx::A|
|00000a20| 64 64 52 65 66 28 76 6f | 69 64 29 0d 7b 0d 20 20 |ddRef(vo|id).{. |
|00000a30| 20 20 72 65 74 75 72 6e | 20 2b 2b 6d 5f 63 52 65 | return| ++m_cRe|
|00000a40| 66 3b 0d 7d 0d 0d 2f 2f | 0d 2f 2f 20 20 43 58 42 |f;.}..//|.// CXB|
|00000a50| 69 6e 64 43 74 78 3a 3a | 49 55 6e 6b 6e 6f 77 6e |indCtx::|IUnknown|
|00000a60| 3a 3a 52 65 6c 65 61 73 | 65 0d 2f 2f 0d 2f 2f 20 |::Releas|e.//.// |
|00000a70| 20 44 65 63 72 65 6d 65 | 6e 74 73 20 74 68 65 20 | Decreme|nts the |
|00000a80| 72 65 66 65 72 65 6e 63 | 65 20 63 6f 75 6e 74 20 |referenc|e count |
|00000a90| 66 6f 72 20 74 68 65 20 | 63 61 6c 6c 69 6e 67 20 |for the |calling |
|00000aa0| 69 6e 74 65 72 66 61 63 | 65 20 6f 6e 20 61 20 6f |interfac|e on a o|
|00000ab0| 62 6a 65 63 74 2e 20 20 | 49 66 0d 2f 2f 20 20 74 |bject. |If.// t|
|00000ac0| 68 65 20 72 65 66 65 72 | 65 6e 63 65 20 63 6f 75 |he refer|ence cou|
|00000ad0| 6e 74 20 6f 6e 20 74 68 | 65 20 6f 62 6a 65 63 74 |nt on th|e object|
|00000ae0| 20 66 61 6c 6c 73 20 74 | 6f 20 7a 65 72 6f 2c 20 | falls t|o zero, |
|00000af0| 74 68 65 20 6f 62 6a 65 | 63 74 20 69 73 20 66 72 |the obje|ct is fr|
|00000b00| 65 65 64 2e 0d 2f 2f 0d | 0d 53 54 44 4d 45 54 48 |eed..//.|.STDMETH|
|00000b10| 4f 44 49 4d 50 5f 28 55 | 4c 4f 4e 47 29 0d 43 58 |ODIMP_(U|LONG).CX|
|00000b20| 42 69 6e 64 43 74 78 3a | 3a 52 65 6c 65 61 73 65 |BindCtx:|:Release|
|00000b30| 28 76 6f 69 64 29 0d 7b | 0d 20 20 20 20 69 66 20 |(void).{|. if |
|00000b40| 28 2d 2d 6d 5f 63 52 65 | 66 20 21 3d 20 30 29 0d |(--m_cRe|f != 0).|
|00000b50| 20 20 20 20 20 20 20 20 | 72 65 74 75 72 6e 20 6d | |return m|
|00000b60| 5f 63 52 65 66 3b 0d 0d | 20 20 20 20 64 65 6c 65 |_cRef;..| dele|
|00000b70| 74 65 20 74 68 69 73 3b | 0d 20 20 20 20 72 65 74 |te this;|. ret|
|00000b80| 75 72 6e 20 30 3b 0d 7d | 0d 0d 2f 2f 0d 2f 2f 20 |urn 0;.}|..//.// |
|00000b90| 20 43 58 42 69 6e 64 43 | 74 78 3a 3a 49 42 69 6e | CXBindC|tx::IBin|
|00000ba0| 64 43 74 78 3a 3a 52 65 | 67 69 73 74 65 72 4f 62 |dCtx::Re|gisterOb|
|00000bb0| 6a 65 63 74 42 6f 75 6e | 64 0d 2f 2f 0d 2f 2f 20 |jectBoun|d.//.// |
|00000bc0| 20 43 61 6c 6c 73 20 49 | 55 6e 6b 6e 6f 77 6e 3a | Calls I|Unknown:|
|00000bd0| 3a 41 64 64 52 65 66 20 | 6f 6e 20 74 68 65 20 73 |:AddRef |on the s|
|00000be0| 70 65 63 69 66 69 65 64 | 20 6f 62 6a 65 63 74 20 |pecified| object |
|00000bf0| 74 6f 20 65 6e 73 75 72 | 65 20 74 68 61 74 20 74 |to ensur|e that t|
|00000c00| 68 65 20 6f 62 6a 65 63 | 74 0d 2f 2f 20 20 72 65 |he objec|t.// re|
|00000c10| 6d 61 69 6e 73 20 61 63 | 74 69 76 65 20 75 6e 74 |mains ac|tive unt|
|00000c20| 69 6c 20 74 68 65 20 62 | 69 6e 64 20 63 6f 6e 74 |il the b|ind cont|
|00000c30| 65 78 74 20 69 73 20 72 | 65 6c 65 61 73 65 64 2e |ext is r|eleased.|
|00000c40| 20 20 54 68 65 20 6d 65 | 74 68 6f 64 20 73 74 6f | The me|thod sto|
|00000c50| 72 65 73 20 61 0d 2f 2f | 20 20 70 6f 69 6e 74 65 |res a.//| pointe|
|00000c60| 72 20 74 6f 20 74 68 65 | 20 6f 62 6a 65 63 74 20 |r to the| object |
|00000c70| 69 6e 20 74 68 65 20 62 | 69 6e 64 20 63 6f 6e 74 |in the b|ind cont|
|00000c80| 65 78 74 27 73 20 69 6e | 74 65 72 6e 61 6c 20 6c |ext's in|ternal l|
|00000c90| 69 73 74 20 6f 66 20 70 | 6f 69 6e 74 65 72 73 2e |ist of p|ointers.|
|00000ca0| 0d 2f 2f 0d 0d 53 54 44 | 4d 45 54 48 4f 44 49 4d |.//..STD|METHODIM|
|00000cb0| 50 0d 43 58 42 69 6e 64 | 43 74 78 3a 3a 52 65 67 |P.CXBind|Ctx::Reg|
|00000cc0| 69 73 74 65 72 4f 62 6a | 65 63 74 42 6f 75 6e 64 |isterObj|ectBound|
|00000cd0| 28 4c 50 55 4e 4b 4e 4f | 57 4e 20 70 75 6e 6b 29 |(LPUNKNO|WN punk)|
|00000ce0| 0d 7b 0d 23 70 72 61 67 | 6d 61 20 75 6e 75 73 65 |.{.#prag|ma unuse|
|00000cf0| 64 20 28 70 75 6e 6b 29 | 0d 20 20 20 20 2f 2f 20 |d (punk)|. // |
|00000d00| 20 55 73 65 66 75 6c 20 | 6f 6e 6c 79 20 69 66 20 | Useful |only if |
|00000d10| 6f 75 72 20 55 52 4c 20 | 6d 6f 6e 69 6b 65 72 20 |our URL |moniker |
|00000d20| 73 75 70 70 6f 72 74 73 | 20 42 69 6e 64 54 6f 4f |supports| BindToO|
|00000d30| 62 6a 65 63 74 2e 0d 20 | 20 20 20 72 65 74 75 72 |bject.. | retur|
|00000d40| 6e 20 52 65 73 75 6c 74 | 46 72 6f 6d 53 63 6f 64 |n Result|FromScod|
|00000d50| 65 28 45 5f 4e 4f 54 49 | 4d 50 4c 29 3b 0d 7d 0d |e(E_NOTI|MPL);.}.|
|00000d60| 0d 2f 2f 0d 2f 2f 20 20 | 43 58 42 69 6e 64 43 74 |.//.// |CXBindCt|
|00000d70| 78 3a 3a 49 42 69 6e 64 | 43 74 78 3a 3a 52 65 76 |x::IBind|Ctx::Rev|
|00000d80| 6f 6b 65 4f 62 6a 65 63 | 74 42 6f 75 6e 64 0d 2f |okeObjec|tBound./|
|00000d90| 2f 0d 2f 2f 20 20 52 65 | 6c 65 61 73 65 73 20 74 |/.// Re|leases t|
|00000da0| 68 65 20 49 55 6e 6b 6e | 6f 77 6e 20 70 6f 69 6e |he IUnkn|own poin|
|00000db0| 74 65 72 20 74 6f 20 74 | 68 65 20 73 70 65 63 69 |ter to t|he speci|
|00000dc0| 66 69 65 64 20 6f 62 6a | 65 63 74 20 61 6e 64 20 |fied obj|ect and |
|00000dd0| 72 65 6d 6f 76 65 73 20 | 74 68 61 74 0d 2f 2f 20 |removes |that.// |
|00000de0| 20 70 6f 69 6e 74 65 72 | 20 66 72 6f 6d 20 74 68 | pointer| from th|
|00000df0| 65 20 62 69 6e 64 20 63 | 6f 6e 74 65 78 74 27 73 |e bind c|ontext's|
|00000e00| 20 69 6e 74 65 72 6e 61 | 6c 20 6c 69 73 74 20 6f | interna|l list o|
|00000e10| 66 20 70 6f 69 6e 74 65 | 72 73 2e 20 20 54 68 69 |f pointe|rs. Thi|
|00000e20| 73 20 75 6e 64 6f 65 73 | 20 61 0d 2f 2f 20 20 70 |s undoes| a.// p|
|00000e30| 72 65 76 69 6f 75 73 20 | 63 61 6c 6c 20 74 6f 20 |revious |call to |
|00000e40| 49 42 69 6e 64 43 74 78 | 3a 3a 52 65 67 69 73 74 |IBindCtx|::Regist|
|00000e50| 65 72 4f 62 6a 65 63 74 | 42 6f 75 6e 64 20 66 6f |erObject|Bound fo|
|00000e60| 72 20 74 68 65 20 73 61 | 6d 65 20 6f 62 6a 65 63 |r the sa|me objec|
|00000e70| 74 2e 0d 2f 2f 0d 0d 53 | 54 44 4d 45 54 48 4f 44 |t..//..S|TDMETHOD|
|00000e80| 49 4d 50 0d 43 58 42 69 | 6e 64 43 74 78 3a 3a 52 |IMP.CXBi|ndCtx::R|
|00000e90| 65 76 6f 6b 65 4f 62 6a | 65 63 74 42 6f 75 6e 64 |evokeObj|ectBound|
|00000ea0| 28 4c 50 55 4e 4b 4e 4f | 57 4e 20 70 75 6e 6b 29 |(LPUNKNO|WN punk)|
|00000eb0| 0d 7b 0d 23 70 72 61 67 | 6d 61 20 75 6e 75 73 65 |.{.#prag|ma unuse|
|00000ec0| 64 20 28 70 75 6e 6b 29 | 0d 20 20 20 20 2f 2f 20 |d (punk)|. // |
|00000ed0| 20 55 73 65 66 75 6c 20 | 6f 6e 6c 79 20 69 66 20 | Useful |only if |
|00000ee0| 6f 75 72 20 55 52 4c 20 | 6d 6f 6e 69 6b 65 72 20 |our URL |moniker |
|00000ef0| 73 75 70 70 6f 72 74 73 | 20 42 69 6e 64 54 6f 4f |supports| BindToO|
|00000f00| 62 6a 65 63 74 2e 0d 20 | 20 20 20 72 65 74 75 72 |bject.. | retur|
|00000f10| 6e 20 52 65 73 75 6c 74 | 46 72 6f 6d 53 63 6f 64 |n Result|FromScod|
|00000f20| 65 28 45 5f 4e 4f 54 49 | 4d 50 4c 29 3b 0d 7d 0d |e(E_NOTI|MPL);.}.|
|00000f30| 0d 2f 2f 0d 2f 2f 20 20 | 43 58 42 69 6e 64 43 74 |.//.// |CXBindCt|
|00000f40| 78 3a 3a 49 42 69 6e 64 | 43 74 78 3a 3a 52 65 6c |x::IBind|Ctx::Rel|
|00000f50| 65 61 73 65 42 6f 75 6e | 64 4f 62 6a 65 63 74 73 |easeBoun|dObjects|
|00000f60| 0d 2f 2f 0d 2f 2f 20 20 | 52 65 6c 65 61 73 65 73 |.//.// |Releases|
|00000f70| 20 61 6c 6c 20 70 6f 69 | 6e 74 65 72 73 20 74 6f | all poi|nters to|
|00000f80| 20 61 6c 6c 20 6f 62 6a | 65 63 74 73 20 74 68 61 | all obj|ects tha|
|00000f90| 74 20 77 65 72 65 20 70 | 72 65 76 69 6f 75 73 6c |t were p|reviousl|
|00000fa0| 79 20 72 65 67 69 73 74 | 65 72 65 64 20 62 79 0d |y regist|ered by.|
|00000fb0| 2f 2f 20 20 63 61 6c 6c | 73 20 74 6f 20 49 42 69 |// call|s to IBi|
|00000fc0| 6e 64 43 74 78 3a 3a 52 | 65 67 69 73 74 65 72 4f |ndCtx::R|egisterO|
|00000fd0| 62 6a 65 63 74 42 6f 75 | 6e 64 2e 0d 2f 2f 0d 0d |bjectBou|nd..//..|
|00000fe0| 53 54 44 4d 45 54 48 4f | 44 49 4d 50 0d 43 58 42 |STDMETHO|DIMP.CXB|
|00000ff0| 69 6e 64 43 74 78 3a 3a | 52 65 6c 65 61 73 65 42 |indCtx::|ReleaseB|
|00001000| 6f 75 6e 64 4f 62 6a 65 | 63 74 73 28 76 6f 69 64 |oundObje|cts(void|
|00001010| 29 0d 7b 0d 20 20 20 20 | 2f 2f 20 20 55 73 65 66 |).{. |// Usef|
|00001020| 75 6c 20 6f 6e 6c 79 20 | 69 66 20 6f 75 72 20 55 |ul only |if our U|
|00001030| 52 4c 20 6d 6f 6e 69 6b | 65 72 20 73 75 70 70 6f |RL monik|er suppo|
|00001040| 72 74 73 20 42 69 6e 64 | 54 6f 4f 62 6a 65 63 74 |rts Bind|ToObject|
|00001050| 2e 0d 20 20 20 20 72 65 | 74 75 72 6e 20 52 65 73 |.. re|turn Res|
|00001060| 75 6c 74 46 72 6f 6d 53 | 63 6f 64 65 28 45 5f 4e |ultFromS|code(E_N|
|00001070| 4f 54 49 4d 50 4c 29 3b | 0d 7d 0d 0d 2f 2f 0d 2f |OTIMPL);|.}..//./|
|00001080| 2f 20 20 43 58 42 69 6e | 64 43 74 78 3a 3a 49 42 |/ CXBin|dCtx::IB|
|00001090| 69 6e 64 43 74 78 3a 3a | 53 65 74 42 69 6e 64 4f |indCtx::|SetBindO|
|000010a0| 70 74 69 6f 6e 73 0d 2f | 2f 0d 2f 2f 20 20 53 70 |ptions./|/.// Sp|
|000010b0| 65 63 69 66 69 65 73 20 | 6e 65 77 20 76 61 6c 75 |ecifies |new valu|
|000010c0| 65 73 20 66 6f 72 20 74 | 68 65 20 62 69 6e 64 69 |es for t|he bindi|
|000010d0| 6e 67 20 70 61 72 61 6d | 65 74 65 72 73 20 73 74 |ng param|eters st|
|000010e0| 6f 72 65 64 20 69 6e 20 | 74 68 65 20 62 69 6e 64 |ored in |the bind|
|000010f0| 20 63 6f 6e 74 65 78 74 | 2e 0d 2f 2f 20 20 53 75 | context|..// Su|
|00001100| 62 73 65 71 75 65 6e 74 | 20 62 69 6e 64 69 6e 67 |bsequent| binding|
|00001110| 20 6f 70 65 72 61 74 69 | 6f 6e 73 20 63 61 6e 20 | operati|ons can |
|00001120| 63 61 6c 6c 20 49 42 69 | 6e 64 43 74 78 3a 3a 47 |call IBi|ndCtx::G|
|00001130| 65 74 42 69 6e 64 4f 70 | 74 69 6f 6e 73 20 74 6f |etBindOp|tions to|
|00001140| 20 72 65 74 72 69 65 76 | 65 0d 2f 2f 20 20 74 68 | retriev|e.// th|
|00001150| 65 20 70 61 72 61 6d 65 | 74 65 72 73 2e 0d 2f 2f |e parame|ters..//|
|00001160| 0d 0d 53 54 44 4d 45 54 | 48 4f 44 49 4d 50 0d 43 |..STDMET|HODIMP.C|
|00001170| 58 42 69 6e 64 43 74 78 | 3a 3a 53 65 74 42 69 6e |XBindCtx|::SetBin|
|00001180| 64 4f 70 74 69 6f 6e 73 | 28 4c 50 42 49 4e 44 5f |dOptions|(LPBIND_|
|00001190| 4f 50 54 53 20 70 62 69 | 6e 64 6f 70 74 73 29 0d |OPTS pbi|ndopts).|
|000011a0| 7b 0d 20 20 20 20 48 52 | 45 53 55 4c 54 20 68 72 |{. HR|ESULT hr|
|000011b0| 3b 0d 0d 20 20 20 20 69 | 66 20 28 70 62 69 6e 64 |;.. i|f (pbind|
|000011c0| 6f 70 74 73 2d 3e 63 62 | 53 74 72 75 63 74 20 3d |opts->cb|Struct =|
|000011d0| 3d 20 73 69 7a 65 6f 66 | 28 6d 5f 62 69 6e 64 6f |= sizeof|(m_bindo|
|000011e0| 70 74 73 29 29 20 7b 0d | 20 20 20 20 20 20 20 20 |pts)) {.| |
|000011f0| 42 6c 6f 63 6b 4d 6f 76 | 65 28 70 62 69 6e 64 6f |BlockMov|e(pbindo|
|00001200| 70 74 73 2c 20 26 6d 5f | 62 69 6e 64 6f 70 74 73 |pts, &m_|bindopts|
|00001210| 2c 20 73 69 7a 65 6f 66 | 28 6d 5f 62 69 6e 64 6f |, sizeof|(m_bindo|
|00001220| 70 74 73 29 29 3b 0d 20 | 20 20 20 20 20 20 20 68 |pts));. | h|
|00001230| 72 20 3d 20 52 65 73 75 | 6c 74 46 72 6f 6d 53 63 |r = Resu|ltFromSc|
|00001240| 6f 64 65 28 53 5f 4f 4b | 29 3b 0d 20 20 20 20 7d |ode(S_OK|);. }|
|00001250| 20 65 6c 73 65 20 7b 0d | 20 20 20 20 20 20 20 20 | else {.| |
|00001260| 2f 2f 20 20 48 6f 77 20 | 77 65 20 68 61 6e 64 6c |// How |we handl|
|00001270| 65 20 74 68 69 73 20 64 | 69 66 66 65 72 73 20 62 |e this d|iffers b|
|00001280| 65 74 77 65 65 6e 20 4f | 4c 45 20 6f 6e 20 74 68 |etween O|LE on th|
|00001290| 65 20 4d 61 63 20 61 6e | 64 20 57 69 6e 33 32 2e |e Mac an|d Win32.|
|000012a0| 20 20 46 6f 72 0d 20 20 | 20 20 20 20 20 20 2f 2f | For. | //|
|000012b0| 20 20 6e 6f 77 2c 20 69 | 66 20 74 68 65 20 73 69 | now, i|f the si|
|000012c0| 7a 65 20 69 73 6e 27 74 | 20 61 20 42 49 4e 44 5f |ze isn't| a BIND_|
|000012d0| 4f 50 54 53 2c 20 6a 75 | 73 74 20 65 72 72 6f 72 |OPTS, ju|st error|
|000012e0| 20 6f 75 74 2e 0d 20 20 | 20 20 20 20 20 20 68 72 | out.. | hr|
|000012f0| 20 3d 20 52 65 73 75 6c | 74 46 72 6f 6d 53 63 6f | = Resul|tFromSco|
|00001300| 64 65 28 45 5f 49 4e 56 | 41 4c 49 44 41 52 47 29 |de(E_INV|ALIDARG)|
|00001310| 3b 0d 20 20 20 20 7d 0d | 0d 20 20 20 20 72 65 74 |;. }.|. ret|
|00001320| 75 72 6e 20 68 72 3b 0d | 7d 0d 0d 2f 2f 0d 2f 2f |urn hr;.|}..//.//|
|00001330| 20 20 43 58 42 69 6e 64 | 43 74 78 3a 3a 49 42 69 | CXBind|Ctx::IBi|
|00001340| 6e 64 43 74 78 3a 3a 47 | 65 74 42 69 6e 64 4f 70 |ndCtx::G|etBindOp|
|00001350| 74 69 6f 6e 73 0d 2f 2f | 0d 2f 2f 20 20 52 65 74 |tions.//|.// Ret|
|00001360| 75 72 6e 73 20 74 68 65 | 20 62 69 6e 64 69 6e 67 |urns the| binding|
|00001370| 20 6f 70 74 69 6f 6e 73 | 20 73 74 6f 72 65 64 20 | options| stored |
|00001380| 69 6e 20 74 68 69 73 20 | 62 69 6e 64 20 63 6f 6e |in this |bind con|
|00001390| 74 65 78 74 2e 0d 2f 2f | 0d 0d 53 54 44 4d 45 54 |text..//|..STDMET|
|000013a0| 48 4f 44 49 4d 50 0d 43 | 58 42 69 6e 64 43 74 78 |HODIMP.C|XBindCtx|
|000013b0| 3a 3a 47 65 74 42 69 6e | 64 4f 70 74 69 6f 6e 73 |::GetBin|dOptions|
|000013c0| 28 4c 50 42 49 4e 44 5f | 4f 50 54 53 20 70 62 69 |(LPBIND_|OPTS pbi|
|000013d0| 6e 64 6f 70 74 73 29 0d | 7b 0d 20 20 20 20 48 52 |ndopts).|{. HR|
|000013e0| 45 53 55 4c 54 20 68 72 | 3b 0d 0d 20 20 20 20 69 |ESULT hr|;.. i|
|000013f0| 66 20 28 70 62 69 6e 64 | 6f 70 74 73 2d 3e 63 62 |f (pbind|opts->cb|
|00001400| 53 74 72 75 63 74 20 3d | 3d 20 73 69 7a 65 6f 66 |Struct =|= sizeof|
|00001410| 28 6d 5f 62 69 6e 64 6f | 70 74 73 29 29 20 7b 0d |(m_bindo|pts)) {.|
|00001420| 20 20 20 20 20 20 20 20 | 42 6c 6f 63 6b 4d 6f 76 | |BlockMov|
|00001430| 65 28 26 6d 5f 62 69 6e | 64 6f 70 74 73 2c 20 70 |e(&m_bin|dopts, p|
|00001440| 62 69 6e 64 6f 70 74 73 | 2c 20 73 69 7a 65 6f 66 |bindopts|, sizeof|
|00001450| 28 6d 5f 62 69 6e 64 6f | 70 74 73 29 29 3b 0d 20 |(m_bindo|pts));. |
|00001460| 20 20 20 20 20 20 20 68 | 72 20 3d 20 52 65 73 75 | h|r = Resu|
|00001470| 6c 74 46 72 6f 6d 53 63 | 6f 64 65 28 53 5f 4f 4b |ltFromSc|ode(S_OK|
|00001480| 29 3b 0d 20 20 20 20 7d | 20 65 6c 73 65 20 7b 0d |);. }| else {.|
|00001490| 20 20 20 20 20 20 20 20 | 2f 2f 20 20 48 6f 77 20 | |// How |
|000014a0| 77 65 20 68 61 6e 64 6c | 65 20 74 68 69 73 20 64 |we handl|e this d|
|000014b0| 69 66 66 65 72 73 20 62 | 65 74 77 65 65 6e 20 4f |iffers b|etween O|
|000014c0| 4c 45 20 6f 6e 20 74 68 | 65 20 4d 61 63 20 61 6e |LE on th|e Mac an|
|000014d0| 64 20 57 69 6e 33 32 2e | 20 20 46 6f 72 0d 20 20 |d Win32.| For. |
|000014e0| 20 20 20 20 20 20 2f 2f | 20 20 6e 6f 77 2c 20 69 | //| now, i|
|000014f0| 66 20 74 68 65 20 73 69 | 7a 65 20 69 73 6e 27 74 |f the si|ze isn't|
|00001500| 20 61 20 42 49 4e 44 5f | 4f 50 54 53 2c 20 6a 75 | a BIND_|OPTS, ju|
|00001510| 73 74 20 65 72 72 6f 72 | 20 6f 75 74 2e 0d 20 20 |st error| out.. |
|00001520| 20 20 20 20 20 20 68 72 | 20 3d 20 52 65 73 75 6c | hr| = Resul|
|00001530| 74 46 72 6f 6d 53 63 6f | 64 65 28 45 5f 49 4e 56 |tFromSco|de(E_INV|
|00001540| 41 4c 49 44 41 52 47 29 | 3b 0d 20 20 20 20 7d 0d |ALIDARG)|;. }.|
|00001550| 0d 20 20 20 20 72 65 74 | 75 72 6e 20 68 72 3b 0d |. ret|urn hr;.|
|00001560| 7d 0d 0d 2f 2f 0d 2f 2f | 20 20 43 58 42 69 6e 64 |}..//.//| CXBind|
|00001570| 43 74 78 3a 3a 49 42 69 | 6e 64 43 74 78 3a 3a 47 |Ctx::IBi|ndCtx::G|
|00001580| 65 74 52 75 6e 6e 69 6e | 67 4f 62 6a 65 63 74 54 |etRunnin|gObjectT|
|00001590| 61 62 6c 65 0d 2f 2f 0d | 2f 2f 20 20 50 72 6f 76 |able.//.|// Prov|
|000015a0| 69 64 65 73 20 61 6e 20 | 69 6e 74 65 72 66 61 63 |ides an |interfac|
|000015b0| 65 20 70 6f 69 6e 74 65 | 72 20 74 6f 20 74 68 65 |e pointe|r to the|
|000015c0| 20 52 75 6e 6e 69 6e 67 | 20 4f 62 6a 65 63 74 20 | Running| Object |
|000015d0| 54 61 62 6c 65 20 28 52 | 4f 54 29 20 66 6f 72 20 |Table (R|OT) for |
|000015e0| 74 68 65 0d 2f 2f 20 20 | 6d 61 63 68 69 6e 65 20 |the.// |machine |
|000015f0| 6f 6e 20 77 68 69 63 68 | 20 74 68 69 73 20 62 69 |on which| this bi|
|00001600| 6e 64 20 63 6f 6e 74 65 | 78 74 20 69 73 20 72 75 |nd conte|xt is ru|
|00001610| 6e 6e 69 6e 67 2e 0d 2f | 2f 0d 0d 53 54 44 4d 45 |nning../|/..STDME|
|00001620| 54 48 4f 44 49 4d 50 0d | 43 58 42 69 6e 64 43 74 |THODIMP.|CXBindCt|
|00001630| 78 3a 3a 47 65 74 52 75 | 6e 6e 69 6e 67 4f 62 6a |x::GetRu|nningObj|
|00001640| 65 63 74 54 61 62 6c 65 | 28 4c 50 52 55 4e 4e 49 |ectTable|(LPRUNNI|
|00001650| 4e 47 4f 42 4a 45 43 54 | 54 41 42 4c 45 20 2a 70 |NGOBJECT|TABLE *p|
|00001660| 70 72 6f 74 29 0d 7b 0d | 20 20 20 20 2f 2f 20 20 |prot).{.| // |
|00001670| 55 73 65 66 75 6c 20 6f | 6e 6c 79 20 69 66 20 6f |Useful o|nly if o|
|00001680| 75 72 20 55 52 4c 20 6d | 6f 6e 69 6b 65 72 20 73 |ur URL m|oniker s|
|00001690| 75 70 70 6f 72 74 73 20 | 42 69 6e 64 54 6f 4f 62 |upports |BindToOb|
|000016a0| 6a 65 63 74 2e 0d 20 20 | 20 20 2a 70 70 72 6f 74 |ject.. | *pprot|
|000016b0| 20 3d 20 4e 55 4c 4c 3b | 0d 20 20 20 20 72 65 74 | = NULL;|. ret|
|000016c0| 75 72 6e 20 52 65 73 75 | 6c 74 46 72 6f 6d 53 63 |urn Resu|ltFromSc|
|000016d0| 6f 64 65 28 45 5f 4e 4f | 54 49 4d 50 4c 29 3b 0d |ode(E_NO|TIMPL);.|
|000016e0| 7d 0d 0d 2f 2f 0d 2f 2f | 20 20 43 58 42 69 6e 64 |}..//.//| CXBind|
|000016f0| 43 74 78 3a 3a 49 42 69 | 6e 64 43 74 78 3a 3a 52 |Ctx::IBi|ndCtx::R|
|00001700| 65 67 69 73 74 65 72 4f | 62 6a 65 63 74 50 61 72 |egisterO|bjectPar|
|00001710| 61 6d 0d 2f 2f 0d 2f 2f | 20 20 53 74 6f 72 65 73 |am.//.//| Stores|
|00001720| 20 61 6e 20 49 55 6e 6b | 6e 6f 77 6e 20 70 6f 69 | an IUnk|nown poi|
|00001730| 6e 74 65 72 20 6f 6e 20 | 74 68 65 20 73 70 65 63 |nter on |the spec|
|00001740| 69 66 69 65 64 20 6f 62 | 6a 65 63 74 20 75 6e 64 |ified ob|ject und|
|00001750| 65 72 20 74 68 65 20 73 | 70 65 63 69 66 69 65 64 |er the s|pecified|
|00001760| 20 6b 65 79 0d 2f 2f 20 | 20 69 6e 20 74 68 65 20 | key.// | in the |
|00001770| 62 69 6e 64 20 63 6f 6e | 74 65 78 74 27 73 20 73 |bind con|text's s|
|00001780| 74 72 69 6e 67 2d 6b 65 | 79 65 64 20 74 61 62 6c |tring-ke|yed tabl|
|00001790| 65 20 6f 66 20 70 6f 69 | 6e 74 65 72 73 2e 0d 2f |e of poi|nters../|
|000017a0| 2f 0d 0d 53 54 44 4d 45 | 54 48 4f 44 49 4d 50 0d |/..STDME|THODIMP.|
|000017b0| 43 58 42 69 6e 64 43 74 | 78 3a 3a 52 65 67 69 73 |CXBindCt|x::Regis|
|000017c0| 74 65 72 4f 62 6a 65 63 | 74 50 61 72 61 6d 28 4c |terObjec|tParam(L|
|000017d0| 50 4f 4c 45 53 54 52 20 | 70 73 7a 4b 65 79 2c 20 |POLESTR |pszKey, |
|000017e0| 4c 50 55 4e 4b 4e 4f 57 | 4e 20 70 75 6e 6b 29 0d |LPUNKNOW|N punk).|
|000017f0| 7b 0d 20 20 20 20 48 52 | 45 53 55 4c 54 20 68 72 |{. HR|ESULT hr|
|00001800| 3b 0d 20 20 20 20 4c 50 | 58 4f 42 4a 45 43 54 50 |;. LP|XOBJECTP|
|00001810| 41 52 41 4d 20 70 50 61 | 72 61 6d 3b 0d 0d 20 20 |ARAM pPa|ram;.. |
|00001820| 20 20 69 66 20 28 70 73 | 7a 4b 65 79 20 3d 3d 20 | if (ps|zKey == |
|00001830| 4e 55 4c 4c 20 7c 7c 20 | 70 75 6e 6b 20 3d 3d 20 |NULL || |punk == |
|00001840| 4e 55 4c 4c 29 20 7b 0d | 20 20 20 20 20 20 20 20 |NULL) {.| |
|00001850| 68 72 20 3d 20 52 65 73 | 75 6c 74 46 72 6f 6d 53 |hr = Res|ultFromS|
|00001860| 63 6f 64 65 28 45 5f 49 | 4e 56 41 4c 49 44 41 52 |code(E_I|NVALIDAR|
|00001870| 47 29 3b 0d 20 20 20 20 | 7d 20 65 6c 73 65 20 7b |G);. |} else {|
|00001880| 0d 20 20 20 20 20 20 20 | 20 69 66 20 28 4c 6f 6f |. | if (Loo|
|00001890| 6b 75 70 28 70 73 7a 4b | 65 79 2c 20 26 70 50 61 |kup(pszK|ey, &pPa|
|000018a0| 72 61 6d 2c 20 46 41 4c | 53 45 29 29 20 7b 0d 20 |ram, FAL|SE)) {. |
|000018b0| 20 20 20 20 20 20 20 20 | 20 20 20 2f 2f 20 20 50 | | // P|
|000018c0| 61 72 61 6d 65 74 65 72 | 20 77 69 74 68 20 74 68 |arameter| with th|
|000018d0| 69 73 20 6e 61 6d 65 20 | 61 6c 72 65 61 64 79 20 |is name |already |
|000018e0| 65 78 69 73 74 73 2e 20 | 20 52 65 6c 65 61 73 65 |exists. | Release|
|000018f0| 20 69 74 73 20 6f 62 6a | 65 63 74 20 61 6e 64 0d | its obj|ect and.|
|00001900| 20 20 20 20 20 20 20 20 | 20 20 20 20 2f 2f 20 20 | | // |
|00001910| 72 65 75 73 65 20 74 68 | 65 20 73 74 72 75 63 74 |reuse th|e struct|
|00001920| 75 72 65 2e 0d 20 20 20 | 20 20 20 20 20 20 20 20 |ure.. | |
|00001930| 20 70 50 61 72 61 6d 2d | 3e 70 75 6e 6b 4f 62 6a | pParam-|>punkObj|
|00001940| 65 63 74 2d 3e 52 65 6c | 65 61 73 65 28 29 3b 0d |ect->Rel|ease();.|
|00001950| 20 20 20 20 20 20 20 20 | 20 20 20 20 67 6f 74 6f | | goto|
|00001960| 20 53 65 74 4f 62 6a 65 | 63 74 50 6f 69 6e 74 65 | SetObje|ctPointe|
|00001970| 72 3b 0d 20 20 20 20 20 | 20 20 20 7d 20 65 6c 73 |r;. | } els|
|00001980| 65 20 7b 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |e {. | |
|00001990| 69 66 20 28 28 70 50 61 | 72 61 6d 20 3d 20 28 4c |if ((pPa|ram = (L|
|000019a0| 50 58 4f 42 4a 45 43 54 | 50 41 52 41 4d 29 20 43 |PXOBJECT|PARAM) C|
|000019b0| 6f 54 61 73 6b 4d 65 6d | 41 6c 6c 6f 63 28 73 69 |oTaskMem|Alloc(si|
|000019c0| 7a 65 6f 66 28 58 4f 42 | 4a 45 43 54 50 41 52 41 |zeof(XOB|JECTPARA|
|000019d0| 4d 29 20 2b 0d 20 20 20 | 20 20 20 20 20 20 20 20 |M) +. | |
|000019e0| 20 20 20 20 20 73 74 72 | 6c 65 6e 28 70 73 7a 4b | str|len(pszK|
|000019f0| 65 79 29 29 29 20 3d 3d | 20 4e 55 4c 4c 29 20 7b |ey))) ==| NULL) {|
|00001a00| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00001a10| 20 68 72 20 3d 20 52 65 | 73 75 6c 74 46 72 6f 6d | hr = Re|sultFrom|
|00001a20| 53 63 6f 64 65 28 45 5f | 4f 55 54 4f 46 4d 45 4d |Scode(E_|OUTOFMEM|
|00001a30| 4f 52 59 29 3b 0d 20 20 | 20 20 20 20 20 20 20 20 |ORY);. | |
|00001a40| 20 20 7d 20 65 6c 73 65 | 20 7b 0d 20 20 20 20 20 | } else| {. |
|00001a50| 20 20 20 20 20 20 20 20 | 20 20 20 73 74 72 63 70 | | strcp|
|00001a60| 79 28 70 50 61 72 61 6d | 2d 3e 6b 65 79 2c 20 70 |y(pParam|->key, p|
|00001a70| 73 7a 4b 65 79 29 3b 0d | 20 20 20 20 20 20 20 20 |szKey);.| |
|00001a80| 20 20 20 20 20 20 20 20 | 70 50 61 72 61 6d 2d 3e | |pParam->|
|00001a90| 70 4e 65 78 74 50 61 72 | 61 6d 20 3d 20 6d 5f 70 |pNextPar|am = m_p|
|00001aa0| 50 61 72 61 6d 4c 69 73 | 74 3b 0d 20 20 20 20 20 |ParamLis|t;. |
|00001ab0| 20 20 20 20 20 20 20 20 | 20 20 20 6d 5f 70 50 61 | | m_pPa|
|00001ac0| 72 61 6d 4c 69 73 74 20 | 3d 20 70 50 61 72 61 6d |ramList |= pParam|
|00001ad0| 3b 0d 53 65 74 4f 62 6a | 65 63 74 50 6f 69 6e 74 |;.SetObj|ectPoint|
|00001ae0| 65 72 3a 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |er:. | |
|00001af0| 20 20 20 20 70 50 61 72 | 61 6d 2d 3e 70 75 6e 6b | pPar|am->punk|
|00001b00| 4f 62 6a 65 63 74 20 3d | 20 70 75 6e 6b 3b 0d 20 |Object =| punk;. |
|00001b10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 70 | | p|
|00001b20| 75 6e 6b 2d 3e 41 64 64 | 52 65 66 28 29 3b 0d 20 |unk->Add|Ref();. |
|00001b30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 68 | | h|
|00001b40| 72 20 3d 20 52 65 73 75 | 6c 74 46 72 6f 6d 53 63 |r = Resu|ltFromSc|
|00001b50| 6f 64 65 28 53 5f 4f 4b | 29 3b 0d 20 20 20 20 20 |ode(S_OK|);. |
|00001b60| 20 20 20 20 20 20 20 7d | 0d 20 20 20 20 20 20 20 | }|. |
|00001b70| 20 7d 0d 20 20 20 20 7d | 0d 0d 20 20 20 20 72 65 | }. }|.. re|
|00001b80| 74 75 72 6e 20 68 72 3b | 0d 7d 0d 0d 2f 2f 0d 2f |turn hr;|.}..//./|
|00001b90| 2f 20 20 43 58 42 69 6e | 64 43 74 78 3a 3a 49 42 |/ CXBin|dCtx::IB|
|00001ba0| 69 6e 64 43 74 78 3a 3a | 47 65 74 4f 62 6a 65 63 |indCtx::|GetObjec|
|00001bb0| 74 50 61 72 61 6d 0d 2f | 2f 0d 2f 2f 20 20 52 65 |tParam./|/.// Re|
|00001bc0| 74 72 69 65 76 65 73 20 | 74 68 65 20 70 6f 69 6e |trieves |the poin|
|00001bd0| 74 65 72 20 61 73 73 6f | 63 69 61 74 65 64 20 77 |ter asso|ciated w|
|00001be0| 69 74 68 20 74 68 65 20 | 73 70 65 63 69 66 69 65 |ith the |specifie|
|00001bf0| 64 20 6b 65 79 20 69 6e | 20 74 68 65 20 62 69 6e |d key in| the bin|
|00001c00| 64 0d 2f 2f 20 20 63 6f | 6e 74 65 78 74 27 73 20 |d.// co|ntext's |
|00001c10| 73 74 72 69 6e 67 2d 6b | 65 79 65 64 20 74 61 62 |string-k|eyed tab|
|00001c20| 6c 65 20 6f 66 20 70 6f | 69 6e 74 65 72 73 2e 0d |le of po|inters..|
|00001c30| 2f 2f 0d 0d 53 54 44 4d | 45 54 48 4f 44 49 4d 50 |//..STDM|ETHODIMP|
|00001c40| 0d 43 58 42 69 6e 64 43 | 74 78 3a 3a 47 65 74 4f |.CXBindC|tx::GetO|
|00001c50| 62 6a 65 63 74 50 61 72 | 61 6d 28 4c 50 4f 4c 45 |bjectPar|am(LPOLE|
|00001c60| 53 54 52 20 70 73 7a 4b | 65 79 2c 20 4c 50 55 4e |STR pszK|ey, LPUN|
|00001c70| 4b 4e 4f 57 4e 20 2a 70 | 70 75 6e 6b 29 0d 7b 0d |KNOWN *p|punk).{.|
|00001c80| 20 20 20 20 48 52 45 53 | 55 4c 54 20 68 72 3b 0d | HRES|ULT hr;.|
|00001c90| 20 20 20 20 4c 50 55 4e | 4b 4e 4f 57 4e 20 70 75 | LPUN|KNOWN pu|
|00001ca0| 6e 6b 3b 0d 20 20 20 20 | 4c 50 58 4f 42 4a 45 43 |nk;. |LPXOBJEC|
|00001cb0| 54 50 41 52 41 4d 20 70 | 50 61 72 61 6d 3b 0d 0d |TPARAM p|Param;..|
|00001cc0| 20 20 20 20 69 66 20 28 | 70 73 7a 4b 65 79 20 3d | if (|pszKey =|
|00001cd0| 3d 20 4e 55 4c 4c 20 7c | 7c 20 70 70 75 6e 6b 20 |= NULL ||| ppunk |
|00001ce0| 3d 3d 20 4e 55 4c 4c 29 | 20 7b 0d 20 20 20 20 20 |== NULL)| {. |
|00001cf0| 20 20 20 70 75 6e 6b 20 | 3d 20 4e 55 4c 4c 3b 0d | punk |= NULL;.|
|00001d00| 20 20 20 20 20 20 20 20 | 68 72 20 3d 20 52 65 73 | |hr = Res|
|00001d10| 75 6c 74 46 72 6f 6d 53 | 63 6f 64 65 28 45 5f 49 |ultFromS|code(E_I|
|00001d20| 4e 56 41 4c 49 44 41 52 | 47 29 3b 0d 20 20 20 20 |NVALIDAR|G);. |
|00001d30| 7d 20 65 6c 73 65 20 7b | 0d 20 20 20 20 20 20 20 |} else {|. |
|00001d40| 20 69 66 20 28 4c 6f 6f | 6b 75 70 28 70 73 7a 4b | if (Loo|kup(pszK|
|00001d50| 65 79 2c 20 26 70 50 61 | 72 61 6d 2c 20 46 41 4c |ey, &pPa|ram, FAL|
|00001d60| 53 45 29 29 20 7b 0d 20 | 20 20 20 20 20 20 20 20 |SE)) {. | |
|00001d70| 20 20 20 70 75 6e 6b 20 | 3d 20 70 50 61 72 61 6d | punk |= pParam|
|00001d80| 2d 3e 70 75 6e 6b 4f 62 | 6a 65 63 74 3b 0d 20 20 |->punkOb|ject;. |
|00001d90| 20 20 20 20 20 20 20 20 | 20 20 70 75 6e 6b 2d 3e | | punk->|
|00001da0| 41 64 64 52 65 66 28 29 | 3b 0d 20 20 20 20 20 20 |AddRef()|;. |
|00001db0| 20 20 20 20 20 20 68 72 | 20 3d 20 52 65 73 75 6c | hr| = Resul|
|00001dc0| 74 46 72 6f 6d 53 63 6f | 64 65 28 53 5f 4f 4b 29 |tFromSco|de(S_OK)|
|00001dd0| 3b 0d 20 20 20 20 20 20 | 20 20 7d 20 65 6c 73 65 |;. | } else|
|00001de0| 20 7b 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 70 | {. | p|
|00001df0| 75 6e 6b 20 3d 20 4e 55 | 4c 4c 3b 0d 20 20 20 20 |unk = NU|LL;. |
|00001e00| 20 20 20 20 20 20 20 20 | 68 72 20 3d 20 52 65 73 | |hr = Res|
|00001e10| 75 6c 74 46 72 6f 6d 53 | 63 6f 64 65 28 45 5f 46 |ultFromS|code(E_F|
|00001e20| 41 49 4c 29 3b 0d 20 20 | 20 20 20 20 20 20 7d 0d |AIL);. | }.|
|00001e30| 20 20 20 20 7d 0d 0d 20 | 20 20 20 2a 70 70 75 6e | }.. | *ppun|
|00001e40| 6b 20 3d 20 70 75 6e 6b | 3b 0d 20 20 20 20 72 65 |k = punk|;. re|
|00001e50| 74 75 72 6e 20 68 72 3b | 0d 7d 0d 0d 2f 2f 0d 2f |turn hr;|.}..//./|
|00001e60| 2f 20 20 43 58 42 69 6e | 64 43 74 78 3a 3a 49 42 |/ CXBin|dCtx::IB|
|00001e70| 69 6e 64 43 74 78 3a 3a | 45 6e 75 6d 4f 62 6a 65 |indCtx::|EnumObje|
|00001e80| 63 74 50 61 72 61 6d 0d | 2f 2f 0d 2f 2f 20 20 53 |ctParam.|//.// S|
|00001e90| 75 70 70 6c 69 65 73 20 | 61 20 70 6f 69 6e 74 65 |upplies |a pointe|
|00001ea0| 72 20 74 6f 20 61 6e 20 | 49 45 6e 75 6d 53 74 72 |r to an |IEnumStr|
|00001eb0| 69 6e 67 20 69 6e 74 65 | 72 66 61 63 65 20 6f 6e |ing inte|rface on|
|00001ec0| 20 61 6e 20 65 6e 75 6d | 65 72 61 74 6f 72 20 74 | an enum|erator t|
|00001ed0| 68 61 74 20 63 61 6e 0d | 2f 2f 20 20 72 65 74 75 |hat can.|// retu|
|00001ee0| 72 6e 20 74 68 65 20 6b | 65 79 73 20 6f 66 20 74 |rn the k|eys of t|
|00001ef0| 68 65 20 62 69 6e 64 20 | 63 6f 6e 74 65 78 74 27 |he bind |context'|
|00001f00| 73 20 73 74 72 69 6e 67 | 2d 6b 65 79 65 64 20 74 |s string|-keyed t|
|00001f10| 61 62 6c 65 20 6f 66 20 | 70 6f 69 6e 74 65 72 73 |able of |pointers|
|00001f20| 2e 0d 2f 2f 0d 0d 53 54 | 44 4d 45 54 48 4f 44 49 |..//..ST|DMETHODI|
|00001f30| 4d 50 0d 43 58 42 69 6e | 64 43 74 78 3a 3a 45 6e |MP.CXBin|dCtx::En|
|00001f40| 75 6d 4f 62 6a 65 63 74 | 50 61 72 61 6d 28 4c 50 |umObject|Param(LP|
|00001f50| 45 4e 55 4d 53 54 52 49 | 4e 47 20 2a 70 70 65 6e |ENUMSTRI|NG *ppen|
|00001f60| 75 6d 29 0d 7b 0d 20 20 | 20 20 2f 2f 20 20 54 68 |um).{. | // Th|
|00001f70| 65 20 64 65 66 61 75 6c | 74 20 4f 4c 45 33 32 20 |e defaul|t OLE32 |
|00001f80| 49 42 69 6e 64 43 74 78 | 20 64 6f 65 73 20 6e 6f |IBindCtx| does no|
|00001f90| 74 20 69 6d 70 6c 65 6d | 65 6e 74 20 74 68 69 73 |t implem|ent this|
|00001fa0| 20 6d 65 74 68 6f 64 2c | 20 73 6f 20 74 68 65 72 | method,| so ther|
|00001fb0| 65 27 73 0d 20 20 20 20 | 2f 2f 20 20 6e 6f 20 72 |e's. |// no r|
|00001fc0| 65 61 73 6f 6e 20 66 6f | 72 20 75 73 20 74 6f 20 |eason fo|r us to |
|00001fd0| 62 6f 74 68 65 72 2e 0d | 20 20 20 20 2a 70 70 65 |bother..| *ppe|
|00001fe0| 6e 75 6d 20 3d 20 4e 55 | 4c 4c 3b 0d 20 20 20 20 |num = NU|LL;. |
|00001ff0| 72 65 74 75 72 6e 20 52 | 65 73 75 6c 74 46 72 6f |return R|esultFro|
|00002000| 6d 53 63 6f 64 65 28 45 | 5f 4e 4f 54 49 4d 50 4c |mScode(E|_NOTIMPL|
|00002010| 29 3b 0d 7d 0d 0d 2f 2f | 0d 2f 2f 20 20 43 58 42 |);.}..//|.// CXB|
|00002020| 69 6e 64 43 74 78 3a 3a | 49 42 69 6e 64 43 74 78 |indCtx::|IBindCtx|
|00002030| 3a 3a 52 65 76 6f 6b 65 | 4f 62 6a 65 63 74 50 61 |::Revoke|ObjectPa|
|00002040| 72 61 6d 0d 2f 2f 0d 2f | 2f 20 20 52 65 6d 6f 76 |ram.//./|/ Remov|
|00002050| 65 73 20 74 68 65 20 73 | 70 65 63 69 66 69 65 64 |es the s|pecified|
|00002060| 20 6b 65 79 20 61 6e 64 | 20 69 74 73 20 61 73 73 | key and| its ass|
|00002070| 6f 63 69 61 74 65 64 20 | 70 6f 69 6e 74 65 72 20 |ociated |pointer |
|00002080| 66 72 6f 6d 20 74 68 65 | 20 62 69 6e 64 20 63 6f |from the| bind co|
|00002090| 6e 74 65 78 74 27 73 0d | 2f 2f 20 20 73 74 72 69 |ntext's.|// stri|
|000020a0| 6e 67 2d 6b 65 79 65 64 | 20 74 61 62 6c 65 20 6f |ng-keyed| table o|
|000020b0| 66 20 6f 62 6a 65 63 74 | 73 2e 20 54 68 65 20 6b |f object|s. The k|
|000020c0| 65 79 20 6d 75 73 74 20 | 68 61 76 65 20 70 72 65 |ey must |have pre|
|000020d0| 76 69 6f 75 73 6c 79 20 | 62 65 65 6e 20 69 6e 73 |viously |been ins|
|000020e0| 65 72 74 65 64 0d 2f 2f | 20 20 69 6e 74 6f 20 74 |erted.//| into t|
|000020f0| 68 65 20 74 61 62 6c 65 | 20 77 69 74 68 20 61 20 |he table| with a |
|00002100| 63 61 6c 6c 20 74 6f 20 | 49 42 69 6e 64 43 74 78 |call to |IBindCtx|
|00002110| 3a 3a 52 65 67 69 73 74 | 65 72 4f 62 6a 65 63 74 |::Regist|erObject|
|00002120| 50 61 72 61 6d 2e 0d 2f | 2f 0d 0d 53 54 44 4d 45 |Param../|/..STDME|
|00002130| 54 48 4f 44 49 4d 50 0d | 43 58 42 69 6e 64 43 74 |THODIMP.|CXBindCt|
|00002140| 78 3a 3a 52 65 76 6f 6b | 65 4f 62 6a 65 63 74 50 |x::Revok|eObjectP|
|00002150| 61 72 61 6d 28 4c 50 4f | 4c 45 53 54 52 20 70 73 |aram(LPO|LESTR ps|
|00002160| 7a 4b 65 79 29 0d 7b 0d | 20 20 20 20 48 52 45 53 |zKey).{.| HRES|
|00002170| 55 4c 54 20 68 72 3b 0d | 20 20 20 20 4c 50 58 4f |ULT hr;.| LPXO|
|00002180| 42 4a 45 43 54 50 41 52 | 41 4d 20 70 50 61 72 61 |BJECTPAR|AM pPara|
|00002190| 6d 3b 0d 0d 20 20 20 20 | 69 66 20 28 70 73 7a 4b |m;.. |if (pszK|
|000021a0| 65 79 20 3d 3d 20 4e 55 | 4c 4c 29 20 7b 0d 20 20 |ey == NU|LL) {. |
|000021b0| 20 20 20 20 20 20 68 72 | 20 3d 20 52 65 73 75 6c | hr| = Resul|
|000021c0| 74 46 72 6f 6d 53 63 6f | 64 65 28 45 5f 49 4e 56 |tFromSco|de(E_INV|
|000021d0| 41 4c 49 44 41 52 47 29 | 3b 0d 20 20 20 20 7d 20 |ALIDARG)|;. } |
|000021e0| 65 6c 73 65 20 7b 0d 20 | 20 20 20 20 20 20 20 69 |else {. | i|
|000021f0| 66 20 28 4c 6f 6f 6b 75 | 70 28 70 73 7a 4b 65 79 |f (Looku|p(pszKey|
|00002200| 2c 20 26 70 50 61 72 61 | 6d 2c 20 54 52 55 45 29 |, &pPara|m, TRUE)|
|00002210| 29 20 7b 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |) {. | |
|00002220| 70 50 61 72 61 6d 2d 3e | 70 75 6e 6b 4f 62 6a 65 |pParam->|punkObje|
|00002230| 63 74 2d 3e 52 65 6c 65 | 61 73 65 28 29 3b 0d 20 |ct->Rele|ase();. |
|00002240| 20 20 20 20 20 20 20 20 | 20 20 20 43 6f 54 61 73 | | CoTas|
|00002250| 6b 4d 65 6d 46 72 65 65 | 28 70 50 61 72 61 6d 29 |kMemFree|(pParam)|
|00002260| 3b 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 68 72 |;. | hr|
|00002270| 20 3d 20 52 65 73 75 6c | 74 46 72 6f 6d 53 63 6f | = Resul|tFromSco|
|00002280| 64 65 28 53 5f 4f 4b 29 | 3b 0d 20 20 20 20 20 20 |de(S_OK)|;. |
|00002290| 20 20 7d 20 65 6c 73 65 | 20 7b 0d 20 20 20 20 20 | } else| {. |
|000022a0| 20 20 20 20 20 20 20 2f | 2f 20 20 4f 4c 45 33 32 | /|/ OLE32|
|000022b0| 20 72 65 74 75 72 6e 73 | 20 45 5f 46 41 49 4c 2c | returns| E_FAIL,|
|000022c0| 20 6e 6f 74 20 53 5f 46 | 41 4c 53 45 20 61 73 20 | not S_F|ALSE as |
|000022d0| 74 68 65 20 53 44 4b 20 | 64 6f 63 75 6d 65 6e 74 |the SDK |document|
|000022e0| 73 2e 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 68 |s.. | h|
|000022f0| 72 20 3d 20 52 65 73 75 | 6c 74 46 72 6f 6d 53 63 |r = Resu|ltFromSc|
|00002300| 6f 64 65 28 45 5f 46 41 | 49 4c 29 3b 0d 20 20 20 |ode(E_FA|IL);. |
|00002310| 20 20 20 20 20 7d 0d 20 | 20 20 20 7d 0d 0d 20 20 | }. | }.. |
|00002320| 20 20 72 65 74 75 72 6e | 20 68 72 3b 0d 7d 0d 00 | return| hr;.}..|
|00002330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002380| 00 00 01 00 00 00 01 7c | 00 00 00 7c 00 00 00 5e |.......||...|...^|
|00002390| 20 7b 0d 20 20 20 20 20 | 20 20 20 69 66 20 28 4c | {. | if (L|
|000023a0| 6f 6f 6b 75 70 28 70 73 | 7a 4b 65 79 2c 20 26 70 |ookup(ps|zKey, &p|
|000023b0| 0d 43 58 42 69 6e 64 43 | 74 78 2e 63 70 70 02 00 |.CXBindC|tx.cpp..|
|000023c0| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|000023d0| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|000023e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023f0| 00 00 b0 56 8e 0f 00 00 | 00 00 00 00 01 da 65 66 |...V....|......ef|
|00002400| 28 29 3b 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |();. | |
|00002410| 68 72 20 3d 20 52 65 73 | 75 6c 74 46 72 6f 6d 53 |hr = Res|ultFromS|
|00002420| 63 6f 64 65 28 53 5f 4f | 4b 29 3b 0d 20 20 20 20 |code(S_O|K);. |
|00002430| 20 20 20 20 7d 20 65 6c | 73 65 20 7b 0d 20 20 20 | } el|se {. |
|00002440| 20 20 20 20 20 20 20 20 | 20 70 75 6e 6b 20 3d 20 | | punk = |
|00002450| 4e 55 4c 4c 3b 0d 20 20 | 20 20 20 20 20 20 20 20 |NULL;. | |
|00002460| 20 20 68 72 20 3d 20 52 | 65 73 75 6c 74 46 72 6f | hr = R|esultFro|
|00002470| 6d 53 63 6f 64 65 28 45 | 5f 46 41 49 4c 29 3b 0d |mScode(E|_FAIL);.|
|00002480| 00 00 00 1e 00 a2 00 18 | 03 5f 02 77 00 a2 00 18 |........|._.w....|
|00002490| 03 5f 02 77 00 00 00 00 | 00 00 00 00 00 00 00 00 |._.w....|........|
|000024a0| 00 00 00 00 00 48 00 09 | 4d 6f 6e 61 63 6f 00 00 |.....H..|Monaco..|
|000024b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024c0| 00 00 00 00 00 00 00 00 | 00 03 00 04 00 8e 00 85 |........|........|
|000024d0| 03 4b 02 e4 00 8e 00 85 | 03 4b 02 e4 af f9 2f 55 |.K......|.K..../U|
|000024e0| 00 00 01 e9 00 00 01 e9 | 00 00 00 00 01 00 00 00 |........|........|
|000024f0| 00 02 00 00 00 00 00 04 | 00 01 00 01 00 00 01 00 |........|........|
|00002500| 00 00 01 7c 00 00 00 7c | 00 00 00 5e 03 b8 ec bc |...|...||...^....|
|00002510| 24 5c 00 00 00 1c 00 5e | 00 01 4d 50 53 52 00 02 |$\.....^|..MPSR..|
|00002520| 00 12 4d 57 42 42 00 00 | 00 36 03 f0 ff ff 00 00 |..MWBB..|.6......|
|00002530| 00 00 00 00 00 00 03 ed | ff ff 00 00 00 22 00 00 |........|....."..|
|00002540| 00 00 03 ef ff ff 00 00 | 00 6e 00 00 00 00 03 f0 |........|.n......|
|00002550| ff ff 00 00 00 74 00 00 | 00 00 00 00 00 00 00 00 |.....t..|........|
|00002560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+