Essential COM

, , . IDL (Interface Definition Language ) , . IDL- - IApe:

 [object, uuid(753A8A7C-A7FF-11d0-8C30-0080C73925BA)]  interface IApe : Unknown {    import "unknwn.idl"; HRESULT EatBanana(void); HRESULT SwingFromTree(void); [propget] HRESULT Weight([out, retval] long *plbs); } 

IApe : EatBanana, SwingFromTree Weight. , I QueryInterface, , I . . , , , , . - .

I . ( ), I . I , , EatBanana, , , ( I ), ( ) . .

, . . , . , , , - , (coclasses).

- , . - , - GUID (globally unique identifier ), GUID - , CLSID. , , . - , . . , - , , , 1.

, CLSID, , (programmatic identifiers), ProgID. ProgID libraryname.classname.version , CLSID, . ProgID CLSID API- CLSIDFromProgID ProgIDFromCLSID:

 HRESULT CLSIDFromProgID([in, string] const OLECHAR *pwszProgID, [out] CLSID *pclsid); HRESULT ProgIDFromCLSID([in] REFCLSID rclsid, [out, string] OLECHAR **ppwszProgID); 

ProgID CLSID CLSIDFromProgID:

 HRESULT GetGorillaCLSID(CLSID& rclsid)  {     const OLECHAR wszProgID[] = OLESTR("Apes.Gorilla.1");     return CLSIDFromProgID(wszProgID, &rclsid); } 

ProgID Apes.Gorilla.1 CLSID, .


1 " " , , , , . , (taxonomy) (component categories). , , , , , , .



Suschnost' tehnologii SOM
Essential COM
ISBN: 0201634465
EAN: 2147483647
Year: N/A
Pages: 103
Authors: Don Box

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net