[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] [ANN] WinAVR 20030115
From: |
Harald Kipp |
Subject: |
Re: [avr-gcc-list] [ANN] WinAVR 20030115 |
Date: |
Sun, 19 Jan 2003 19:01:40 +0100 |
Installing givio.sys is quite easy:
-----------------------------------
int PortDriverInstall(u_char *path)
{
SC_HANDLE manager;
SC_HANDLE service;
u_char *driver = "GIVEIO";
if((manager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS)) ==
NULL) {
return -1;
}
if((service = CreateService(manager, driver, driver, SERVICE_ALL_ACCESS,
SERVICE_KERNEL_DRIVER, SERVICE_AUTO_START, SERVICE_ERROR_NORMAL, path,
NULL, NULL, NULL, NULL, NULL)) == NULL) {
CloseServiceHandle(manager);
return -1;
}
CloseServiceHandle(service);
CloseServiceHandle(manager);
return 0;
}
-----------------------------------
Note, that path must be the full pathname of givio.sys.
After installation you need to reboot or execute
net start giveio
When giveio.sys had been used by an application, other
programmers may not work. Here's how to deinstall it:
-----------------------------------
int PortDriverRemove(void)
{
int rc = 0;
SC_HANDLE manager;
SC_HANDLE service;
if((manager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS)) ==
NULL) {
return -1;
}
if((service = OpenService(manager, "GIVEIO", SERVICE_ALL_ACCESS)) ==
NULL) {
CloseServiceHandle(manager);
return -1;
}
if(!DeleteService(service)) {
rc = -1;
}
CloseServiceHandle(service);
CloseServiceHandle(manager);
return rc;
}
-----------------------------------
If you like it, it's yours.
Harald
avr-gcc-list at http://avr1.org
Re: [avr-gcc-list] [ANN] WinAVR 20030115, E. Weddington, 2003/01/18
Re: [avr-gcc-list] [ANN] WinAVR 20030115, E. Weddington, 2003/01/18
Re: [avr-gcc-list] [ANN] WinAVR 20030115, E. Weddington, 2003/01/18
Re: [avr-gcc-list] [ANN] WinAVR 20030115, E. Weddington, 2003/01/18
RE: [avr-gcc-list] [ANN] WinAVR 20030115, Ebert, Rolf, 2003/01/18