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.

123 lines
3.9 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1999
  5. //
  6. // File: JavaAttr.h
  7. //
  8. //
  9. //----------------------------------------------------------------------------
  10. #ifndef _JAVA_ATTR_DLL_H
  11. #define _JAVA_ATTR_DLL_H
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. //+-----------------------------------------------------------------------
  16. //
  17. // InitAttr:
  18. //
  19. // This function should be called as the first call to the dll.
  20. //
  21. // The dll has to use the input memory allocation and free routine
  22. // to allocate and free all memories, including internal use.
  23. // It has to handle when pInitString==NULL.
  24. //
  25. //------------------------------------------------------------------------
  26. HRESULT WINAPI
  27. InitAttr(LPWSTR pInitString); //IN: the init string
  28. typedef HRESULT (*pInitAttr)(LPWSTR pInitString);
  29. //+-----------------------------------------------------------------------
  30. //
  31. // GetAttrs:
  32. //
  33. //
  34. // Return authenticated and unauthenticated attributes.
  35. //
  36. // *ppsAuthenticated and *ppsUnauthenticated should never be NULL.
  37. // If there is no attribute, *ppsAuthenticated->cAttr==0.
  38. //
  39. //------------------------------------------------------------------------
  40. HRESULT WINAPI
  41. GetAttr(PCRYPT_ATTRIBUTES *ppsAuthenticated, // OUT: Authenticated attributes added to signature
  42. PCRYPT_ATTRIBUTES *ppsUnauthenticated); // OUT: Uunauthenticated attributes added to signature
  43. typedef HRESULT (*pGetAttr)(PCRYPT_ATTRIBUTES *ppsAuthenticated,
  44. PCRYPT_ATTRIBUTES *ppsUnauthenticated);
  45. //+-----------------------------------------------------------------------
  46. //
  47. // GetAttrsEx:
  48. //
  49. //
  50. // Return authenticated and unauthenticated attributes.
  51. //
  52. // *ppsAuthenticated and *ppsUnauthenticated should never be NULL.
  53. // If there is no attribute, *ppsAuthenticated->cAttr==0.
  54. //
  55. //------------------------------------------------------------------------
  56. HRESULT WINAPI
  57. GetAttrEx( DWORD dwFlags, //In: Reserved. Set to 0.
  58. LPWSTR pwszFileName, //In: The file name to sign
  59. LPWSTR pInitString, //In: The init string, same as the input parameter to InitAttr
  60. PCRYPT_ATTRIBUTES *ppsAuthenticated, // OUT: Authenticated attributes added to signature
  61. PCRYPT_ATTRIBUTES *ppsUnauthenticated); // OUT: Uunauthenticated attributes added to signature
  62. typedef HRESULT (*pGetAttrEx)(DWORD dwFlags,
  63. LPWSTR pwszFileName,
  64. LPWSTR pInitString,
  65. PCRYPT_ATTRIBUTES *ppsAuthenticated,
  66. PCRYPT_ATTRIBUTES *ppsUnauthenticated);
  67. //+-----------------------------------------------------------------------
  68. //
  69. // ReleaseAttrs:
  70. //
  71. //
  72. // Release authenticated and unauthenticated attributes
  73. // returned from GetAttr().
  74. //
  75. // psAuthenticated and psUnauthenticated should never be NULL.
  76. //
  77. //------------------------------------------------------------------------
  78. HRESULT WINAPI
  79. ReleaseAttr(PCRYPT_ATTRIBUTES psAuthenticated, // OUT: Authenticated attributes to be released
  80. PCRYPT_ATTRIBUTES psUnauthenticated); // OUT: Uunauthenticated attributes to be released
  81. typedef HRESULT (*pReleaseAttr)(PCRYPT_ATTRIBUTES psAuthenticated,
  82. PCRYPT_ATTRIBUTES psUnauthenticated);
  83. //+-----------------------------------------------------------------------
  84. //
  85. // ExitAttr:
  86. //
  87. // This function should be called as the last call to the dll
  88. //------------------------------------------------------------------------
  89. HRESULT WINAPI
  90. ExitAttr( );
  91. typedef HRESULT (*pExitAttr)();
  92. #ifdef __cplusplus
  93. }
  94. #endif
  95. #endif //#define _JAVA_ATTR_DLL_H