Leaked source code of windows server 2003
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.

31 lines
1.8 KiB

  1. //-------------------------------------------------------------------------
  2. // File: ntdmutils.h
  3. //
  4. // Author : Kishnan Nedungadi
  5. //
  6. // created : 3/27/2000
  7. //-------------------------------------------------------------------------
  8. class CNTDMUtils
  9. {
  10. public:
  11. static STDMETHODIMP Initialize();
  12. static STDMETHODIMP UnInitialize();
  13. static STDMETHODIMP ErrorHandler(HWND hWnd, HRESULT err_hr, bool bShowError=true);
  14. static STDMETHODIMP GetValuesInList(LPCTSTR strList, CSimpleArray<BSTR>&bstrArray, LPCTSTR pcszToken=L";");
  15. static STDMETHODIMP GetValuesInList(long lResID, CSimpleArray<BSTR>&bstrArray, LPCTSTR pcszToken=L";");
  16. static STDMETHODIMP GetCIMTypeFromString(LPCTSTR pcszCIMType, long *pCimTYPE);
  17. static STDMETHODIMP GetVariantTypeFromString(LPCTSTR pcszCIMType, long *pVariantTYPE);
  18. static STDMETHODIMP SetStringProperty(IWbemClassObject* pIWbemClassObject, LPCTSTR pszPropName, HWND hwnd, long lResID);
  19. static STDMETHODIMP GetStringProperty(IWbemClassObject* pIWbemClassObject, LPCTSTR pszPropName, HWND hwnd, long lResID);
  20. static BOOL SaveFileNameDlg(LPCTSTR szFilter, LPCTSTR extension, HWND hwnd, LPTSTR pszFile);
  21. static BOOL OpenFileNameDlg(LPCTSTR szFilter, LPCTSTR extension, HWND hwnd, LPTSTR pszFile);
  22. static void ReplaceCharacter(TCHAR * string_val, const TCHAR replace_old, const TCHAR replace_new);
  23. static long DisplayMessage(HWND hParent, long iMsgID, long iTitleID=IDS_ERROR, long iType=0);
  24. static void DisplayDlgItem(HWND hWndDlg, long item_id, BOOL show);
  25. static STDMETHODIMP GetDlgItemString(HWND hwnd, long lResID, CComBSTR &bstrValue);
  26. protected:
  27. static STDMETHODIMP DisplayErrorInfo(HWND hWnd, HRESULT err_hr);
  28. static STDMETHODIMP GetDetailedErrorInfo(HWND hWnd, CComBSTR &bstrSource, CComBSTR &bstrDescription, HRESULT err_hr);
  29. };