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

/*****************************************************************************\
FILE: localsign.cpp
DESCRIPTION:
This code will sign and verify the signature of a Visual Style file.
BryanSt 8/1/2000 (Bryan Starbuck)
Copyright (C) Microsoft Corp 2000-2000. All rights reserved.
\*****************************************************************************/
#include "stdafx.h"
#include <signing.h>
#include <stdio.h>
#include <windows.h>
#include "signing.h"
#include "localsign.h"
#include <shlwapip.h>
const BYTE * _GetPrivateKey(void)
{
const BYTE * pKeyToReturn = NULL;
pKeyToReturn = s_keyPrivate1;
return pKeyToReturn;
}
/*****************************************************************************\
Public Fuctions
\*****************************************************************************/
HRESULT SignTheme(IN LPCWSTR pszFileName, int nWeek)
{
DWORD dwErrorCode;
const BYTE * pPrivateKey = _GetPrivateKey();
CThemeSignature themeSignature(s_keyPrivate1, SIZE_PRIVATE_KEY);
dwErrorCode = themeSignature.Sign(pszFileName);
return(HRESULT_FROM_WIN32(dwErrorCode));
}