Subversion Repositories Kolibri OS

Rev

Rev 3109 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
3067 leency 1
#include "..\lib\kolibri.h"
2
#include "..\lib\strings.h"
3
#include "..\lib\file_system.h"
4
 
5
#include "lang.h"
6
 
7
/////////////////////////////////////////////////////////////////////////////////////////
8
/////////////////////////             область данных                 ////////////////////
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
/////////////////////////////////////////////////////////////////////////////////////////
43
/////////////////////////                    код                     ////////////////////
44
/////////////////////////////////////////////////////////////////////////////////////////
45
#include "t_console.c"
46
#include "t_window.c"
47
 
48
 
49
void main()
50
{
51
	debug("=========  tmpdisk 0.4  =========");
52
	driver_handle = LoadDriver("tmpdisk");
53
	if (driver_handle==0)
54
	{
55
		notify("error: /rd1/1/lib/tmpdisk.obj driver loading failed");
56
		notify("program terminated");
57
		ExitProcess();
58
	}
59
	else
60
		debug("tmpdisk.obj driver loaded successfully");
61
 
62
	if (param)
63
		Console_Work();
64
	else
65
		Main_Window();
66
 
67
 
68
	ExitProcess();
69
}
70
 
71
stop: