Quantcast
Channel: CodeGuru Forums - Visual C++ Programming
Viewing all articles
Browse latest Browse all 3027

Unable to pass arguments to DLL function

$
0
0
Hi, Folks,

I have some trouble with DLL.

I created a dll with function

double square(const double * args)

and then in my application defines

typedef double (*MyFunct)(const double *args);

I use LoadLibrary and GetProcAddress to get the function address and cast it to MyFunct. Everything works fine except that when I pass a double *, for example 0x08800350, to the DLL function, the argument becomes totally something else, for example, 0x0aa00460.

I have no clue what happens to the argument value. Could someone please help me out?

Thank you so much!

CR

Viewing all articles
Browse latest Browse all 3027

Latest Images

Trending Articles



Latest Images