Rev 8954 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
3866 | punk_joker | 1 | #define MEMSIZE 0xA0000 |
3067 | leency | 2 | #include "..\lib\kolibri.h" |
5482 | leency | 3 | #include "..\lib\mem.h" |
4 | #include "..\lib\strings.h" |
||
7219 | leency | 5 | #include "..\lib\fs.h" |
3067 | leency | 6 | |
7 | ///////////////////////////////////////////////////////////////////////////////////////// |
||
3975 | leency | 8 | ///////////////////////// Program data //////////////////// |
3067 | leency | 9 | ///////////////////////////////////////////////////////////////////////////////////////// |
10 | |||
11 | struct ioctl_struct |
||
12 | { |
||
13 | dword handle; |
||
14 | dword io_code; |
||
15 | dword input; |
||
16 | dword inp_size; |
||
17 | dword output; |
||
18 | dword out_size; |
||
19 | }; |
||
20 | |||
21 | #define DEV_ADD_DISK 1 //input = structure add_disk_struc |
||
22 | #define DEV_DEL_DISK 2 //input = structure del_disk_struc |
||
23 | |||
24 | struct add_disk_struc |
||
25 | { |
||
26 | dword DiskSize; // in sectors, 1 sector = 512 bytes. Include FAT service data |
||
27 | unsigned char DiskId; // from 0 to 9 |
||
28 | }; |
||
29 | |||
30 | struct del_disk_struc |
||
31 | { |
||
32 | unsigned char DiskId; //from 0 to 9 |
||
33 | }; |
||
34 | |||
35 | |||
36 | ioctl_struct ioctl; |
||
37 | add_disk_struc add_disk; |
||
38 | del_disk_struc del_disk; |
||
39 | |||
40 | int driver_handle; |
||
41 | |||
42 | ///////////////////////////////////////////////////////////////////////////////////////// |
||
3975 | leency | 43 | ///////////////////////// Code //////////////////// |
3067 | leency | 44 | ///////////////////////////////////////////////////////////////////////////////////////// |
45 | #include "t_console.c" |
||
5482 | leency | 46 | #include "t_gui.c" |
3067 | leency | 47 | |
48 | |||
49 | void main() |
||
50 | { |
||
7985 | leency | 51 | if (! driver_handle = LoadDriver("tmpdisk")) |
3067 | leency | 52 | { |
9585 | vitalkrilo | 53 | notify("'TmpDisk\nError: /sys/drivers/tmpdisk.obj driver loading failed\nVirtual disk wouldn't be added' -tE"); |
3067 | leency | 54 | ExitProcess(); |
55 | } |
||
3440 | leency | 56 | |
3067 | leency | 57 | if (param) |
58 | Console_Work(); |
||
59 | else |
||
60 | Main_Window(); |
||
61 | |||
62 | ExitProcess(); |
||
63 | } |
||
64 | |||
65 | stop: |