-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
_IRP Statement bugfix #366
Comments
fix |
Reminder: use ``` around code to format it as code. I edited your post again. Thanks but your translation seems to have some mistakes. You are mixing up types and unions.
while you wrote
But the existing FB declaration of |
basic default 0 to 3=4 |
Please read about what a union is. FB's documentation is here. I tried to compile a test program that simply does Regardless, I used fbfrog to translate the C++ definition I linked to. It only took me a couple minutes (I had to make a couple small edits like removing union IRP__AssociatedIrp
MasterIrp as IRP ptr
IrpCount as LONG
SystemBuffer as PVOID
end union
type IRP__Overlay__AsynchronousParameters
union
UserApcRoutine as PIO_APC_ROUTINE
IssuingProcess as PVOID
end union
union
UserApcContext as PVOID
'IoRing as _IORING_OBJECT ptr
IoRing as PVOID
end union
end type
union IRP__Overlay
AsynchronousParameters as IRP__Overlay__AsynchronousParameters
AllocationSize as LARGE_INTEGER
end union
type IRP__Tail__Overlay
union
DeviceQueueEntry as KDEVICE_QUEUE_ENTRY
type
DriverContext(0 to 3) as PVOID
end type
end union
Thread as PETHREAD
AuxiliaryBuffer as PCHAR
union
type
ListEntry as LIST_ENTRY
union
CurrentStackLocation as _IO_STACK_LOCATION ptr
PacketType as ULONG
end union
end type
end union
OriginalFileObject as PFILE_OBJECT
end type
union IRP__Tail
Overlay as IRP__Tail__Overlay
Apc as KAPC
CompletionKey as PVOID
end union
type _IRP
as CSHORT Type
Size as USHORT
MdlAddress as PMDL
Flags as ULONG
AssociatedIrp as IRP__AssociatedIrp
ThreadListEntry as LIST_ENTRY
IoStatus as IO_STATUS_BLOCK
RequestorMode as KPROCESSOR_MODE
PendingReturned as BOOLEAN
StackCount as CHAR
CurrentLocation as CHAR
Cancel as BOOLEAN
CancelIrql as KIRQL
ApcEnvironment as CCHAR
AllocationFlags as UCHAR
union
UserIosb as PIO_STATUS_BLOCK
IoRingContext as PVOID
end union
UserEvent as PKEVENT
Overlay as IRP__Overlay
CancelRoutine as PDRIVER_CANCEL
UserBuffer as PVOID
Tail as IRP__Tail
end type Does this work for you? |
Oh, I see you wrote about it in a forum thread, very nice. You wrote you needed to make fixes to the headers to get around the missing |
|
Referring to MSDN, it has been compiled and passed after the correction
The text was updated successfully, but these errors were encountered: