/[winpt]/trunk/Include/wptCryptdisk.h
ViewVC logotype

Diff of /trunk/Include/wptCryptdisk.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2 by twoaday, Mon Jan 31 11:02:21 2005 UTC revision 37 by werner, Thu Oct 27 19:12:40 2005 UTC
# Line 1  Line 1 
1  /* wptCryptdisk.h  /* wptCryptdisk.h
2   *      Copyright (C) 2004 Timo Schulz   *      Copyright (C) 2004 Timo Schulz
3   *   *
4   * This file is part of WinPT.   * This file is part of WinPT.
5   *   *
6   * WinPT is free software; you can redistribute it and/or modify   * WinPT is free software; you can redistribute it and/or modify
7   * it under the terms of the GNU General Public License as published by   * it under the terms of the GNU General Public License as published by
8   * the Free Software Foundation; either version 2 of the License, or   * the Free Software Foundation; either version 2 of the License, or
9   * (at your option) any later version.   * (at your option) any later version.
10   *   *
11   * WinPT is distributed in the hope that it will be useful,   * WinPT is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14   * GNU General Public License for more details.   * GNU General Public License for more details.
15   *   *
16   * You should have received a copy of the GNU General Public License   * You should have received a copy of the GNU General Public License
17   * along with WinPT; if not, write to the Free Software Foundation,   * along with WinPT; if not, write to the Free Software Foundation,
18   * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA   * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
19   */   */
20  #ifndef WPT_CRYPTDISK_H  #ifndef WPT_CRYPTDISK_H
21  #define WPT_CRYPTDISK_H  #define WPT_CRYPTDISK_H
22    
23  #define FILE_DEVICE_FILE_DISK       0x8000  #define FILE_DEVICE_FILE_DISK       0x8000
24  #define IOCTL_FILE_DISK_OPEN_FILE   CTL_CODE(FILE_DEVICE_FILE_DISK, 0x800, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)  #define IOCTL_FILE_DISK_OPEN_FILE   CTL_CODE(FILE_DEVICE_FILE_DISK, 0x800, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
25  #define IOCTL_FILE_DISK_CLOSE_FILE  CTL_CODE(FILE_DEVICE_FILE_DISK, 0x801, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)  #define IOCTL_FILE_DISK_CLOSE_FILE  CTL_CODE(FILE_DEVICE_FILE_DISK, 0x801, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
26  #define IOCTL_FILE_DISK_QUERY_FILE  CTL_CODE(FILE_DEVICE_FILE_DISK, 0x802, METHOD_BUFFERED, FILE_READ_ACCESS)  #define IOCTL_FILE_DISK_QUERY_FILE  CTL_CODE(FILE_DEVICE_FILE_DISK, 0x802, METHOD_BUFFERED, FILE_READ_ACCESS)
27    
28  #define DISK_DEFSIZE 32 /*MB*/  #define DISK_DEFSIZE 32 /*MB*/
29    
30  enum cmd_t {  enum cmd_t {
31      CMD_MOUNT   =0,      CMD_MOUNT   =0,
32      CMD_NEW     =1,      CMD_NEW     =1,
33      CMD_UMOUNT  =2,      CMD_UMOUNT  =2,
34      CMD_UMOUNT2 =3,      CMD_UMOUNT2 =3,
35  };  };
36    
37  struct private_ofi_s {  struct private_ofi_s {
38      INT             forced;      INT             forced;
39      INT             cmd;      INT             cmd;
40      INT             devnum;      INT             devnum;
41      CHAR            drvlet;      CHAR            drvlet;
42      LARGE_INTEGER   filesize;      LARGE_INTEGER   filesize;
43      BOOLEAN         readonly;      BOOLEAN         readonly;
44      USHORT          flen;      USHORT          flen;
45      UCHAR           fname[MAX_PATH+1];      UCHAR           fname[MAX_PATH+1];
46  };  };
47    
48  typedef struct _OPEN_FILE_INFORMATION {  typedef struct _OPEN_FILE_INFORMATION {
49      LARGE_INTEGER   FileSize;      LARGE_INTEGER   FileSize;
50      BOOLEAN         ReadOnly;      BOOLEAN         ReadOnly;
51      USHORT          FileNameLength;      USHORT          FileNameLength;
52      UCHAR           FileName[1];      UCHAR           FileName[1];
53  } OPEN_FILE_INFORMATION, *POPEN_FILE_INFORMATION;  } OPEN_FILE_INFORMATION, *POPEN_FILE_INFORMATION;
54    
55  struct mount_list_s {  struct mount_list_s {
56      struct mount_list_s * next;      struct mount_list_s * next;
57      char drive[8];      char drive[8];
58      LARGE_INTEGER size;      LARGE_INTEGER size;
59      int rdonly;      int rdonly;
60      int devnum;      int devnum;
61      int ttl;      int ttl;
62  };  };
63  typedef struct mount_list_s * mount_list_t;  typedef struct mount_list_s * mount_list_t;
64    
65    
66  /*-- wptCryptdisk.cpp --*/  /*-- wptCryptdisk.cpp --*/
67  int cryptdisk_unmount (char drivelet, int forced);  int cryptdisk_unmount (char drivelet, int forced);
68  int cryptdisk_available (void);  int cryptdisk_available (void);
69  void cryptdisk_cleanup (void);  void cryptdisk_cleanup (void);
70  int cryptdisk_serv_run (void);  int cryptdisk_serv_run (void);
71  BOOL CALLBACK cryptdisk_mount_dlg_proc (HWND dlg, UINT msg, WPARAM wparam,  BOOL CALLBACK cryptdisk_mount_dlg_proc (HWND dlg, UINT msg, WPARAM wparam,
72                                          LPARAM lparam);                                          LPARAM lparam);
73  BOOL CALLBACK cryptdisk_umount_dlg_proc (HWND dlg, UINT msg, WPARAM wparam,  BOOL CALLBACK cryptdisk_umount_dlg_proc (HWND dlg, UINT msg, WPARAM wparam,
74                                           LPARAM lparam);                                           LPARAM lparam);
75  BOOL CALLBACK cryptdisk_new_dlg_proc (HWND dlg, UINT msg, WPARAM wparam,  BOOL CALLBACK cryptdisk_new_dlg_proc (HWND dlg, UINT msg, WPARAM wparam,
76                                        LPARAM lparam);                                        LPARAM lparam);
77    
78  #endif /* WPT_CRYPTDISK_H */  #endif /* WPT_CRYPTDISK_H */

Legend:
Removed from v.2  
changed lines
  Added in v.37

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26