Click here to Skip to main content
16,010,334 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: video into C++/MFC Pin
Christian Graus1-Oct-01 10:47
protectorChristian Graus1-Oct-01 10:47 
GeneralRe: video into C++/MFC Pin
2-Nov-01 2:56
suss2-Nov-01 2:56 
GeneralRandom numbers Pin
1-Oct-01 9:23
suss1-Oct-01 9:23 
GeneralRe: Random numbers Pin
Mike Nordell1-Oct-01 9:38
Mike Nordell1-Oct-01 9:38 
GeneralRe: Random numbers Pin
1-Oct-01 9:59
suss1-Oct-01 9:59 
GeneralI ve run out of ideas Pin
1-Oct-01 9:12
suss1-Oct-01 9:12 
GeneralRe: I ve run out of ideas Pin
Mike Nordell1-Oct-01 9:46
Mike Nordell1-Oct-01 9:46 
GeneralRe: I ve run out of ideas Pin
Joaquín M López Muñoz1-Oct-01 9:51
Joaquín M López Muñoz1-Oct-01 9:51 
At first sight there's nothing wrong with your code, objectionable as it is. You might want to check if you reserve space enough at pBuffer to copy past the boundary of 59 KB. Why don't you try something like
int main(void)
{
  BYTE pDataToCopy [128*1024], pBuffer[128*1024]; //128 KB each
  DWORD dwLengthOfBuffer=0;
  DWORD dwSizeOfData=sizeof(pDataToCopy);

  CMiscFunctions::CopyValueToBuffer(
    pDataToCopy,pBuffer,
    &dwLengthOfBuffer,dwSizeOfData);
  
  return 0;
}
and see what happens?
Also, I suggest you take a look at standard functions for memory copying like memcpy and memmove which will outperform your handmade loop and take the pains of doing the job for you.

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
GeneralRe: I ve run out of ideas Pin
1-Oct-01 12:54
suss1-Oct-01 12:54 
GeneralSMTP Commands (Read Receipts) Pin
Bret Faller1-Oct-01 9:03
Bret Faller1-Oct-01 9:03 
GeneralRe: SMTP Commands (Read Receipts) Pin
Mike Nordell1-Oct-01 9:49
Mike Nordell1-Oct-01 9:49 
GeneralRe: SMTP Commands (Read Receipts) Pin
Bret Faller2-Oct-01 13:11
Bret Faller2-Oct-01 13:11 
GeneralA question about thread programming Pin
Chaos Lawful1-Oct-01 8:17
Chaos Lawful1-Oct-01 8:17 
GeneralRe: A question about thread programming Pin
Joaquín M López Muñoz1-Oct-01 8:26
Joaquín M López Muñoz1-Oct-01 8:26 
GeneralBitmap question Pin
#realJSOP1-Oct-01 8:13
professional#realJSOP1-Oct-01 8:13 
GeneralRe: Bitmap question Pin
Mike Nordell1-Oct-01 9:52
Mike Nordell1-Oct-01 9:52 
GeneralRe: Bitmap question Pin
Paolo Messina1-Oct-01 12:33
professionalPaolo Messina1-Oct-01 12:33 
Generalcreating COM objects in Visual C++ to work in vbscript Pin
David Higgins1-Oct-01 7:39
David Higgins1-Oct-01 7:39 
GeneralRe: creating COM objects in Visual C++ to work in vbscript Pin
Andres Manggini1-Oct-01 8:09
Andres Manggini1-Oct-01 8:09 
GeneralDebugging ISAPI Tools Pin
CHERCHALI KARIM1-Oct-01 7:03
CHERCHALI KARIM1-Oct-01 7:03 
GeneralSimple !?! How to wait for OK Pin
Josh Knox1-Oct-01 6:55
Josh Knox1-Oct-01 6:55 
GeneralRe: Simple !?! How to wait for OK Pin
Stan Shannon1-Oct-01 7:09
Stan Shannon1-Oct-01 7:09 
GeneralRe: Simple !?! How to wait for OK Pin
Josh Knox1-Oct-01 8:09
Josh Knox1-Oct-01 8:09 
GeneralRe: Simple !?! How to wait for OK Pin
Stan Shannon1-Oct-01 8:19
Stan Shannon1-Oct-01 8:19 
GeneralRe: Simple !?! How to wait for OK Pin
Tomasz Sowinski1-Oct-01 7:16
Tomasz Sowinski1-Oct-01 7:16 

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.