CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    CByteArray - way to quick load?

    I'm running into major delays copying blocks of binary data into CByteArray manually. Wouldn't it seem logical to provide a way to fastload a cba, to wit:

    CByteArray cba;
    cba.SetSize(8192);
    memcpy(cba.GetBuffer(0), (LPBYTE) p, cba.GetSize());

    Does some facility like this exist? Or am I just missing the incredibly obvious...

    Thx, Dave Minor
    mailto[email protected]




  2. #2
    Guest

    Re: CByteArray - way to quick load?

    Can't you just alter your memcpy to point to the first element?

    memcpy(&cba.ElementAt(0),(LPBYTE) p, cba.GetSize());


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured