Subversion Repositories Kolibri OS

Rev

Rev 8703 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
8703 turbocat 1
#include 
2
#include 
3
 
4
static int __stdcall service_proc(ioctl_t *my_ctl){
5
    int c = 0;
6
    int a = *(int*)(my_ctl->input);
7
    int b = *(int*)(my_ctl->input+4);
8
    if(my_ctl->io_code==0){
9
        c = a + b;
10
    }else{
11
        return -1;
12
    }
13
    *(int*)(my_ctl->output) = c;
14
    return 0;
15
}
16
 
17
unsigned drvEntry(int action, char *cmdline){
8704 turbocat 18
    SysMsgBoardStr("Driver c_drv.dll loaded!\n");
8703 turbocat 19
    return RegService("c_drv", service_proc);
20
}