Subversion Repositories Kolibri OS

Rev

Rev 3866 | Rev 5482 | Go to most recent revision | 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"
3
#include "..\lib\strings.h"
4
#include "..\lib\file_system.h"
5
 
3109 leency 6
#ifndef AUTOBUILD
7
#include "lang.h--"
8
#endif
3067 leency 9
 
10
/////////////////////////////////////////////////////////////////////////////////////////
3975 leency 11
/////////////////////////              Program data                  ////////////////////
3067 leency 12
/////////////////////////////////////////////////////////////////////////////////////////
13
 
14
struct ioctl_struct
15
{
16
	dword	handle;
17
	dword	io_code;
18
	dword	input;
19
	dword	inp_size;
20
	dword	output;
21
	dword	out_size;
22
};
23
 
24
#define DEV_ADD_DISK 1	//input = structure add_disk_struc
25
#define DEV_DEL_DISK 2	//input = structure del_disk_struc
26
 
27
struct add_disk_struc
28
{
29
	dword DiskSize; // in sectors, 1 sector = 512 bytes. Include FAT service data
30
	unsigned char DiskId; // from 0 to 9
31
};
32
 
33
struct del_disk_struc
34
{
35
	unsigned char DiskId; //from 0 to 9
36
};
37
 
38
 
39
ioctl_struct ioctl;
40
add_disk_struc add_disk;
41
del_disk_struc del_disk;
42
 
43
int driver_handle;
44
 
45
/////////////////////////////////////////////////////////////////////////////////////////
3975 leency 46
/////////////////////////                    Code                    ////////////////////
3067 leency 47
/////////////////////////////////////////////////////////////////////////////////////////
48
#include "t_console.c"
49
#include "t_window.c"
50
 
51
 
52
void main()
53
{
54
	driver_handle = LoadDriver("tmpdisk");
55
	if (driver_handle==0)
56
	{
3440 leency 57
		notify("error: /rd1/1/drivers/tmpdisk.obj driver loading failed");
3975 leency 58
		notify("virtual disk wouldn't be added");
3067 leency 59
		ExitProcess();
60
	}
3440 leency 61
 
3067 leency 62
 
63
	if (param)
64
		Console_Work();
65
	else
66
		Main_Window();
67
 
68
 
69
	ExitProcess();
70
}
71
 
72
stop: