T
The Hole Pounder
My C skills are rather meager so forgive me if I do not express my
question
clearly enough. Here is a struct that is declared in Windows:
typedef struct _REPARSE_GUID_DATA_BUFFER
{
DWORD ReparseTag;
WORD ReparseDataLength;
WORD Reserved;
GUID ReparseGuid;
struct {BYTE DataBuffer[1]; } GenericReparseBuffer;
} REPARSE_GUID_DATA_BUFFER, *PREPARSE_GUID_DATA_BUFFER;
Now I'm going to show my attempt at assigning to "DataBuffer". This code
is
written in Eiffel but the part inside of the square brackets ([]) is C
code
except you will see some "$" symbols which you can ignore:
set_c_generic_reparse_buffer_data_buffer_pointer (a_item, v: POINTER) is
external
"C inline use <Windows.h>"
alias
"[
{
PREPARSE_GUID_DATA_BUFFER itm;
BYTE* db;
itm = $a_item;
db = $v;
&((itm->GenericReparseBuffer).DataBuffer) = db;
}
]"
end
Line 5 of the C code part is where I attempt to assign the array
"DataBuffer[]" in the struct "GenericReparseBuffer" which is a member of
the
struct "REPARSE_GUID_DATA_BUFFER". My Eiffel compiler translates the
Eiffel
code into C and uses MSVC++ to compile it. The C compiler gives me this
error:
error C2106: '=' : left operand must be l-value
I'm hoping I can get some assistance with this. Sorry about the Eiffel
code
but this is a problem with the C part.
question
clearly enough. Here is a struct that is declared in Windows:
typedef struct _REPARSE_GUID_DATA_BUFFER
{
DWORD ReparseTag;
WORD ReparseDataLength;
WORD Reserved;
GUID ReparseGuid;
struct {BYTE DataBuffer[1]; } GenericReparseBuffer;
} REPARSE_GUID_DATA_BUFFER, *PREPARSE_GUID_DATA_BUFFER;
Now I'm going to show my attempt at assigning to "DataBuffer". This code
is
written in Eiffel but the part inside of the square brackets ([]) is C
code
except you will see some "$" symbols which you can ignore:
set_c_generic_reparse_buffer_data_buffer_pointer (a_item, v: POINTER) is
external
"C inline use <Windows.h>"
alias
"[
{
PREPARSE_GUID_DATA_BUFFER itm;
BYTE* db;
itm = $a_item;
db = $v;
&((itm->GenericReparseBuffer).DataBuffer) = db;
}
]"
end
Line 5 of the C code part is where I attempt to assign the array
"DataBuffer[]" in the struct "GenericReparseBuffer" which is a member of
the
struct "REPARSE_GUID_DATA_BUFFER". My Eiffel compiler translates the
Eiffel
code into C and uses MSVC++ to compile it. The C compiler gives me this
error:
error C2106: '=' : left operand must be l-value
I'm hoping I can get some assistance with this. Sorry about the Eiffel
code
but this is a problem with the C part.