This is not about if it is possible or not, this is about the concept and perhaps, terminology.
Your formulation of the problem is misleading, that's why people commented your Question like this.
In fact, I think you can do what you want. I don't need external declaration.
Pay attention: external declaration is itself not a definition but only a declaration. It says: this is a function prototype (without the "function body") used to give a syntax for a call, and the definition will be found elsewhere. Yes, you don't really need it. You can use only a function type.
When you already loaded the DLL you need to do
GetProcAddress
http://msdn.microsoft.com/en-us/library/ms683212(v=vs.85).aspx[
^].
So you have the code, why not calling it? You need just some syntax for call. Here you need a function type. Usually, with C++ you use a lib file and *.h file, but you can do without it. A function type is enough.
For example, this is an example of function type from the code sample of "GetProcAddress Function" MSDN help page
http://msdn.microsoft.com/en-us/library/ms683212(v=vs.85).aspx[
^]:
typedef void (WINAPI *PGNSI)(LPSYSTEM_INFO);
Now, look at the full code sample (see reference above). All you need is to declare a pointer to
PGNSI
(see
pGNSI
) to obtain the value of this pointer though a type cast from the result of the call to
GetProcAddress
. When you get non-null result, your are done. Now you can call
pGNSI
.
I hope it's clear now.
—SA