TempFileCOM.h 811 B

123456789101112131415161718192021
  1. #pragma once
  2. #include <ocidl.h>
  3. #include <windows.h>
  4. class TempFileCOM : public IDispatch
  5. {
  6. public:
  7. TempFileCOM(const wchar_t *extension);
  8. STDMETHOD(QueryInterface)(REFIID riid, PVOID *ppvObject);
  9. STDMETHOD_(ULONG, AddRef)(void);
  10. STDMETHOD_(ULONG, Release)(void);
  11. // *** IDispatch Methods ***
  12. STDMETHOD (GetIDsOfNames)(REFIID riid, OLECHAR FAR* FAR* rgszNames, unsigned int cNames, LCID lcid, DISPID FAR* rgdispid);
  13. STDMETHOD (GetTypeInfo)(unsigned int itinfo, LCID lcid, ITypeInfo FAR* FAR* pptinfo);
  14. STDMETHOD (GetTypeInfoCount)(unsigned int FAR * pctinfo);
  15. STDMETHOD (Invoke)(DISPID dispid, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS FAR *pdispparams, VARIANT FAR *pvarResult, EXCEPINFO FAR * pexecinfo, unsigned int FAR *puArgErr);
  16. HANDLE hFile;
  17. wchar_t filename[MAX_PATH];
  18. size_t ref;
  19. };