comShow.h
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:3k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* comShow.h - VxWorks COM show routines public API */
  2. /* Copyright (c) 1999 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 01d,04oct01,nel  Correct comTrackShow def with and extern "C".
  7. 01c,25sep01,nel  Add method to translate a guid to a string.
  8. 01b,06mar00,nel  Added VxComTrack class
  9. 01a,24mar99,drm  created
  10. */
  11. /*
  12.  DESCRIPTION:
  13.  */
  14. #ifndef __INCcomShow_h
  15. #define __INCcomShow_h
  16. #include "vxidl.h"
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. int vxcomRegShow();
  21. int comTrackShow ();
  22. #ifdef __cplusplus
  23.            }
  24. #endif
  25. class VxComTrack
  26.     {
  27.     public:
  28.         VxComTrack ();
  29.         ~VxComTrack ();
  30.         void * addClassInstance
  31.             (
  32.             void          * thisPtr,
  33.             char          * guid,
  34.             char          * name,
  35.             unsigned long   refCount,
  36.     REFCLSID     iid 
  37.             );
  38.         void updateClassInstance
  39.             (
  40.             void          * thisPtr,
  41.             unsigned long   refCount
  42.             );
  43.         void addInterface
  44.             (
  45.             void              * thisPtr,
  46.             char              * guid,
  47.             char              * name,
  48.     REFIID cls
  49.             );
  50.         int print ();
  51. const char * findGUID (REFGUID guid);
  52.         static VxComTrack * theInstance ();
  53.         class INTERFACE
  54.             {
  55.             public:
  56.                 INTERFACE         * next;
  57.                 INTERFACE         * listNext;
  58.                 INTERFACE         * listPrev;
  59.                 char              * guid;
  60.                 char              * name;
  61.                 unsigned long       owner;
  62.                 unsigned long       magic1;
  63.                 void              * thisPtr;
  64. IID     iid; /* added here to not break T3 inspector */
  65.             };
  66.         class CLASS
  67.             {
  68.             public:
  69.                 CLASS             * next;
  70.                 CLASS             * prev;
  71.                 void              * thisPtr;
  72.                 char              * guid;
  73.                 char              * name;
  74.                 unsigned long       refCount;
  75.                 unsigned long       owner;
  76.                 INTERFACE         * interfaces;
  77.                 unsigned long       magic1;
  78. CLSID     cls; /* added here to not break T3 inspector */
  79.             };
  80.     private:
  81.         enum { MAGIC1 = 0x5aa5aa55 };
  82.         static VxComTrack * s_pTheList;
  83.         CLASS * findClass (void * thisPtr);
  84.         INTERFACE * findInterface
  85.             (
  86.             CLASS * classPtr,
  87.             char * guid
  88.             );
  89.     };
  90. #endif