PDA

View Full Version : More info on that link to Aura



UnCommonGrafx
12-20-2003, 10:03 AM
I'm digging into the SDK and trying to find an answer to this query; being such a newbie to c/c++, I presume this is an answer a vet would/could answer. I appreciate the assist.

This line:

bool SendCommand(char *format, ... );
is what I seek counsel on. As I understand it, it's only gonna give me back a 0 or 1, not the contents of the results of the command issued. How can I capture that resut to a variable to parse that info as I please?

I can't see any way to cast (proper word?) this as a different type, e.g., a char or even an int, so that I can get back the actual result.

This is all in the RemoteToasterScript in the SDK.
And here's the peice as defined:


bool ToasterModuleConnection::SendCommand(char *format, ... )
{ static char Temp[4096];
va_list marker;
va_start(marker,format);
vsprintf(Temp,format,marker);
va_end(marker);

COPYDATASTRUCT cds;
cds.cbData=strlen(Temp)+1;
cds.lpData=Temp;
cds.dwData=m_MessageID;
return SendMessage(m_ApplicationWindow,WM_COPYDATA,NULL,( long)&cds) ? true : false;
}


Help!?:confused: