external library and variable symbol

  • Thread starter Thread starter Lloyd Dupont
  • Start date Start date
L

Lloyd Dupont

let say I have a DLL where there is:
extern __declspec(dllexport) char* SomeImportantName;


let say I want to dynamically (no static linking) update this value...
is it right to do as below?

HMODULE h = LoadLibrary("myLibrary");
char** p_SomeImportantName = (char**) GetProcAddress("SomeImportantName");
*p_SomeImportantName = newValue;
 
I don't know if it workis in general.
but in my case it was a shared function pointer.
and I cannot set it :/
 
Lloyd, You should start posting to the more appropriate
microsoft.public.dotnet.languages.vc NG, your questions mostl if not all C++
related, you might find better answers there.

Willy.
 
Back
Top