Click here to Skip to main content
15,905,563 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to notice socket disconnection? Pin
Hamed Musavi2-Apr-07 1:50
Hamed Musavi2-Apr-07 1:50 
Questionretrieve registry key path from HKEY Pin
bahaa1236541-Apr-07 2:53
bahaa1236541-Apr-07 2:53 
AnswerRe: retrieve registry key path from HKEY Pin
Eytukan1-Apr-07 6:13
Eytukan1-Apr-07 6:13 
GeneralRe: retrieve registry key path from HKEY Pin
bahaa1236541-Apr-07 6:53
bahaa1236541-Apr-07 6:53 
GeneralRe: retrieve registry key path from HKEY Pin
Hamed Musavi1-Apr-07 8:54
Hamed Musavi1-Apr-07 8:54 
AnswerRe: retrieve registry key path from HKEY Pin
Hamid_RT1-Apr-07 18:17
Hamid_RT1-Apr-07 18:17 
AnswerRe: retrieve registry key path from HKEY Pin
ThatsAlok1-Apr-07 22:27
ThatsAlok1-Apr-07 22:27 
QuestionSerial Programming Pin
Guddappa T H1-Apr-07 2:50
Guddappa T H1-Apr-07 2:50 
Hai,
This is a program for serial data reception. Can anybody tell me how this code is working. It is programmed to receive 18 bytes (a configured data packet of 18 bytes) of data.......

Code is:


CTimerDlg::OnOnComm()
{
if(m_comm.GetCommevent() == 2) // m_comm is serial member variable
{
UCHAR *parray; // local array
COleVariant var;

var = m_comm.GetInput();
long comL;
HRESULT hr = SafeAraayGetUBound(var.parray , 1 , &comL);

if(hr == S_OK)
{

hr = SafeArrayAccessData(var.parray , (void**)&parray);
if(hr == S_OK)
{
Rxdata[RxBuffcount++]=parray[0]; //local array
}

SafeArrayUnaccessData(var.parray);

if(RxBuffcount == 18) // if 18 bytes received proceed
{

Processdata(); // data processing
RxBuffcount = 0;
}
}

}
}

My questions are:
1. How is this code working.
2. Is this code receiving data bytewise or not .
3. If so how and where to check for the first (header) byte (say 0xaa).


Plz help me.

Regards,
Guddappa T HFrown | :(
QuestionRe: Serial Programming Pin
Eytukan1-Apr-07 6:19
Eytukan1-Apr-07 6:19 
AnswerRe: Serial Programming Pin
ThatsAlok1-Apr-07 22:26
ThatsAlok1-Apr-07 22:26 
QuestionWindows Explorer-Style MFC Application - urgent Pin
deeps_cute1-Apr-07 1:55
deeps_cute1-Apr-07 1:55 
AnswerRe: Windows Explorer-Style MFC Application - urgent Pin
Hamed Musavi1-Apr-07 4:50
Hamed Musavi1-Apr-07 4:50 
GeneralRe: Windows Explorer-Style MFC Application - urgent Pin
deeps_cute1-Apr-07 6:26
deeps_cute1-Apr-07 6:26 
GeneralRe: Windows Explorer-Style MFC Application - urgent Pin
Mark Salsbery1-Apr-07 6:54
Mark Salsbery1-Apr-07 6:54 
GeneralRe: Windows Explorer-Style MFC Application - with tree view Pin
deeps_cute1-Apr-07 17:23
deeps_cute1-Apr-07 17:23 
GeneralRe: Windows Explorer-Style MFC Application - with tree view Pin
G Haranadh1-Apr-07 19:55
G Haranadh1-Apr-07 19:55 
GeneralRe: Windows Explorer-Style MFC Application - with tree view Pin
deeps_cute1-Apr-07 20:34
deeps_cute1-Apr-07 20:34 
QuestionRe: Windows Explorer-Style MFC Application - with tree view Pin
Mark Salsbery2-Apr-07 5:25
Mark Salsbery2-Apr-07 5:25 
AnswerRe: Windows Explorer-Style MFC Application - with tree view Pin
deeps_cute2-Apr-07 17:41
deeps_cute2-Apr-07 17:41 
GeneralRe: Windows Explorer-Style MFC Application - with tree view Pin
Mark Salsbery3-Apr-07 7:14
Mark Salsbery3-Apr-07 7:14 
QuestionTAB CONTROL Pin
prathuraj1-Apr-07 1:38
prathuraj1-Apr-07 1:38 
JokeOK, BTW... Pin
CPallini1-Apr-07 2:15
mveCPallini1-Apr-07 2:15 
GeneralRe: OK, BTW... Pin
prathuraj1-Apr-07 2:22
prathuraj1-Apr-07 2:22 
GeneralRe: OK, BTW... Pin
Mark Salsbery1-Apr-07 6:56
Mark Salsbery1-Apr-07 6:56 
GeneralRe: OK, BTW... Pin
prathuraj1-Apr-07 17:22
prathuraj1-Apr-07 17:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.