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.

86 lines
2.6 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1999
  5. //
  6. // File: toolutl
  7. //
  8. // Contents: Tools Unitilies Header
  9. //
  10. //----------------------------------------------------------------------------
  11. #ifndef TOOLUTL_H
  12. #define TOOLUTL_H
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. //--------------------------------------------------------------------------
  17. //
  18. // Memory routines
  19. //--------------------------------------------------------------------------
  20. void *ToolUtlAlloc(IN size_t cbBytes, HMODULE hModule=NULL, int idsString=0);
  21. void ToolUtlFree(IN void *pv);
  22. //--------------------------------------------------------------------------
  23. //
  24. // string routines
  25. //--------------------------------------------------------------------------
  26. int IDSwcsnicmp(HMODULE hModule, WCHAR *pwsz, int idsString, DWORD dwCount);
  27. int IDSwcsicmp(HMODULE hModule, WCHAR *pwsz, int idsString);
  28. HRESULT WSZtoSZ(LPWSTR wsz, LPSTR *psz);
  29. //-------------------------------------------------------------------------
  30. //
  31. // The private version of wprintf. Input is an ID for a stirng resource
  32. // and the output is the standard output of wprintf.
  33. //
  34. //-------------------------------------------------------------------------
  35. void IDSwprintf(HMODULE hModule, int idsString, ...);
  36. void IDS_IDSwprintf(HMODULE hModule, int idString, int idStringTwo);
  37. void IDS_IDS_DW_DWwprintf(HMODULE hModule, int idString, int idStringTwo, DWORD dwOne, DWORD dwTwo);
  38. void IDS_IDS_IDSwprintf(HMODULE hModule, int ids1,int ids2,int ids3);
  39. void IDS_DW_IDS_IDSwprintf(HMODULE hModule, int ids1,DWORD dw,int ids2,int ids3);
  40. void IDS_IDS_IDS_IDSwprintf(HMODULE hModule, int ids1,int ids2,int ids3, int ids4);
  41. //--------------------------------------------------------------------------------
  42. //
  43. // file routines
  44. //
  45. //---------------------------------------------------------------------------------
  46. HRESULT RetrieveBLOBFromFile(LPWSTR pwszFileName,DWORD *pcb,BYTE **ppb);
  47. HRESULT OpenAndWriteToFile(LPCWSTR pwszFileName,PBYTE pb, DWORD cb);
  48. void GetFileName(LPWSTR pwszPath, LPWSTR *ppwszName);
  49. //--------------------------------------------------------------------------------
  50. //
  51. // compose and decompose the certificate property
  52. //
  53. //---------------------------------------------------------------------------------
  54. HRESULT ComposePvkString( CRYPT_KEY_PROV_INFO *pKeyProvInfo,
  55. LPWSTR *ppwszPvkString,
  56. DWORD *pcwchar);
  57. #ifdef __cplusplus
  58. }
  59. #endif
  60. #endif // TOOLUTL_H