News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Suggestion for constants parsing

Started by donkey, August 25, 2006, 04:02:15 AM

Previous topic - Next topic

donkey

Hi Jeremy,

I have been working with the DeviceIoControl API recently and have been having a long bout with translating the method arguments, no real trouble doing it but it would be nice if GoAsm's parser could handle shifts in formulae. For example the following would be nice...

#define MyEquate 0x2D<<14

Which would shift the value 02Dh left by 14 bits. Similarly >> would shift it right. This would help quite a bit when dealing with some Windows constants which are defined that way instead of manually calculating each one. I think I might have asked for this once before but can't remember if I actually did or if I got an answer, if it was asked and answered already, I appologize for bugging you about it.

Edgar
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

1rDirEctoALgran0

Why don't use :
#define MyEquate 0x2D*4000H

Yes I know it is not a clever answer... :red

Patrick

Shantanu Gadgil

Hi donkey,
I ran into the same problem...guess what...same API... :P :P

Not a GoASM user, but that would definitely be a cool feature!!!

I just wrote a function for the macro which is in the SDK
GetCtrlCode proc t:DWORD,f:DWORD,m:DWORD,a:DWORD
push ebx
mov eax,t
shl eax,16
mov ebx,a
shl ebx,14
or eax,ebx
mov ebx,f
shl ebx,2
or eax,ebx
or eax,m
pop ebx
ret
GetCtrlCode endp


Would make translating the Platform SDK soooo much easier.  :lol :lol

Cheers,
Shantanu
To ret is human, to jmp divine!

donkey

Hi Shantanu,

I don't generally use macros prefering not to have the value calculated at run time so I have been using the multiply method to translate the equates but it's prone to transcription error. It would be more convenient to have a shift operator not only for this function but for general use.

Edgar
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

jorgon

Author of the "Go" tools (GoAsm, GoLink, GoRC, GoBug)

donkey

#5
Hi Jeremy,

Thanks very much for this, it will make my equates look alot prettier and be a little more comprehensible to anyone who happens to know the C version of the particular constant. For those of you who cannot wait, here are the set of constants I have been using (from my GoInclude project that will be released in a few months)

#define FILE_DEVICE_8042_PORT           0x00000027
#define FILE_DEVICE_ACPI                0x00000032
#define FILE_DEVICE_BATTERY             0x00000029
#define FILE_DEVICE_BEEP                0x00000001
#define FILE_DEVICE_BUS_EXTENDER        0x0000002a
#define FILE_DEVICE_CD_ROM              0x00000002
#define FILE_DEVICE_CD_ROM_FILE_SYSTEM  0x00000003
#define FILE_DEVICE_CHANGER             0x00000030
#define FILE_DEVICE_CONTROLLER          0x00000004
#define FILE_DEVICE_DATALINK            0x00000005
#define FILE_DEVICE_DFS                 0x00000006
#define FILE_DEVICE_DFS_FILE_SYSTEM     0x00000035
#define FILE_DEVICE_DFS_VOLUME          0x00000036
#define FILE_DEVICE_DISK                0x00000007
#define FILE_DEVICE_DISK_FILE_SYSTEM    0x00000008
#define FILE_DEVICE_DVD                 0x00000033
#define FILE_DEVICE_FILE_SYSTEM         0x00000009
#define FILE_DEVICE_FIPS                0x0000003a
#define FILE_DEVICE_FULLSCREEN_VIDEO    0x00000034
#define FILE_DEVICE_INPORT_PORT         0x0000000a
#define FILE_DEVICE_KEYBOARD            0x0000000b
#define FILE_DEVICE_KS                  0x0000002f
#define FILE_DEVICE_KSEC                0x00000039
#define FILE_DEVICE_MAILSLOT            0x0000000c
#define FILE_DEVICE_MASS_STORAGE        0x0000002d
#define FILE_DEVICE_MIDI_IN             0x0000000d
#define FILE_DEVICE_MIDI_OUT            0x0000000e
#define FILE_DEVICE_MODEM               0x0000002b
#define FILE_DEVICE_MOUSE               0x0000000f
#define FILE_DEVICE_MULTI_UNC_PROVIDER  0x00000010
#define FILE_DEVICE_NAMED_PIPE          0x00000011
#define FILE_DEVICE_NETWORK             0x00000012
#define FILE_DEVICE_NETWORK_BROWSER     0x00000013
#define FILE_DEVICE_NETWORK_FILE_SYSTEM 0x00000014
#define FILE_DEVICE_NETWORK_REDIRECTOR  0x00000028
#define FILE_DEVICE_NULL                0x00000015
#define FILE_DEVICE_PARALLEL_PORT       0x00000016
#define FILE_DEVICE_PHYSICAL_NETCARD    0x00000017
#define FILE_DEVICE_PRINTER             0x00000018
#define FILE_DEVICE_SCANNER             0x00000019
#define FILE_DEVICE_SCREEN              0x0000001c
#define FILE_DEVICE_SERENUM             0x00000037
#define FILE_DEVICE_SERIAL_MOUSE_PORT   0x0000001a
#define FILE_DEVICE_SERIAL_PORT         0x0000001b
#define FILE_DEVICE_SMARTCARD           0x00000031
#define FILE_DEVICE_SMB                 0x0000002e
#define FILE_DEVICE_SOUND               0x0000001d
#define FILE_DEVICE_STREAMS             0x0000001e
#define FILE_DEVICE_TAPE                0x0000001f
#define FILE_DEVICE_TAPE_FILE_SYSTEM    0x00000020
#define FILE_DEVICE_TERMSRV             0x00000038
#define FILE_DEVICE_TRANSPORT           0x00000021
#define FILE_DEVICE_UNKNOWN             0x00000022
#define FILE_DEVICE_VDM                 0x0000002c
#define FILE_DEVICE_VIDEO               0x00000023
#define FILE_DEVICE_VIRTUAL_DISK        0x00000024
#define FILE_DEVICE_WAVE_IN             0x00000025
#define FILE_DEVICE_WAVE_OUT            0x00000026

F5_1Pt2_512 = 1
F3_1Pt44_512 = 2
F3_2Pt88_512 = 3
F3_20Pt8_512 = 4
F3_720_512 = 5
F5_360_512 = 6
F5_320_512 = 7
F5_320_1024 = 8
F5_180_512 = 9
F5_160_512 = 10
RemovableMedia = 11
FixedMedia = 12
F3_120M_512 = 13
F3_640_512 = 14
F5_640_512 = 15
F5_720_512 = 16
F3_1Pt2_512 = 17
F3_1Pt23_1024 = 18
F5_1Pt23_1024 = 19
F3_128Mb_512 = 20
F3_230Mb_512 = 21
F8_256_128 = 22

#define METHOD_BUFFERED  0
#define METHOD_IN_DIRECT  1
#define METHOD_OUT_DIRECT  2
#define METHOD_NEITHER  3


Note that these will NOT work with MASM as they use the 0xNNNNNN HEX format though they can easily be translated.

EDIT: See below for a new list of DeviceIoControl constants.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

jorgon

I've added this to Version 0.55.04 beta available from here.
Author of the "Go" tools (GoAsm, GoLink, GoRC, GoBug)

donkey

Thank you Jeremy,

My tests show that it is working perfectly. Here are the DeviceIoControl equates in the new format. Note that I have added FILE_READWRITE_ACCESS in order to simplyfy the equation, it is the result of (FILE_READ_ACCESS | FILE_WRITE_ACCESS)

#define FILE_ANY_ACCESS  0
#define FILE_SPECIAL_ACCESS 0
#define FILE_READ_ACCESS  0x0001
#define FILE_WRITE_ACCESS  0x0002
#define FILE_READWRITE_ACCESS  0x0003

#define IOCTL_STORAGE_BASE FILE_DEVICE_MASS_STORAGE
#define IOCTL_STORAGE_CHECK_VERIFY  (IOCTL_STORAGE_BASE<<16)|(0x0200<<2)|METHOD_BUFFERED|(FILE_READ_ACCESS<<14)
#define IOCTL_STORAGE_CHECK_VERIFY2  (IOCTL_STORAGE_BASE<<16)|(0x0200<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define IOCTL_STORAGE_MEDIA_REMOVAL  (IOCTL_STORAGE_BASE<<16)|(0x0201<<2)|METHOD_BUFFERED|(FILE_READ_ACCESS<<14)
#define IOCTL_STORAGE_EJECT_MEDIA  (IOCTL_STORAGE_BASE<<16)|(0x0202<<2)|METHOD_BUFFERED|(FILE_READ_ACCESS<<14)
#define IOCTL_STORAGE_LOAD_MEDIA  (IOCTL_STORAGE_BASE<<16)|(0x0203<<2)|METHOD_BUFFERED|(FILE_READ_ACCESS<<14)
#define IOCTL_STORAGE_LOAD_MEDIA2  (IOCTL_STORAGE_BASE<<16)|(0x0203<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define IOCTL_STORAGE_RESERVE  (IOCTL_STORAGE_BASE<<16)|(0x0204<<2)|METHOD_BUFFERED|(FILE_READ_ACCESS<<14)
#define IOCTL_STORAGE_RELEASE  (IOCTL_STORAGE_BASE<<16)|(0x0205<<2)|METHOD_BUFFERED|(FILE_READ_ACCESS<<14)
#define IOCTL_STORAGE_FIND_NEW_DEVICES  (IOCTL_STORAGE_BASE<<16)|(0x0206<<2)|METHOD_BUFFERED|(FILE_READ_ACCESS<<14)
#define IOCTL_STORAGE_EJECTION_CONTROL  (IOCTL_STORAGE_BASE<<16)|(0x0250<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define IOCTL_STORAGE_MCN_CONTROL  (IOCTL_STORAGE_BASE<<16)|(0x0251<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define IOCTL_STORAGE_GET_MEDIA_TYPES  (IOCTL_STORAGE_BASE<<16)|(0x0300<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define IOCTL_STORAGE_GET_MEDIA_TYPES_EX  (IOCTL_STORAGE_BASE<<16)|(0x0301<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define IOCTL_STORAGE_RESET_BUS  (IOCTL_STORAGE_BASE<<16)|(0x0400<<2)|METHOD_BUFFERED|(FILE_READ_ACCESS<<14)
#define IOCTL_STORAGE_RESET_DEVICE  (IOCTL_STORAGE_BASE<<16)|(0x0401<<2)|METHOD_BUFFERED|(FILE_READ_ACCESS<<14)
#define IOCTL_STORAGE_GET_DEVICE_NUMBER  (IOCTL_STORAGE_BASE<<16)|(0x0420<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define IOCTL_STORAGE_PREDICT_FAILURE  (IOCTL_STORAGE_BASE<<16)|(0x0440<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define OBSOLETE_IOCTL_STORAGE_RESET_BUS  (IOCTL_STORAGE_BASE<<16)|(0x0400<<2)|METHOD_BUFFERED|(FILE_READWRITE_ACCESS<<14)
#define OBSOLETE_IOCTL_STORAGE_RESET_DEVICE  (IOCTL_STORAGE_BASE<<16)|(0x0401<<2)|METHOD_BUFFERED|(FILE_READWRITE_ACCESS<<14)

#define IOCTL_DISK_BASE  FILE_DEVICE_DISK
#define IOCTL_DISK_GET_DRIVE_GEOMETRY  (IOCTL_DISK_BASE<<16)|(0x0000<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define IOCTL_DISK_GET_PARTITION_INFO  (IOCTL_DISK_BASE<<16)|(0x0001<<2)|METHOD_BUFFERED|(FILE_READ_ACCESS<<14)
#define IOCTL_DISK_SET_PARTITION_INFO  (IOCTL_DISK_BASE<<16)|(0x0002<<2)|METHOD_BUFFERED|(FILE_READWRITE_ACCESS<<14)
#define IOCTL_DISK_GET_DRIVE_LAYOUT  (IOCTL_DISK_BASE<<16)|(0x0003<<2)|METHOD_BUFFERED|(FILE_READ_ACCESS<<14)
#define IOCTL_DISK_SET_DRIVE_LAYOUT  (IOCTL_DISK_BASE<<16)|(0x0004<<2)|METHOD_BUFFERED|(FILE_READWRITE_ACCESS<<14)
#define IOCTL_DISK_VERIFY  (IOCTL_DISK_BASE<<16)|(0x0005<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define IOCTL_DISK_FORMAT_TRACKS  (IOCTL_DISK_BASE<<16)|(0x0006<<2)|METHOD_BUFFERED|(FILE_READWRITE_ACCESS<<14)
#define IOCTL_DISK_REASSIGN_BLOCKS  (IOCTL_DISK_BASE<<16)|(0x0007<<2)|METHOD_BUFFERED|(FILE_READWRITE_ACCESS<<14)
#define IOCTL_DISK_PERFORMANCE  (IOCTL_DISK_BASE<<16)|(0x0008<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define IOCTL_DISK_IS_WRITABLE  (IOCTL_DISK_BASE<<16)|(0x0009<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define IOCTL_DISK_LOGGING  (IOCTL_DISK_BASE<<16)|(0x000a<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define IOCTL_DISK_FORMAT_TRACKS_EX  (IOCTL_DISK_BASE<<16)|(0x000b<<2)|METHOD_BUFFERED|(FILE_READWRITE_ACCESS<<14)
#define IOCTL_DISK_HISTOGRAM_STRUCTURE  (IOCTL_DISK_BASE<<16)|(0x000c<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define IOCTL_DISK_HISTOGRAM_DATA  (IOCTL_DISK_BASE<<16)|(0x000d<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define IOCTL_DISK_HISTOGRAM_RESET  (IOCTL_DISK_BASE<<16)|(0x000e<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define IOCTL_DISK_REQUEST_STRUCTURE  (IOCTL_DISK_BASE<<16)|(0x000f<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define IOCTL_DISK_REQUEST_DATA  (IOCTL_DISK_BASE<<16)|(0x0010<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define IOCTL_DISK_CONTROLLER_NUMBER  (IOCTL_DISK_BASE<<16)|(0x0011<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define SMART_GET_VERSION  (IOCTL_DISK_BASE<<16)|(0x0020<<2)|METHOD_BUFFERED|(FILE_READ_ACCESS<<14)
#define SMART_SEND_DRIVE_COMMAND  (IOCTL_DISK_BASE<<16)|(0x0021<<2)|METHOD_BUFFERED|(FILE_READWRITE_ACCESS<<14)
#define SMART_RCV_DRIVE_DATA  (IOCTL_DISK_BASE<<16)|(0x0022<<2)|METHOD_BUFFERED|(FILE_READWRITE_ACCESS<<14)
#define IOCTL_DISK_UPDATE_DRIVE_SIZE  (IOCTL_DISK_BASE<<16)|(0x0032<<2)|METHOD_BUFFERED|(FILE_READWRITE_ACCESS<<14)
#define IOCTL_DISK_GROW_PARTITION  (IOCTL_DISK_BASE<<16)|(0x0034<<2)|METHOD_BUFFERED|(FILE_READWRITE_ACCESS<<14)
#define IOCTL_DISK_GET_CACHE_INFORMATION  (IOCTL_DISK_BASE<<16)|(0x0035<<2)|METHOD_BUFFERED|(FILE_READ_ACCESS<<14)
#define IOCTL_DISK_SET_CACHE_INFORMATION  (IOCTL_DISK_BASE<<16)|(0x0036<<2)|METHOD_BUFFERED|(FILE_READWRITE_ACCESS<<14)
#define IOCTL_DISK_DELETE_DRIVE_LAYOUT  (IOCTL_DISK_BASE<<16)|(0x0040<<2)|METHOD_BUFFERED|(FILE_READWRITE_ACCESS<<14)
#define IOCTL_DISK_FORMAT_DRIVE  (IOCTL_DISK_BASE<<16)|(0x00f3<<2)|METHOD_BUFFERED|(FILE_READWRITE_ACCESS<<14)
#define IOCTL_DISK_SENSE_DEVICE  (IOCTL_DISK_BASE<<16)|(0x00f8<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define IOCTL_DISK_CHECK_VERIFY  (IOCTL_DISK_BASE<<16)|(0x0200<<2)|METHOD_BUFFERED|(FILE_READ_ACCESS<<14)
#define IOCTL_DISK_MEDIA_REMOVAL  (IOCTL_DISK_BASE<<16)|(0x0201<<2)|METHOD_BUFFERED|(FILE_READ_ACCESS<<14)
#define IOCTL_DISK_EJECT_MEDIA  (IOCTL_DISK_BASE<<16)|(0x0202<<2)|METHOD_BUFFERED|(FILE_READ_ACCESS<<14)
#define IOCTL_DISK_LOAD_MEDIA  (IOCTL_DISK_BASE<<16)|(0x0203<<2)|METHOD_BUFFERED|(FILE_READ_ACCESS<<14)
#define IOCTL_DISK_RESERVE  (IOCTL_DISK_BASE<<16)|(0x0204<<2)|METHOD_BUFFERED|(FILE_READ_ACCESS<<14)
#define IOCTL_DISK_RELEASE  (IOCTL_DISK_BASE<<16)|(0x0205<<2)|METHOD_BUFFERED|(FILE_READ_ACCESS<<14)
#define IOCTL_DISK_FIND_NEW_DEVICES  (IOCTL_DISK_BASE<<16)|(0x0206<<2)|METHOD_BUFFERED|(FILE_READ_ACCESS<<14)
#define IOCTL_DISK_GET_MEDIA_TYPES  (IOCTL_DISK_BASE<<16)|(0x0300<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)

#define IOCTL_CHANGER_BASE  FILE_DEVICE_CHANGER
#define IOCTL_CHANGER_GET_PARAMETERS  (IOCTL_CHANGER_BASE<<16)|(0x0000<<2)|METHOD_BUFFERED|(FILE_READ_ACCESS<<14)
#define IOCTL_CHANGER_GET_STATUS  (IOCTL_CHANGER_BASE<<16)|(0x0001<<2)|METHOD_BUFFERED|(FILE_READ_ACCESS<<14)
#define IOCTL_CHANGER_GET_PRODUCT_DATA  (IOCTL_CHANGER_BASE<<16)|(0x0002<<2)|METHOD_BUFFERED|(FILE_READ_ACCESS<<14)
#define IOCTL_CHANGER_SET_ACCESS  (IOCTL_CHANGER_BASE<<16)|(0x0004<<2)|METHOD_BUFFERED|(FILE_READWRITE_ACCESS<<14)
#define IOCTL_CHANGER_GET_ELEMENT_STATUS  (IOCTL_CHANGER_BASE<<16)|(0x0005<<2)|METHOD_BUFFERED|(FILE_READWRITE_ACCESS<<14)
#define IOCTL_CHANGER_INITIALIZE_ELEMENT_STATUS  (IOCTL_CHANGER_BASE<<16)|(0x0006<<2)|METHOD_BUFFERED|(FILE_READ_ACCESS<<14)
#define IOCTL_CHANGER_SET_POSITION  (IOCTL_CHANGER_BASE<<16)|(0x0007<<2)|METHOD_BUFFERED|(FILE_READ_ACCESS<<14)
#define IOCTL_CHANGER_EXCHANGE_MEDIUM  (IOCTL_CHANGER_BASE<<16)|(0x0008<<2)|METHOD_BUFFERED|(FILE_READ_ACCESS<<14)
#define IOCTL_CHANGER_MOVE_MEDIUM  (IOCTL_CHANGER_BASE<<16)|(0x0009<<2)|METHOD_BUFFERED|(FILE_READ_ACCESS<<14)
#define IOCTL_CHANGER_REINITIALIZE_TRANSPORT  (IOCTL_CHANGER_BASE<<16)|(0x000A<<2)|METHOD_BUFFERED|(FILE_READ_ACCESS<<14)
#define IOCTL_CHANGER_QUERY_VOLUME_TAGS  (IOCTL_CHANGER_BASE<<16)|(0x000B<<2)|METHOD_BUFFERED|(FILE_READWRITE_ACCESS<<14)

#define FSCTL_REQUEST_OPLOCK_LEVEL_1  (FILE_DEVICE_FILE_SYSTEM<<16)|(0<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define FSCTL_REQUEST_OPLOCK_LEVEL_2  (FILE_DEVICE_FILE_SYSTEM<<16)|(1<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define FSCTL_REQUEST_BATCH_OPLOCK  (FILE_DEVICE_FILE_SYSTEM<<16)|(2<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define FSCTL_OPLOCK_BREAK_ACKNOWLEDGE  (FILE_DEVICE_FILE_SYSTEM<<16)|(3<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define FSCTL_OPBATCH_ACK_CLOSE_PENDING  (FILE_DEVICE_FILE_SYSTEM<<16)|(4<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define FSCTL_OPLOCK_BREAK_NOTIFY  (FILE_DEVICE_FILE_SYSTEM<<16)|(5<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define FSCTL_LOCK_VOLUME  (FILE_DEVICE_FILE_SYSTEM<<16)|(6<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define FSCTL_UNLOCK_VOLUME  (FILE_DEVICE_FILE_SYSTEM<<16)|(7<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define FSCTL_DISMOUNT_VOLUME  (FILE_DEVICE_FILE_SYSTEM<<16)|(8<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define FSCTL_IS_VOLUME_MOUNTED  (FILE_DEVICE_FILE_SYSTEM<<16)|(10<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define FSCTL_IS_PATHNAME_VALID  (FILE_DEVICE_FILE_SYSTEM<<16)|(11<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define FSCTL_MARK_VOLUME_DIRTY  (FILE_DEVICE_FILE_SYSTEM<<16)|(12<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define FSCTL_QUERY_RETRIEVAL_POINTERS  (FILE_DEVICE_FILE_SYSTEM<<16)|(14<<2)|METHOD_NEITHER|(FILE_ANY_ACCESS<<14)
#define FSCTL_GET_COMPRESSION  (FILE_DEVICE_FILE_SYSTEM<<16)|(15<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define FSCTL_SET_COMPRESSION  (FILE_DEVICE_FILE_SYSTEM<<16)|(16<<2)|METHOD_BUFFERED|(FILE_READWRITE_ACCESS<<14)
#define FSCTL_MARK_AS_SYSTEM_HIVE  (FILE_DEVICE_FILE_SYSTEM<<16)|(19<<2)|METHOD_NEITHER|(FILE_ANY_ACCESS<<14)
#define FSCTL_OPLOCK_BREAK_ACK_NO_2  (FILE_DEVICE_FILE_SYSTEM<<16)|(20<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define FSCTL_INVALIDATE_VOLUMES  (FILE_DEVICE_FILE_SYSTEM<<16)|(21<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define FSCTL_QUERY_FAT_BPB  (FILE_DEVICE_FILE_SYSTEM<<16)|(22<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define FSCTL_REQUEST_FILTER_OPLOCK  (FILE_DEVICE_FILE_SYSTEM<<16)|(23<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define FSCTL_FILESYSTEM_GET_STATISTICS  (FILE_DEVICE_FILE_SYSTEM<<16)|(24<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define FSCTL_GET_NTFS_VOLUME_DATA  (FILE_DEVICE_FILE_SYSTEM<<16)|(25<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define FSCTL_GET_NTFS_FILE_RECORD  (FILE_DEVICE_FILE_SYSTEM<<16)|(26<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define FSCTL_GET_VOLUME_BITMAP  (FILE_DEVICE_FILE_SYSTEM<<16)|(27<<2)|METHOD_NEITHER|(FILE_ANY_ACCESS<<14)
#define FSCTL_GET_RETRIEVAL_POINTERS  (FILE_DEVICE_FILE_SYSTEM<<16)|(28<<2)|METHOD_NEITHER|(FILE_ANY_ACCESS<<14)
#define FSCTL_MOVE_FILE  (FILE_DEVICE_FILE_SYSTEM<<16)|(29<<2)|METHOD_BUFFERED|(FILE_SPECIAL_ACCESS<<14)
#define FSCTL_IS_VOLUME_DIRTY  (FILE_DEVICE_FILE_SYSTEM<<16)|(30<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define FSCTL_GET_HFS_INFORMATION  (FILE_DEVICE_FILE_SYSTEM<<16)|(31<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define FSCTL_ALLOW_EXTENDED_DASD_IO  (FILE_DEVICE_FILE_SYSTEM<<16)|(32<<2)|METHOD_NEITHER|(FILE_ANY_ACCESS<<14)
#define FSCTL_READ_PROPERTY_DATA  (FILE_DEVICE_FILE_SYSTEM<<16)|(33<<2)|METHOD_NEITHER|(FILE_ANY_ACCESS<<14)
#define FSCTL_WRITE_PROPERTY_DATA  (FILE_DEVICE_FILE_SYSTEM<<16)|(34<<2)|METHOD_NEITHER|(FILE_ANY_ACCESS<<14)
#define FSCTL_FIND_FILES_BY_SID  (FILE_DEVICE_FILE_SYSTEM<<16)|(35<<2)|METHOD_NEITHER|(FILE_ANY_ACCESS<<14)
#define FSCTL_DUMP_PROPERTY_DATA  (FILE_DEVICE_FILE_SYSTEM<<16)|(37<<2)|METHOD_NEITHER|(FILE_ANY_ACCESS<<14)
#define FSCTL_SET_OBJECT_ID  (FILE_DEVICE_FILE_SYSTEM<<16)|(38<<2)|METHOD_BUFFERED|(FILE_SPECIAL_ACCESS<<14)
#define FSCTL_GET_OBJECT_ID  (FILE_DEVICE_FILE_SYSTEM<<16)|(39<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define FSCTL_DELETE_OBJECT_ID  (FILE_DEVICE_FILE_SYSTEM<<16)|(40<<2)|METHOD_BUFFERED|(FILE_SPECIAL_ACCESS<<14)
#define FSCTL_SET_REPARSE_POINT  (FILE_DEVICE_FILE_SYSTEM<<16)|(41<<2)|METHOD_BUFFERED|(FILE_SPECIAL_ACCESS<<14)
#define FSCTL_GET_REPARSE_POINT  (FILE_DEVICE_FILE_SYSTEM<<16)|(42<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define FSCTL_DELETE_REPARSE_POINT  (FILE_DEVICE_FILE_SYSTEM<<16)|(43<<2)|METHOD_BUFFERED|(FILE_SPECIAL_ACCESS<<14)
#define FSCTL_ENUM_USN_DATA  (FILE_DEVICE_FILE_SYSTEM<<16)|(44<<2)|METHOD_NEITHER|(FILE_ANY_ACCESS<<14)
#define FSCTL_SECURITY_ID_CHECK  (FILE_DEVICE_FILE_SYSTEM<<16)|(45<<2)|METHOD_NEITHER|(FILE_READ_ACCESS<<14)
#define FSCTL_READ_USN_JOURNAL  (FILE_DEVICE_FILE_SYSTEM<<16)|(46<<2)|METHOD_NEITHER|(FILE_ANY_ACCESS<<14)
#define FSCTL_SET_OBJECT_ID_EXTENDED  (FILE_DEVICE_FILE_SYSTEM<<16)|(47<<2)|METHOD_BUFFERED|(FILE_SPECIAL_ACCESS<<14)
#define FSCTL_CREATE_OR_GET_OBJECT_ID  (FILE_DEVICE_FILE_SYSTEM<<16)|(48<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define FSCTL_SET_SPARSE  (FILE_DEVICE_FILE_SYSTEM<<16)|(49<<2)|METHOD_BUFFERED|(FILE_SPECIAL_ACCESS<<14)
#define FSCTL_SET_ZERO_DATA  (FILE_DEVICE_FILE_SYSTEM<<16)|(50<<2)|METHOD_BUFFERED|(FILE_WRITE_ACCESS<<14)
#define FSCTL_QUERY_ALLOCATED_RANGES  (FILE_DEVICE_FILE_SYSTEM<<16)|(51<<2)|METHOD_NEITHER|(FILE_READ_ACCESS<<14)
#define FSCTL_ENABLE_UPGRADE  (FILE_DEVICE_FILE_SYSTEM<<16)|(52<<2)|METHOD_BUFFERED|(FILE_WRITE_ACCESS<<14)
#define FSCTL_SET_ENCRYPTION  (FILE_DEVICE_FILE_SYSTEM<<16)|(53<<2)|METHOD_NEITHER|(FILE_ANY_ACCESS<<14)
#define FSCTL_ENCRYPTION_FSCTL_IO  (FILE_DEVICE_FILE_SYSTEM<<16)|(54<<2)|METHOD_NEITHER|(FILE_ANY_ACCESS<<14)
#define FSCTL_WRITE_RAW_ENCRYPTED  (FILE_DEVICE_FILE_SYSTEM<<16)|(55<<2)|METHOD_NEITHER|(FILE_SPECIAL_ACCESS<<14)
#define FSCTL_READ_RAW_ENCRYPTED  (FILE_DEVICE_FILE_SYSTEM<<16)|(56<<2)|METHOD_NEITHER|(FILE_SPECIAL_ACCESS<<14)
#define FSCTL_CREATE_USN_JOURNAL  (FILE_DEVICE_FILE_SYSTEM<<16)|(57<<2)|METHOD_NEITHER|(FILE_ANY_ACCESS<<14)
#define FSCTL_READ_FILE_USN_DATA  (FILE_DEVICE_FILE_SYSTEM<<16)|(58<<2)|METHOD_NEITHER|(FILE_ANY_ACCESS<<14)
#define FSCTL_WRITE_USN_CLOSE_RECORD  (FILE_DEVICE_FILE_SYSTEM<<16)|(59<<2)|METHOD_NEITHER|(FILE_ANY_ACCESS<<14)
#define FSCTL_EXTEND_VOLUME  (FILE_DEVICE_FILE_SYSTEM<<16)|(60<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define FSCTL_QUERY_USN_JOURNAL  (FILE_DEVICE_FILE_SYSTEM<<16)|(61<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define FSCTL_DELETE_USN_JOURNAL  (FILE_DEVICE_FILE_SYSTEM<<16)|(62<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define FSCTL_MARK_HANDLE  (FILE_DEVICE_FILE_SYSTEM<<16)|(63<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define FSCTL_SIS_COPYFILE  (FILE_DEVICE_FILE_SYSTEM<<16)|(64<<2)|METHOD_BUFFERED|(FILE_ANY_ACCESS<<14)
#define FSCTL_SIS_LINK_FILES  (FILE_DEVICE_FILE_SYSTEM<<16)|(65<<2)|METHOD_BUFFERED|(FILE_READWRITE_ACCESS<<14)
#define FSCTL_HSM_MSG  (FILE_DEVICE_FILE_SYSTEM<<16)|(66<<2)|METHOD_BUFFERED|(FILE_READWRITE_ACCESS<<14)
#define FSCTL_NSS_CONTROL  (FILE_DEVICE_FILE_SYSTEM<<16)|(67<<2)|METHOD_BUFFERED|(FILE_WRITE_ACCESS<<14)
#define FSCTL_HSM_DATA  (FILE_DEVICE_FILE_SYSTEM<<16)|(68<<2)|METHOD_NEITHER|(FILE_READWRITE_ACCESS<<14)
#define FSCTL_RECALL_FILE  (FILE_DEVICE_FILE_SYSTEM<<16)|(69<<2)|METHOD_NEITHER|(FILE_ANY_ACCESS<<14)
#define FSCTL_NSS_RCONTROL  (FILE_DEVICE_FILE_SYSTEM<<16)|(70<<2)|METHOD_BUFFERED|(FILE_READ_ACCESS<<14)


Edgar
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable