Search:

Type: Posts; User: rockpaandi

Search: Search took 0.00 seconds.

  1. Replies
    5
    Views
    4,414

    Agreed. Even with a pointer to pointer...

    Agreed. Even with a pointer to pointer referencing this original code does not succeed.

    Do you have an example of a working code that proves this concept? Other than the solution posted in my...
  2. Replies
    5
    Views
    4,414

    Thanks Mats. However, passing the address as...

    Thanks Mats. However, passing the address as "&var1" did not work either. This is a version that actually works

    Solution:


    /* file: mock_test.c */
    #include <stdio.h>
    #include <stdlib.h>...
  3. Replies
    5
    Views
    4,414

    Changing a char pointer via DLL

    I would like to pass 2 char pointers to my DLL (input_buffer,output_buffer) and obtain the output in my API via the output buffer.

    Is this doable ? My working sample code below tells me otherwise....
  4. Changing value at pointer

    Do free or malloc operations on this address affect the original pointer. For instance:



    $ cat -n mock_DLL.c
    1 /* Mock DLL to modify a char array */
    2 #include <stdio.h>
    3
    ...
  5. Issue resolved.

    Oh! Never mind.. I missed removing the '&' . I had imagined you wanted me to add these.
  6. Thanks Brew. However, Even with these changes...

    Thanks Brew. However, Even with these changes below (in red): I am still getting different addresses!


    Output
    ---------
    $ ./mock_test
    Address of var1 : 0x402000
    Inside DLL: Address of var1...
  7. Pointer references corrupted via DLL (Cygwin)

    All, Here is a working sample code of my problem area with my DLL application. I am so close to finish, except that I am required to provide a string buffer back to the calling function.
    ...
Results 1 to 7 of 7