Search:

Type: Posts; User: securelinprog

Search: Search took 0.01 seconds.

  1. Replies
    12
    Views
    3,788

    Thank you _Mike. I understood well.

    Thank you _Mike. I understood well.
  2. Replies
    12
    Views
    3,788

    Thank you _Mike. Which parameter determine...

    Thank you _Mike.

    Which parameter determine dsize was 4 or 0? Does size of msg->data and buf->data is effective?

    Thank you very much.
  3. Replies
    12
    Views
    3,788

    Ok, right. I understand why using msg->dsize...

    Ok, right.

    I understand why using msg->dsize in the memcpy function.

    By using it, can copy all buf structure to msg->data and msg->dsize simultaneously.

    Thanks to all specially sganesh.
  4. Replies
    12
    Views
    3,788

    you don't ask answer of my question. I ask why...

    you don't ask answer of my question. I ask why using msg->dsize in first parameter of memcpy?

    your written code only copy all one structure to another one.
    however, i thank you for it.
  5. Replies
    12
    Views
    3,788

    Thank you. if change size of msg->data from...

    Thank you.

    if change size of msg->data from 100 to 2 and then try to copy buffer to msg, msg->dsize will be
    invalid. I don't know what msg->dsize will has, I only know it will be invalid.

    If...
  6. Replies
    12
    Views
    3,788

    memcpy(msg->data+msg->dsize, ..)

    memcpy function is used for copy to dst from src with size:

    memcpy(dst, src, size)

    If msg structure was defined as follow:

    struct msg{
    char data[100];
    int dsize;
    }
Results 1 to 6 of 6