Hi,
I’m kind of new to Plugin-development and is trying to write a class which is doing some work and during the process sends an event back to RB2012r1.2.
The event looks like this from within RB:
Processing(BytesProcessed as Integer, BytesToProcess as Integer)
The problem is that I run into a StackoverflowException and I do not know why. It seems as if the callback to RB has been performed a couple of times I get the exception.
Dan
Here’s some code snippets that shows what I’m doing.
REALevent DansClassEvents[] = {
{ “Processing( BytesProcessed as Integer, BytesToProcess as Integer )”},
};
void FireProcessingEvent( REALobject instance, long NumOfBytes,long NumOfTotalBytes )
{
void (fpProcessing)(REALobject instance, long i,long ii) =
(void ()(REALobject, long,long))REALGetEventInstance( (REALcontrolInstance)instance, & DansClassEvents[ 0 ] );
if (fpProcessing) {
fpProcessing( instance, NumOfBytes , NumOfTotalBytes);
} else {
return;
}
}
FireExpandingEvent(instance,completedBytes,totalBytes);