Subversion Repositories Kolibri OS

Rev

Rev 3866 | Rev 5482 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. #define MEMSIZE 0xA0000
  2. #include "..\lib\kolibri.h"
  3. #include "..\lib\strings.h"
  4. #include "..\lib\file_system.h"
  5.  
  6. #ifndef AUTOBUILD
  7. #include "lang.h--"
  8. #endif
  9.  
  10. /////////////////////////////////////////////////////////////////////////////////////////
  11. /////////////////////////              Program data                  ////////////////////
  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. /////////////////////////////////////////////////////////////////////////////////////////
  46. /////////////////////////                    Code                    ////////////////////
  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.         {
  57.                 notify("error: /rd1/1/drivers/tmpdisk.obj driver loading failed");
  58.                 notify("virtual disk wouldn't be added");
  59.                 ExitProcess();
  60.         }
  61.  
  62.        
  63.         if (param)
  64.                 Console_Work();
  65.         else
  66.                 Main_Window();
  67.                
  68.        
  69.         ExitProcess();
  70. }
  71.  
  72. stop:
  73.