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...
Type: Posts; User: rockpaandi
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...
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>...
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....
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
...
Oh! Never mind.. I missed removing the '&' . I had imagined you wanted me to add these.
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...
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.
...