I need an explanation for something I didn't understand.
I made this implementation (read a string from a pin and echo the result to a pin)
Code: Select all
if (Message->lParam == MSG_CHANGE)
{
PCHAR pcharTheInputString = pSerialInfoModule->GetEvtPChar( pSerialInfoModule->m_txtfExampleIn );
int lengthOfInputString = pSerialInfoModule->GetEvtSize(pSerialInfoModule->m_txtfExampleIn);
pSerialInfoModule->SetEvtSize(pSerialInfoModule->m_txtfExampleOut, lengthOfInputString);
pSerialInfoModule->SetEvtPChar(pSerialInfoModule->m_txtfExampleOut, pcharTheInputString);
}Code: Select all
PCHAR pcharTheInputString = pSerialInfoModule->GetEvtPChar( pSerialInfoModule->m_txtfExampleIn );Code: Select all
PCHAR GetEvtPChar( TEVT* ev )Code: Select all
typedef CHAR *PCHAR, *LPCH, *PCH;Code: Select all
std::string strTheInputString = pSerialInfoModule->GetEvtPChar( pSerialInfoModule->m_txtfExampleIn );
PCHAR pcharTheInputString = (PCHAR) strTheInputString.c_str();Code: Select all
pSerialInfoModule->SetEvtPChar(pSerialInfoModule->m_txtfExampleOut, strTheInputString);Code: Select all
PCHAR pcharTheInputString = (PCHAR) strTheInputString.c_str();
pSerialInfoModule->SetEvtPChar(pSerialInfoModule->m_txtfExampleOut, pcharTheInputString);Thanks.
Peter
P.S.: Yes, I know the simple way
Code: Select all
pSerialInfoModule->CopyEvt( pSerialInfoModule->m_txtfExampleIn,pSerialInfoModule->m_txtfExampleOut );