Dazu benutze ich LoadLibrary() und GetProcAddress().
Ich habe nun folgendes Problem...
Code:
#include <cstdlib>
#include <iostream>
#include <windows.h>
#include <stdio.h>
using namespace std;
typedef VOID (*MYPROC)(LPTSTR);
int main(int argc, char *argv[])
{
HINSTANCE hinstLib;
MYPROC ProcAdd;
BOOL fFreeResult, fRunTimeLinkSuccess = FALSE;
hinstLib = LoadLibrary("urlmon.dll");
if (hinstLib != NULL)
{
ProcAdd = (MYPROC) GetProcAddress(hinstLib, "URLDownloadToFile");
cout << "procAdd: " << (MYPROC)ProcAdd << endl;
fRunTimeLinkSuccess = (ProcAdd != NULL);
if (fRunTimeLinkSuccess)
(ProcAdd) ("message via DLL funtion\n");
fFreeResult = FreeLibrary(hinstLib);
}
cin.get();
return EXIT_SUCCESS;
}
), bzw. kann nicht geladen werden. Ich bin mir zu ziemlich sicher, dass die Funktion URLDownloadToFile in der urlmon.dll vorhanden ist, aber ich habe einfach keine Ahnung, warum genau sie nicht geladen werden kann.Hat jemand eine Idee, was genau ich falsch gemacht habe? (Außer die Wahl des Betriebssystems)
Greets,
Pat






