ExylonFiber
Well-Known Member
- Joined
- Apr 25, 2020
- Messages
- 26
- Thread Author
- #1
I cannot figure out why +1 or -1 is added to a cast or a buffer such as,
as listed on the MSDN page:
I searched google and could not find the answer as to why this practice is implemented in programming pertaining to buffers and structures in particular.
Code:
firmwareRequest = (PFIRMWARE_REQUEST_BLOCK)(srbControl + 1);
as listed on the MSDN page:
Upgrading Firmware for an NVMe Device (Legacy Approach) - Windows drivers
Legacy approach for firmware updates on NVMe storage devices using IOCTL_SCSI_MINIPORT with SRB I/O control structures.
docs.microsoft.com
I searched google and could not find the answer as to why this practice is implemented in programming pertaining to buffers and structures in particular.