Subversion Repositories Kolibri OS

Rev

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