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.

46 lines
1.2 KiB

  1. /*****************************************************************************\
  2. FILE: localsign.cpp
  3. DESCRIPTION:
  4. This code will sign and verify the signature of a Visual Style file.
  5. BryanSt 8/1/2000 (Bryan Starbuck)
  6. Copyright (C) Microsoft Corp 2000-2000. All rights reserved.
  7. \*****************************************************************************/
  8. #include "stdafx.h"
  9. #include <signing.h>
  10. #include <stdio.h>
  11. #include <windows.h>
  12. #include "signing.h"
  13. #include "localsign.h"
  14. #include <shlwapip.h>
  15. const BYTE * _GetPrivateKey(void)
  16. {
  17. const BYTE * pKeyToReturn = NULL;
  18. pKeyToReturn = s_keyPrivate1;
  19. return pKeyToReturn;
  20. }
  21. /*****************************************************************************\
  22. Public Fuctions
  23. \*****************************************************************************/
  24. HRESULT SignTheme(IN LPCWSTR pszFileName, int nWeek)
  25. {
  26. DWORD dwErrorCode;
  27. const BYTE * pPrivateKey = _GetPrivateKey();
  28. CThemeSignature themeSignature(s_keyPrivate1, SIZE_PRIVATE_KEY);
  29. dwErrorCode = themeSignature.Sign(pszFileName);
  30. return(HRESULT_FROM_WIN32(dwErrorCode));
  31. }