I need your help.
I have the following c Code as a dll ( cant recompile or change it ) :
typedef struct {
/* The name of the test */
char *name;
/* The SHORT name of the test (its call name) */
char *sname;
/* pointer to a test description */
char *description;
/* Standard test default */
unsigned int psamples_std;
/* Standard test default */
unsigned int tsamples_std;
/* Number of independent statistics generated per run */
unsigned int nkps;
/* A pointer to the test itself (must be filled at initialization) */
int (*test)();
/* void pointer to a vector of additional test arguments */
void *targs;
} Dtest;
This struct is used inside the dll in an array as you can see here:
Dtest *dh_test_types[1000];
After a lot of research I found a way to get "simple type" varibales out of the DLL via:
IntPtr hdl;
hdl = LoadLibrary("cygdieharder-3.dll");
IntPtr addr = GetProcAddress(hdl, "dh_test_types");
And for simple types i used
int value = Marshal.ReadInt32(addr);
But I cant get any Information about the array of "Dtest" structures inside the URL because there is nothing like Marshal.readDtest(addr)
It would be great if someone could help me.
Thanking you in anticipation