I am writing the code already, but I have an issue.

I am trying to import the library "rasapi32.dll" to get the RAS functions (RasDial, and some other functions) and use GetProAddress to get the functions. The library is successfully loaded, but it just can't find those functions.

I have browsed through some websites and it talks about "Linking with rasapi32.LIB". What does that mean? Do I have to write the code "importLibrary("rasapi32.dll") instead? Or is there a code I have to add on to so that the functions can be found?

Here is my code:

typedef DWORD (*fptr1)(LPRASDIALEXTENSIONS, LPCTSTR, LPRASDIALPARAMS, DWORD, LPVOID, LPHRASCONN);
fptr1 RasDial;

HINSTANCE hinstLib = LoadLibrary("C:\\WINDOWS\\system32\\rasapi32.DLL") ;
RasDial = (fptr1)GetProcAddress(hinstLib, "RasDial");
if (RasDial == NULL) {
printf("ERROR: unable to find the function RasDial.\n");
FreeLibrary(hinstLib);
return ERR;
}

Thanks for your great help!

Ryan