/*++ Copyright (c) 1996 Microsoft Corporation Module Name: ImpExpUtils.h Abstract: IIS MetaBase subroutines to support Import Author: Mohit Srivastava 04-April-01 Revision History: Notes: --*/ #ifndef _impexputils_h_ #define _impexputils_h_ class CImporter { public: CImporter( LPCWSTR i_wszFileName, LPCSTR i_pszPassword); ~CImporter(); HRESULT Init(); HRESULT ShowPathsInFile( LPCWSTR pszKeyType, DWORD dwMDBufferSize, LPWSTR pszBuffer, DWORD* pdwMDRequiredBufferSize); HRESULT DoIt( LPWSTR i_wszSourcePath, LPCWSTR i_wszKeyType, DWORD i_dwMDFlags, CMDBaseObject** o_ppboNew); static const WCHAR sm_wszInheritedPropertiesLocationPrefix[]; static const ULONG sm_cchInheritedPropertiesLocationPrefix; private: // // This is the relation of the current // location being read from the XML file to the source path. // enum Relation { eREL_SELF, eREL_CHILD, eREL_PARENT, eREL_NONE }; HRESULT InitIST(); Relation GetRelation( LPCWSTR i_wszSourcePath, LPCWSTR i_wszCheck); BOOL IsChild( LPCWSTR i_wszParent, LPCWSTR i_wszCheck, BOOL *o_pbSamePerson); HRESULT ReadMetaObject( IN LPCWSTR i_wszAbsParentPath, IN CMDBaseObject *i_pboParent, IN LPCWSTR i_wszAbsChildPath, OUT CMDBaseObject **o_ppboChild); BOOL EnumMDPath( LPCWSTR i_wszFullPath, LPWSTR io_wszPath, int* io_iStartIndex); CComPtr m_spISTDisp; CComPtr m_spISTProperty; CComPtr m_spISTError; CComPtr m_spILogger; LPCWSTR m_wszFileName; LPCSTR m_pszPassword; bool m_bInitCalled; }; #endif