Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.2 KiB

  1. //***************************************************************************
  2. //
  3. // (c) 1999-2001 by Microsoft Corp. All Rights Reserved.
  4. //
  5. // sqlit.h
  6. //
  7. // cvadai 19-Mar-99 Created as prototype for Quasar.
  8. //
  9. //***************************************************************************
  10. #ifndef _SQLIT_H_
  11. #define _SQLIT_H_
  12. #pragma warning( disable : 4251 ) // needs to have dll-interface to be used by clients of class
  13. #include <sqlexec.h>
  14. //***************************************************************************
  15. // CWmiDbIterator
  16. //***************************************************************************
  17. class CWmiDbIterator : public IWmiDbIterator
  18. {
  19. friend class CWmiDbSession;
  20. public:
  21. HRESULT STDMETHODCALLTYPE QueryInterface(
  22. /* [in] */ REFIID riid,
  23. /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject);
  24. ULONG STDMETHODCALLTYPE AddRef( );
  25. ULONG STDMETHODCALLTYPE Release( );
  26. virtual HRESULT STDMETHODCALLTYPE Cancel(
  27. /* [in] */ DWORD dwFlags) ;
  28. virtual HRESULT STDMETHODCALLTYPE NextBatch(
  29. /* [in] */ DWORD dwNumRequested,
  30. /* [in] */ DWORD dwTimeOutSeconds,
  31. /* [in] */ DWORD dwFlags,
  32. /* [in] */ DWORD dwRequestedHandleType,
  33. /* [in] */ REFIID riid,
  34. /* [out] */ DWORD __RPC_FAR *pdwNumReturned,
  35. /* [iid_is][length_is][size_is][out] */ LPVOID __RPC_FAR *ppObjects);
  36. CWmiDbIterator();
  37. ~CWmiDbIterator();
  38. protected:
  39. IDBAsynchStatus *m_pStatus;
  40. IRowset *m_pRowset;
  41. CSQLConnection *m_pConn;
  42. ULONG m_uRefCount;
  43. CWmiDbSession *m_pSession;
  44. IMalloc *m_pIMalloc;
  45. };
  46. //*******************************************************
  47. //
  48. // CSQLExec
  49. //
  50. //*******************************************************
  51. // This needs to deal with blob data,
  52. // and support batching.
  53. class _declspec( dllexport ) CSQLExecuteRepdrvr : CSQLExecute
  54. {
  55. typedef std::map <DWORD, DWORD> Properties;
  56. public:
  57. static HRESULT GetNextResultRows(int iNumRows, IRowset *pIRowset, IMalloc *pMalloc, IWbemClassObject *pNewObj,
  58. CSchemaCache *pSchema, CWmiDbSession *pSession, Properties &PropIds, bool *bImageFound=NULL, bool bOnImage = false);
  59. private:
  60. CSQLExecuteRepdrvr(){};
  61. ~CSQLExecuteRepdrvr(){};
  62. };
  63. #endif