DUNION.IDL
上传用户:bangxh
上传日期:2007-01-31
资源大小:42235k
文件大小:1k
源码类别:

Windows编程

开发平台:

Visual C++

  1. [ uuid (87E5BFA0-CA46-1067-B31B-00DD010662DA),
  2.   version(1.0),
  3.   pointer_default(unique)
  4. ]
  5. interface dunion
  6. {
  7. typedef [switch_type(short)] union {
  8.     [case(0)] short          sVal;
  9.     [case(1)] float          fVal;
  10.     [case(2)] unsigned char  chVal;
  11.     [default] ;
  12. } DISCRIM_UNION_PARAM_TYPE;
  13. typedef DISCRIM_UNION_PARAM_TYPE DISCRIM_UNION_FIELD_TYPE;
  14. typedef struct {
  15.     short                                          sDiscrim; 
  16.     [switch_is(sDiscrim)] DISCRIM_UNION_FIELD_TYPE u;
  17. } DISCRIM_UNION_STRUCT_TYPE;
  18. void UnionParamProc(
  19.     [in, switch_is(sDiscrim)] DISCRIM_UNION_PARAM_TYPE *UnionParam,
  20.     [in]                      short                    sDiscrim
  21.     );
  22. void UnionStructProc(
  23.     [in] DISCRIM_UNION_STRUCT_TYPE *UnionStruct);
  24. void Shutdown(void);
  25. }