.NET CF and MessageWindow

  • Thread starter Thread starter Stephen Inkpen
  • Start date Start date
S

Stephen Inkpen

I need to write a method that calls a function from a native DLL,
waits for a message from that dll, and then returns a code depending
on the contents of the message.

The psuedo code would look like the following:

public bool Go()
{
NativeFunction();

while (bContinue == false);

if (val == 0)
return true;
else
return false;
}

class WndMessage : WindowMessage
{
WndProc(Message msg)
{
if (msg.Message == MY_MESSAGE_TRUE)
{
bContinue = true;
val = 0;
}
else if (msg.Message == MY_MESSAGE_FALSE)
{
bContinue = true;
val = 1;
}
}
}

Is there anyway to have this kind of program flow?

Thanks,

Stephen Inkpen
 
Back
Top