now org is (incomplete type is not allowed)
C - just like C++ - is case sensitive, so
original
is not the same as
Original
.
Try:
struct Orginal
{
PDRIVER_OBJECT driver_object;
PDRIVER_UNLOAD unload;
PDRIVER_DISPATCH major_functions[IRP_MJ_MAXIMUM_FUNCTION + 1];
PDEVICE_OBJECT device;
BOOLEAN destroy_device;
ULONGLONG guard_icall;
};
struct Orginal org = { .driver_object = NULL ,.unload = NULL , .device = NULL , .destroy_device = false , .guard_icall = 0};
Note: this will only work in C99 or later (ANSI C) - designated initializers did not exist in C prior to that.