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.

55 lines
1.8 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1999
  6. //
  7. // File: misc.h
  8. //
  9. //--------------------------------------------------------------------------
  10. #ifndef __MISC_H_
  11. #define __MISC_H_
  12. // count the number of bytes needed to fully store the WSZ
  13. #define WSZ_BYTECOUNT(__z__) \
  14. ( (__z__ == NULL) ? 0 : (wcslen(__z__)+1)*sizeof(WCHAR) )
  15. #define IDM_NEW_CERTTYPE 1
  16. #define IDM_EDIT_GLOBAL_CERTTYPE 2
  17. #define IDM_MANAGE 3
  18. #define wszSNAPIN_FILENAME L"capesnpn.dll"
  19. LPCWSTR GetNullMachineName(CString* pcstr);
  20. STDMETHODIMP CStringLoad(CString& cstr, IStream *pStm);
  21. STDMETHODIMP CStringSave(CString& cstr, IStream *pStm, BOOL fClearDirty);
  22. void DisplayGenericCertSrvError(LPCONSOLE2 pConsole, DWORD dwErr);
  23. LPWSTR BuildErrorMessage(DWORD dwErr);
  24. BOOL FileTimeToLocalTimeString(FILETIME* pftGMT, LPWSTR* ppszTmp);
  25. BOOL MyGetEnhancedKeyUsages(HCERTTYPE hCertType, CString **aszUsages, DWORD *cUsages, BOOL *pfCritical, BOOL fGetOIDSNotNames);
  26. BOOL GetIntendedUsagesString(HCERTTYPE hCertType, CString *pUsageString);
  27. BOOL MyGetKeyUsages(HCERTTYPE hCertType, CRYPT_BIT_BLOB **ppBitBlob, BOOL *pfPublicKeyUsageCritical);
  28. BOOL MyGetBasicConstraintInfo(HCERTTYPE hCertType, BOOL *pfCA, BOOL *pfPathLenConstraint, DWORD *pdwPathLenConstraint);
  29. LPSTR MyMkMBStr(LPCWSTR pwsz);
  30. LPWSTR MyMkWStr(LPCSTR psz);
  31. void MyErrorBox(HWND hwndParent, UINT nIDText, UINT nIDCaption, DWORD dwErrorCode = 0);
  32. LPSTR AllocAndCopyStr(LPCSTR psz);
  33. LPWSTR AllocAndCopyStr(LPCWSTR pwsz);
  34. BOOL MyGetOIDInfo(LPWSTR string, DWORD stringSize, LPSTR pszObjId);
  35. HRESULT
  36. UpdateCATemplateList(
  37. IN HWND hwndParent,
  38. IN HCAINFO hCAInfo,
  39. IN const CTemplateList& list);
  40. #endif //__MISC_H_