Hex Artifact Content

Not logged in

Artifact 132f4d39301cf77750c87cb164ac5444f7ead083:


0000: 2f 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a  /***************
0010: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a  ****************
0020: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a  ****************
0030: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a  ****************
0040: 2a 2a 2a 2a 2a 2a 2a 2a 5c 0a 2a 20 20 20 20 20  ********\.*     
0050: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0060: 20 20 20 20 20 20 20 20 20 20 20 63 6f 6d 63 61             comca
0070: 74 2e 64 20 20 20 20 20 20 20 20 20 20 20 20 20  t.d             
0080: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0090: 20 20 2a 0a 2a 20 20 20 20 20 20 20 20 20 20 20    *.*           
00a0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
00b0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
00c0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
00d0: 20 20 20 20 20 20 20 20 20 20 20 20 2a 0a 2a 20              *.* 
00e0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
00f0: 20 20 20 20 20 20 57 69 6e 64 6f 77 73 20 41 50        Windows AP
0100: 49 20 68 65 61 64 65 72 20 6d 6f 64 75 6c 65 20  I header module 
0110: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0120: 20 20 20 20 20 20 2a 0a 2a 20 20 20 20 20 20 20        *.*       
0130: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0140: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0150: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0160: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0170: 2a 0a 2a 20 20 20 20 20 20 20 20 20 20 20 20 20  *.*             
0180: 20 20 20 20 54 72 61 6e 73 6c 61 74 65 64 20 66      Translated f
0190: 72 6f 6d 20 4d 69 6e 47 57 20 57 69 6e 64 6f 77  rom MinGW Window
01a0: 73 20 68 65 61 64 65 72 73 20 20 20 20 20 20 20  s headers       
01b0: 20 20 20 20 20 20 20 20 20 20 2a 0a 2a 20 20 20            *.*   
01c0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
01d0: 20 20 20 20 20 20 20 20 62 79 20 53 74 65 77 61          by Stewa
01e0: 72 74 20 47 6f 72 64 6f 6e 20 20 20 20 20 20 20  rt Gordon       
01f0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0200: 20 20 20 20 2a 0a 2a 20 20 20 20 20 20 20 20 20      *.*         
0210: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0220: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0230: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0240: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2a 0a                *.
0250: 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  *               
0260: 20 20 20 20 20 20 20 20 50 6c 61 63 65 64 20 69          Placed i
0270: 6e 74 6f 20 70 75 62 6c 69 63 20 64 6f 6d 61 69  nto public domai
0280: 6e 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  n               
0290: 20 20 20 20 20 20 20 20 2a 0a 5c 2a 2a 2a 2a 2a          *.\*****
02a0: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a  ****************
02b0: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a  ****************
02c0: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a  ****************
02d0: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a  ****************
02e0: 2a 2a 2f 0a 6d 6f 64 75 6c 65 20 77 69 6e 33 32  **/.module win32
02f0: 2e 63 6f 6d 63 61 74 3b 0a 0a 69 6d 70 6f 72 74  .comcat;..import
0300: 20 77 69 6e 33 32 2e 77 69 6e 64 6f 77 73 2c 20   win32.windows, 
0310: 77 69 6e 33 32 2e 6f 6c 65 32 3b 0a 70 72 69 76  win32.ole2;.priv
0320: 61 74 65 20 69 6d 70 6f 72 74 20 77 69 6e 33 32  ate import win32
0330: 2e 62 61 73 65 74 79 70 73 2c 20 77 69 6e 33 32  .basetyps, win32
0340: 2e 63 67 75 69 64 2c 20 77 69 6e 33 32 2e 6f 62  .cguid, win32.ob
0350: 6a 62 61 73 65 2c 20 77 69 6e 33 32 2e 75 6e 6b  jbase, win32.unk
0360: 6e 77 6e 2c 0a 20 20 77 69 6e 33 32 2e 77 69 6e  nwn,.  win32.win
0370: 64 65 66 2c 20 77 69 6e 33 32 2e 77 74 79 70 65  def, win32.wtype
0380: 73 3b 0a 0a 61 6c 69 61 73 20 49 45 6e 75 6d 47  s;..alias IEnumG
0390: 55 49 44 2a 20 4c 50 45 4e 55 4d 47 55 49 44 3b  UID* LPENUMGUID;
03a0: 0a 0a 69 6e 74 65 72 66 61 63 65 20 49 45 6e 75  ..interface IEnu
03b0: 6d 47 55 49 44 20 3a 20 49 55 6e 6b 6e 6f 77 6e  mGUID : IUnknown
03c0: 20 7b 0a 09 48 52 45 53 55 4c 54 20 4e 65 78 74   {..HRESULT Next
03d0: 28 55 4c 4f 4e 47 2c 20 47 55 49 44 2a 2c 20 55  (ULONG, GUID*, U
03e0: 4c 4f 4e 47 2a 29 3b 0a 09 48 52 45 53 55 4c 54  LONG*);..HRESULT
03f0: 20 53 6b 69 70 28 55 4c 4f 4e 47 29 3b 0a 09 48   Skip(ULONG);..H
0400: 52 45 53 55 4c 54 20 52 65 73 65 74 28 29 3b 0a  RESULT Reset();.
0410: 09 48 52 45 53 55 4c 54 20 43 6c 6f 6e 65 28 4c  .HRESULT Clone(L
0420: 50 45 4e 55 4d 47 55 49 44 2a 29 3b 0a 7d 0a 0a  PENUMGUID*);.}..
0430: 61 6c 69 61 73 20 47 55 49 44 20 43 41 54 49 44  alias GUID CATID
0440: 3b 0a 61 6c 69 61 73 20 52 45 46 47 55 49 44 20  ;.alias REFGUID 
0450: 52 45 46 43 41 54 49 44 3b 0a 61 6c 69 61 73 20  REFCATID;.alias 
0460: 47 55 49 44 5f 4e 55 4c 4c 20 43 41 54 49 44 5f  GUID_NULL CATID_
0470: 4e 55 4c 4c 3b 0a 61 6c 69 61 73 20 49 73 45 71  NULL;.alias IsEq
0480: 75 61 6c 47 55 49 44 20 49 73 45 71 75 61 6c 43  ualGUID IsEqualC
0490: 41 54 49 44 3b 0a 0a 73 74 72 75 63 74 20 43 41  ATID;..struct CA
04a0: 54 45 47 4f 52 59 49 4e 46 4f 20 7b 0a 09 43 41  TEGORYINFO {..CA
04b0: 54 49 44 20 20 20 20 20 20 20 20 63 61 74 69 64  TID        catid
04c0: 3b 0a 09 4c 43 49 44 20 20 20 20 20 20 20 20 20  ;..LCID         
04d0: 6c 63 69 64 3b 0a 09 4f 4c 45 43 48 41 52 5b 31  lcid;..OLECHAR[1
04e0: 32 38 5d 20 73 7a 44 65 73 63 72 69 70 74 69 6f  28] szDescriptio
04f0: 6e 3b 0a 7d 0a 61 6c 69 61 73 20 43 41 54 45 47  n;.}.alias CATEG
0500: 4f 52 59 49 4e 46 4f 2a 20 4c 50 43 41 54 45 47  ORYINFO* LPCATEG
0510: 4f 52 59 49 4e 46 4f 3b 0a 0a 61 6c 69 61 73 20  ORYINFO;..alias 
0520: 49 45 6e 75 6d 47 55 49 44 20 49 45 6e 75 6d 43  IEnumGUID IEnumC
0530: 41 54 49 44 3b 0a 61 6c 69 61 73 20 4c 50 45 4e  ATID;.alias LPEN
0540: 55 4d 47 55 49 44 20 4c 50 45 4e 55 4d 43 41 54  UMGUID LPENUMCAT
0550: 49 44 3b 0a 61 6c 69 61 73 20 49 49 44 5f 49 45  ID;.alias IID_IE
0560: 6e 75 6d 47 55 49 44 20 49 49 44 5f 49 45 6e 75  numGUID IID_IEnu
0570: 6d 43 41 54 49 44 3b 0a 0a 61 6c 69 61 73 20 49  mCATID;..alias I
0580: 45 6e 75 6d 47 55 49 44 20 49 45 6e 75 6d 43 4c  EnumGUID IEnumCL
0590: 53 49 44 3b 0a 61 6c 69 61 73 20 4c 50 45 4e 55  SID;.alias LPENU
05a0: 4d 47 55 49 44 20 4c 50 45 4e 55 4d 43 4c 53 49  MGUID LPENUMCLSI
05b0: 44 3b 0a 61 6c 69 61 73 20 49 49 44 5f 49 45 6e  D;.alias IID_IEn
05c0: 75 6d 47 55 49 44 20 49 49 44 5f 49 45 6e 75 6d  umGUID IID_IEnum
05d0: 43 4c 53 49 44 3b 0a 0a 69 6e 74 65 72 66 61 63  CLSID;..interfac
05e0: 65 20 49 43 61 74 49 6e 66 6f 72 6d 61 74 69 6f  e ICatInformatio
05f0: 6e 20 3a 20 49 55 6e 6b 6e 6f 77 6e 20 7b 0a 09  n : IUnknown {..
0600: 48 52 45 53 55 4c 54 20 45 6e 75 6d 43 61 74 65  HRESULT EnumCate
0610: 67 6f 72 69 65 73 28 4c 43 49 44 2c 20 4c 50 45  gories(LCID, LPE
0620: 4e 55 4d 43 41 54 45 47 4f 52 59 49 4e 46 4f 2a  NUMCATEGORYINFO*
0630: 29 3b 0a 09 48 52 45 53 55 4c 54 20 47 65 74 43  );..HRESULT GetC
0640: 61 74 65 67 6f 72 79 44 65 73 63 28 52 45 46 43  ategoryDesc(REFC
0650: 41 54 49 44 2c 20 4c 43 49 44 2c 20 50 57 43 48  ATID, LCID, PWCH
0660: 41 52 2a 29 3b 0a 09 48 52 45 53 55 4c 54 20 45  AR*);..HRESULT E
0670: 6e 75 6d 43 6c 61 73 73 65 73 4f 66 43 61 74 65  numClassesOfCate
0680: 67 6f 72 69 65 73 28 55 4c 4f 4e 47 2c 20 43 41  gories(ULONG, CA
0690: 54 49 44 2a 2c 20 55 4c 4f 4e 47 2c 20 43 41 54  TID*, ULONG, CAT
06a0: 49 44 2a 2c 0a 09 20 20 4c 50 45 4e 55 4d 43 4c  ID*,..  LPENUMCL
06b0: 53 49 44 2a 29 3b 0a 09 48 52 45 53 55 4c 54 20  SID*);..HRESULT 
06c0: 49 73 43 6c 61 73 73 4f 66 43 61 74 65 67 6f 72  IsClassOfCategor
06d0: 69 65 73 28 52 45 46 43 4c 53 49 44 2c 20 55 4c  ies(REFCLSID, UL
06e0: 4f 4e 47 2c 20 43 41 54 49 44 2a 2c 20 55 4c 4f  ONG, CATID*, ULO
06f0: 4e 47 2c 20 43 41 54 49 44 2a 29 3b 0a 09 48 52  NG, CATID*);..HR
0700: 45 53 55 4c 54 20 45 6e 75 6d 49 6d 70 6c 43 61  ESULT EnumImplCa
0710: 74 65 67 6f 72 69 65 73 4f 66 43 6c 61 73 73 28  tegoriesOfClass(
0720: 52 45 46 43 4c 53 49 44 2c 20 4c 50 45 4e 55 4d  REFCLSID, LPENUM
0730: 43 41 54 49 44 2a 29 3b 0a 09 48 52 45 53 55 4c  CATID*);..HRESUL
0740: 54 20 45 6e 75 6d 52 65 71 43 61 74 65 67 6f 72  T EnumReqCategor
0750: 69 65 73 4f 66 43 6c 61 73 73 28 52 45 46 43 4c  iesOfClass(REFCL
0760: 53 49 44 2c 20 4c 50 45 4e 55 4d 43 41 54 49 44  SID, LPENUMCATID
0770: 2a 29 3b 0a 7d 0a 61 6c 69 61 73 20 49 43 61 74  *);.}.alias ICat
0780: 49 6e 66 6f 72 6d 61 74 69 6f 6e 2a 20 4c 50 43  Information* LPC
0790: 41 54 49 4e 46 4f 52 4d 41 54 49 4f 4e 3b 0a 0a  ATINFORMATION;..
07a0: 69 6e 74 65 72 66 61 63 65 20 49 43 61 74 52 65  interface ICatRe
07b0: 67 69 73 74 65 72 20 3a 20 49 55 6e 6b 6e 6f 77  gister : IUnknow
07c0: 6e 20 7b 0a 09 48 52 45 53 55 4c 54 20 52 65 67  n {..HRESULT Reg
07d0: 69 73 74 65 72 43 61 74 65 67 6f 72 69 65 73 28  isterCategories(
07e0: 55 4c 4f 4e 47 2c 20 43 41 54 45 47 4f 52 59 49  ULONG, CATEGORYI
07f0: 4e 46 4f 2a 29 3b 0a 09 48 52 45 53 55 4c 54 20  NFO*);..HRESULT 
0800: 55 6e 52 65 67 69 73 74 65 72 43 61 74 65 67 6f  UnRegisterCatego
0810: 72 69 65 73 28 55 4c 4f 4e 47 2c 20 43 41 54 49  ries(ULONG, CATI
0820: 44 2a 29 3b 0a 09 48 52 45 53 55 4c 54 20 52 65  D*);..HRESULT Re
0830: 67 69 73 74 65 72 43 6c 61 73 73 49 6d 70 6c 43  gisterClassImplC
0840: 61 74 65 67 6f 72 69 65 73 28 52 45 46 43 4c 53  ategories(REFCLS
0850: 49 44 2c 20 55 4c 4f 4e 47 2c 20 43 41 54 49 44  ID, ULONG, CATID
0860: 2a 29 3b 0a 09 48 52 45 53 55 4c 54 20 55 6e 52  *);..HRESULT UnR
0870: 65 67 69 73 74 65 72 43 6c 61 73 73 49 6d 70 6c  egisterClassImpl
0880: 43 61 74 65 67 6f 72 69 65 73 28 52 45 46 43 4c  Categories(REFCL
0890: 53 49 44 2c 20 55 4c 4f 4e 47 2c 20 43 41 54 49  SID, ULONG, CATI
08a0: 44 2a 29 3b 0a 09 48 52 45 53 55 4c 54 20 52 65  D*);..HRESULT Re
08b0: 67 69 73 74 65 72 43 6c 61 73 73 52 65 71 43 61  gisterClassReqCa
08c0: 74 65 67 6f 72 69 65 73 28 52 45 46 43 4c 53 49  tegories(REFCLSI
08d0: 44 2c 20 55 4c 4f 4e 47 2c 20 43 41 54 49 44 2a  D, ULONG, CATID*
08e0: 29 3b 0a 09 48 52 45 53 55 4c 54 20 55 6e 52 65  );..HRESULT UnRe
08f0: 67 69 73 74 65 72 43 6c 61 73 73 52 65 71 43 61  gisterClassReqCa
0900: 74 65 67 6f 72 69 65 73 28 52 45 46 43 4c 53 49  tegories(REFCLSI
0910: 44 2c 20 55 4c 4f 4e 47 2c 20 43 41 54 49 44 2a  D, ULONG, CATID*
0920: 29 3b 0a 7d 0a 61 6c 69 61 73 20 49 43 61 74 52  );.}.alias ICatR
0930: 65 67 69 73 74 65 72 2a 20 4c 50 43 41 54 52 45  egister* LPCATRE
0940: 47 49 53 54 45 52 3b 0a 0a 69 6e 74 65 72 66 61  GISTER;..interfa
0950: 63 65 20 49 45 6e 75 6d 43 41 54 45 47 4f 52 59  ce IEnumCATEGORY
0960: 49 4e 46 4f 20 3a 20 49 55 6e 6b 6e 6f 77 6e 20  INFO : IUnknown 
0970: 7b 0a 09 48 52 45 53 55 4c 54 20 4e 65 78 74 28  {..HRESULT Next(
0980: 55 4c 4f 4e 47 2c 20 43 41 54 45 47 4f 52 59 49  ULONG, CATEGORYI
0990: 4e 46 4f 2a 2c 20 55 4c 4f 4e 47 2a 29 3b 0a 09  NFO*, ULONG*);..
09a0: 48 52 45 53 55 4c 54 20 53 6b 69 70 28 55 4c 4f  HRESULT Skip(ULO
09b0: 4e 47 29 3b 0a 09 48 52 45 53 55 4c 54 20 52 65  NG);..HRESULT Re
09c0: 73 65 74 28 29 3b 0a 09 48 52 45 53 55 4c 54 20  set();..HRESULT 
09d0: 43 6c 6f 6e 65 28 4c 50 45 4e 55 4d 43 41 54 45  Clone(LPENUMCATE
09e0: 47 4f 52 59 49 4e 46 4f 2a 29 3b 0a 7d 0a 61 6c  GORYINFO*);.}.al
09f0: 69 61 73 20 49 45 6e 75 6d 43 41 54 45 47 4f 52  ias IEnumCATEGOR
0a00: 59 49 4e 46 4f 2a 20 4c 50 45 4e 55 4d 43 41 54  YINFO* LPENUMCAT
0a10: 45 47 4f 52 59 49 4e 46 4f 3b 0a                 EGORYINFO;.