I'm just trying to understand the external functions of C.
To my knowledge, extern C is always a function that you are trying to call from an application that has already been compiled. Either an executable, static, or dynamic library.
extern "C" { HRESULT CreateDevice(); typedef HRESULT (*CREATEDEVICE)(); HRESULT ReleaseDevice(); typedef HRESULT (*RELEASEDEVICE)(); }
So my question is ...
Do I understand correctly?
Should it always be a C function pointer?
Why should you use typedef for every function?
I assume when you use GetProcAddress (). You are allocating memory for HEAP applications, not the one from which you are calling it. So you also have to free it from this heap?
c ++ c visual-studio-2008 visual-c ++ visual-studio
numerical25
source share