unknown.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * unknown.h
  3. *
  4. * Contributors:
  5. * Created by Magnus Olsen
  6. *
  7. * THIS SOFTWARE IS NOT COPYRIGHTED
  8. *
  9. * This source code is offered for use in the public domain. You may
  10. * use, modify or distribute it freely.
  11. *
  12. * This code is distributed in the hope that it will be useful but
  13. * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
  14. * DISCLAIMED. This includes but is not limited to warranties of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  16. *
  17. */
  18. #ifndef _UNKNOWN_H_
  19. #define _UNKNOWN_H_
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #include <wdm.h>
  23. }
  24. #else
  25. #include <wdm.h>
  26. #endif
  27. #include <windef.h>
  28. #define COM_NO_WINDOWS_H
  29. #include <basetyps.h>
  30. #ifdef PUT_GUIDS_HERE
  31. #include <initguid.h>
  32. #endif
  33. DEFINE_GUID(IID_IUnknown, 0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
  34. #if defined(__cplusplus) && _MSC_VER >= 1100
  35. struct __declspec(uuid("00000000-0000-0000-C000-000000000046")) IUnknown;
  36. #endif
  37. #undef INTERFACE
  38. #define INTERFACE IUnknown
  39. DECLARE_INTERFACE(IUnknown)
  40. {
  41. STDMETHOD(QueryInterface)
  42. ( THIS_
  43. REFIID,
  44. PVOID*
  45. ) PURE;
  46. STDMETHOD_(ULONG,AddRef)
  47. ( THIS
  48. ) PURE;
  49. STDMETHOD_(ULONG,Release)
  50. ( THIS
  51. ) PURE;
  52. };
  53. #undef INTERFACE
  54. typedef IUnknown *PUNKNOWN;
  55. typedef
  56. HRESULT
  57. (NTAPI *PFNCREATEINSTANCE)
  58. (
  59. PUNKNOWN * Unknown,
  60. REFCLSID ClassId,
  61. PUNKNOWN OuterUnknown,
  62. POOL_TYPE PoolType
  63. );
  64. #endif /* _UNKNOWN_H_ */