|
From: Wilson K. <wil...@ya...> - 2008-10-16 00:15:40
|
Hi All,
Upon some debugging, the program crashes as soon as it tries to return the port->Send(msg) pointer instruction and complains about an access violation.
DWORDLONG Manager::Send(Message * msg)
{
return port->Send(msg);
}
I *think* there is some sort of pointer violation between the 'port' pointer and my new 'manager' pointer.
I had tried defining my manager pointer to
manager = NULL;
but that didn't solve the problem.
Any thoughts would be appreciated. Again, I'm just trying to use IOMeter to trigger a function in Dynamo that would display a simple message in the cmd interface before I can go further with this.
Thanks for your inputs!
--- On Wed, 10/15/08, Wilson Kwong <wil...@ya...> wrote:
> From: Wilson Kwong <wil...@ya...>
> Subject: Communication between IOMeter and Dynamo Question
> To: Iom...@li...
> Date: Wednesday, October 15, 2008, 1:00 PM
> Hi All,
>
> I'm trying to issue a command from IOMeter to Dynamo.
> As a first step, all I want to do is display a simple COUT
> message in the dynamo command window to show that it is
> working.
>
> I've created a button in IOMeter and verified that it
> works by displaying a line of text in a textbox in the
> IOMeter GUI whenever the button is pressed. Looking through
> the code, I can see the use of the manager->send option
> that should trigger functions in IOManager. Following
> similar implementation as Worker.cpp, I created a new
> function in IOManager with a CASE statement in the BOOL
> Manager::Process_Message() that would call this function.
>
> Now I go back to the button and issue the following
> commands OnClick. Adding these few lines of code to the
> button function crashes the IOMeter GUI right away when the
> button is pressed.
>
> msg.purpose = START_X;
> msg.data = NULL;
> manager->Send(&msg);
>
> Namely, the manager->Send(&msg); line is the culprit
> that crashes the GUI. Is there something else I need to add
> in MFC to handle a function call like this for buttons?
>
> Thanks for your help/suggstions.
>
> Best Regards,
> Wilson
|