Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Signing driver under vista x64

20 views
Skip to first unread message

Mathieu

unread,
Nov 7, 2009, 11:28:11 AM11/7/09
to
ello, When I signed my driver, it works. But Vista x64 refuses to
install this drivers with . Help - me!
Makecert -r -pe -ss PrivateCertStore -n "CN=TestCertforWDK" TestCert.cer
certmgr.exe -add testcert.cer -s -r localMachine root certmgr.exe -add
testcert.cer -s -r localMachine trustedpublisher SignTool sign /s
PrivateCertStore vdums.sys Signtool sign /s PrivateCertStore /t
http://timestamp.verisign.com/scripts/timestamp.dll vdums.sys
Signtool sign /s PrivateCertStore /n "CN=TestCertForWDK" /t http://times
tamp.verisign.com/scripts/timestamp.dll vdums.sys
SignTool Error: No certificates were found that met all the given criteria.
It's dont't work !! Why !!!
Thank you.


bool InstallDriver(char* pszDriverPath, char* pszDriverName) { SC_HANDLE
hSCManager; SC_HANDLE hService; //Remove any previous instance of the
driver RemoveDriver(pszDriverName); hSCManager=OpenSCManager(NULL, NULL,
SC_MANAGER_ALL_ACCESS); if (hSCManager) { //Install the driver
hService=CreateService( hSCManager, pszDriverName, pszDriverName,
SERVICE_ALL_ACCESS, SERVICE_KERNEL_DRIVER, SERVICE_AUTO_START,
SERVICE_ERROR_NORMAL, pszDriverPath, NULL, NULL, NULL, NULL, NULL);
CloseServiceHandle(hSCManager); if (hService==NULL) return FALSE; } else
return FALSE; CloseServiceHandle(hService); return TRUE; }

bool RemoveDriver(char* pszDriverName) { SC_HANDLE hSCManager; SC_HANDLE
hService; BOOL bResult; SetLastError(0); StopDriver(pszDriverName); int
err=GetLastError(); hSCManager=OpenSCManager(NULL, NULL,
SC_MANAGER_ALL_ACCESS); if (hSCManager) {
hService=OpenService(hSCManager, pszDriverName, SERVICE_ALL_ACCESS);
CloseServiceHandle(hSCManager); if (hService) {
bResult=DeleteService(hService); CloseServiceHandle(hService); } else
return FALSE; } else return FALSE; return bResult; }

bool StartDriver(char* pszDriverName) { SC_HANDLE hSCManager; SC_HANDLE
hService; BOOL bResult; hSCManager=OpenSCManager(NULL, NULL,
SC_MANAGER_ALL_ACCESS); if (hSCManager) {
hService=OpenService(hSCManager, pszDriverName, SERVICE_ALL_ACCESS);
CloseServiceHandle(hSCManager); if (hService) {
bResult=StartService(hService, 0, NULL); if (bResult==FALSE) { int
err=GetLastError(); if (err==ERROR_SERVICE_ALREADY_RUNNING)
bResult=TRUE; } CloseServiceHandle(hService); } else return FALSE; }
else return FALSE; return bResult; }


InstallDriver("c:\\sys\\vdums.sys","VDUMS")) { StartDriver("VDUMS");
hf=CreateFile(VDUM_CTL_DOSDEV_NAME, GENERIC_READ | GENERIC_WRITE, 0,
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if
(hf==INVALID_HANDLE_VALUE) { printf("Driver invalid\n"); }

0 new messages