Thanx for the advise but if I understand what you're saying
( im french so .... misunderstanding is something common)
Im already doing something like that
ScanComm scan the buffer until I receive a <CR><LF>
Carriage Return & Line Feed caracter
This is my "end of line" mark...
when I hit a crlf I assume this is a complete message and I handle it to do
something
like example...
VB apps on the other side sends: UserName: Chose Machin<CR><LF>
when ScanComm find the CR LF it takes all the string and send it to
MsgHandle so that I find what it is:
( whats in MsgHandle )
If "the received string has" UserName: in it
Get the text after the : and display it there....
end if
.... some other if statement....
Jason Garrett wrote:
> Perhaps you wish to StrCopy(InBuff, strRBuff) instead?
>
> I would not personally use StrCopy, as this will copy all characters
> up until the terminating NULL, which
> will not always exist after the single character you wait for.
>
> Try an algorithm similar to this:
>
> // bigBuf is a large buffer used to examine complete messages.
> // You may receive a few bytes of a message at a time, taking
> several calls to
> // receive the complete message. This means you have to build the
> complete message
> // elsewhere, such as bigBuf. Checking bigBuf for completeness in
> your case, would
> // be to scan for a NUL character indicating a complete string
> exists.
> // Extract the string, and carry on receiving data
> > do
> > {
> > RecepErr = SerReceiveWait(NumRef, 1, -1);
> > switch(RecepErr)
> > {
> > case 0:
> > {
> > StrCopy(strRBuff, InBuff);
> > ScanComm(InBuff);
> > break;
> > }
> > case serErrTimeOut:
> > {
> > return false;
> > break;
> > }
> > case serErrLineErr:
> > {
> > return false;
> > break;
> > }
> > }
> > }
> > while(TransmissionEnd == false);
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Patrick Ouellet - Programmeur
[EMAIL PROTECTED]
Recherche & Devloppement
Les Entreprise Microtec inc.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
--
For information on using the ACCESS Developer Forums, or to unsubscribe, please
see http://www.access-company.com/developers/forums/