W
Wild Wind
Hello,
I made a post relating to this issue a while
back, but I haven't received any answer, so
here I am again.
I am writing a mixed C++ dll which uses the following
declaration:
typedef System::Byte ByteArray __gc[];
Then I have an event declared in the main class
for the dll as follows:
__event void MyEvent(ByteArray* ba);
The problem is that with this event declaration, when
I compile the code, I get the following errors:
error C2059: syntax error : ')'
error C2143: syntax error : missing ')' before ';'
error C2629: unexpected 'unsigned char ('
Each error is shown thrice.
My suspicions are that when you have __event
declarations for events that take pointers to
managed arrays, these expand to code which has
a syntax error. I tried this for a pointer to
an array of Strings and I was getting the same
kind of errors.
Also, when I modified the event declaration to
__event void MyEvent(ByteArray ba);
the errors went away.
Is this an MS bug? Can anyone reproduce this?
If it is a problem, is there anyway I can still
declare the event I want to?
TIA,
I made a post relating to this issue a while
back, but I haven't received any answer, so
here I am again.
I am writing a mixed C++ dll which uses the following
declaration:
typedef System::Byte ByteArray __gc[];
Then I have an event declared in the main class
for the dll as follows:
__event void MyEvent(ByteArray* ba);
The problem is that with this event declaration, when
I compile the code, I get the following errors:
error C2059: syntax error : ')'
error C2143: syntax error : missing ')' before ';'
error C2629: unexpected 'unsigned char ('
Each error is shown thrice.
My suspicions are that when you have __event
declarations for events that take pointers to
managed arrays, these expand to code which has
a syntax error. I tried this for a pointer to
an array of Strings and I was getting the same
kind of errors.
Also, when I modified the event declaration to
__event void MyEvent(ByteArray ba);
the errors went away.
Is this an MS bug? Can anyone reproduce this?
If it is a problem, is there anyway I can still
declare the event I want to?
TIA,