On Jul 30, 10:32 am, dirvine <[email protected]> wrote:
> Hi all
>
> I hope you can help.
>
> I am attempting to use messagequeues to store some data and later get
> parts of the data. I thought these would be perfect (some of them are
> defaults in transformations like hash etc.). If I try to do something
> like
>
>       size_t qlength =
> main_encrypt_queue_.TotalBytesRetrievable();     // 40 in my test
>       byte *i;
>       main_encrypt_queue_.Peek(i, qlength);// Get(i); // segfault with
> either get or peek
>
> I am sure I am doing something wrong. I am also using these like
> buffers really and not actual messagequeues (i.e. I am not trying to
> receive messages at a time but bytes) as the notion of messages does
> not fit the piece of code I am attempting.
Try either:
    byte *i;
    main_encrypt_queue_.Peek(i);

Or
    byte *i;
    main_encrypt_queue_.Peek(&i, sizeof(i));

See http://www.cryptopp.com/docs/ref/class_message_queue.html.

Jeff

Jeff

-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.

Reply via email to