Click here to Skip to main content
15,887,596 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Adding more than 9 pages to a Wizard created using VC++ 6.0 Pin
Naveen24-Jul-06 0:10
Naveen24-Jul-06 0:10 
GeneralRe: Adding more than 9 pages to a Wizard created using VC++ 6.0 Pin
Subhobroto24-Jul-06 0:25
Subhobroto24-Jul-06 0:25 
GeneralRe: Adding more than 9 pages to a Wizard created using VC++ 6.0 Pin
Naveen24-Jul-06 0:42
Naveen24-Jul-06 0:42 
GeneralRe: Adding more than 9 pages to a Wizard created using VC++ 6.0 Pin
Subhobroto24-Jul-06 0:45
Subhobroto24-Jul-06 0:45 
Questionweb SMS Pin
Ram Murali18-Jul-06 19:02
Ram Murali18-Jul-06 19:02 
AnswerRe: web SMS Pin
Divyang Mithaiwala18-Jul-06 19:46
Divyang Mithaiwala18-Jul-06 19:46 
GeneralRe: web SMS Pin
Ram Murali18-Jul-06 19:54
Ram Murali18-Jul-06 19:54 
Questioncopying circular buffer Pin
thathvamsi18-Jul-06 16:38
thathvamsi18-Jul-06 16:38 
Hey all,
Iam using VC++6.0.
I am trying to copy the packet data receeived from the serial device in to a ciruclar buffer. But when I try to copy the packet contents from the circular buffer to another local buffer, I am succesful in my first copy. But if a second packet comes into PC, I still keep copying the first packet only. I track the buffer count using a pointer.
I dont understand whats wrong.
Heres the code snippet.

void CMainFrame::OnPortRx(WPARAM wBytesRx, LPARAM lE)
{

char* cpRxData = new char[wBytesRx];

memcpy(cpRxData, m_commPort.GetRawInput(), wBytesRx);

}

where GetRawInput is :
char* CComm::GetRawInput()
{
return m_commInfo->cCircularBuffer;
}

here, CComm is the communciation class

Say, I receive 10 bytes in first packet.
I update the circular buffer count in the Readbuffer() function , I read the second packet having 10 bytes and copy thenm in to circular buffer index being 10 to 19. On every newpacket the buffer index is kept track of and copied. But when I use GetRawInput to do memcpy, the cicular buffer contents from 0 to 9 gets copied in to cpRxdata everytime.

Any help please?



AnswerRe: copying circular buffer Pin
ankita patel19-Jul-06 10:36
ankita patel19-Jul-06 10:36 
QuestionConversion from int to char Pin
Kuroro Rucilful18-Jul-06 15:57
Kuroro Rucilful18-Jul-06 15:57 
AnswerRe: Conversion from int to char Pin
charlieg18-Jul-06 16:09
charlieg18-Jul-06 16:09 
GeneralRe: Conversion from int to char Pin
Kuroro Rucilful18-Jul-06 16:15
Kuroro Rucilful18-Jul-06 16:15 
GeneralRe: Conversion from int to char Pin
ThatsAlok18-Jul-06 18:37
ThatsAlok18-Jul-06 18:37 
AnswerRe: Conversion from int to char Pin
toxcct18-Jul-06 21:22
toxcct18-Jul-06 21:22 
AnswerRe: Conversion from int to char Pin
Hamid_RT18-Jul-06 21:24
Hamid_RT18-Jul-06 21:24 
Questionthe parameter of CreateThread problem Pin
missiles18-Jul-06 15:23
missiles18-Jul-06 15:23 
AnswerRe: the parameter of CreateThread problem Pin
Stephen Hewitt18-Jul-06 15:36
Stephen Hewitt18-Jul-06 15:36 
GeneralRe: the parameter of CreateThread problem Pin
led mike18-Jul-06 17:24
led mike18-Jul-06 17:24 
GeneralRe: the parameter of CreateThread problem Pin
Stephen Hewitt18-Jul-06 17:54
Stephen Hewitt18-Jul-06 17:54 
GeneralRe: the parameter of CreateThread problem Pin
led mike18-Jul-06 18:08
led mike18-Jul-06 18:08 
GeneralRe: the parameter of CreateThread problem Pin
missiles20-Jul-06 16:04
missiles20-Jul-06 16:04 
QuestionDoes any one know something about usbzip boot? Pin
momer18-Jul-06 14:56
momer18-Jul-06 14:56 
QuestionProblem using RegEx (boost) Pin
Mark F.18-Jul-06 14:25
Mark F.18-Jul-06 14:25 
AnswerRe: Problem using RegEx (boost) Pin
Stephen Hewitt18-Jul-06 14:31
Stephen Hewitt18-Jul-06 14:31 
GeneralRe: Problem using RegEx (boost) Pin
Mark F.18-Jul-06 16:21
Mark F.18-Jul-06 16:21 

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.