home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / netds / rpc / data / dunion / dunion.idl < prev    next >
Encoding:
INI File  |  1995-11-14  |  814 b   |  34 lines

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