Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

Importing and Exporting Inline Functions

Visual Studio 6.0

http://msdn.microsoft.com/en-us/library/aa240996(v=vs.60).aspxOverviewHow Do IFAQDetailsSample

Imported functions can be defined as inline. The effect is roughly the same as defining a standard function inline; calls to the function are expanded into inline code, much like a macro. This is principally useful as a way of supporting C++ classes in a DLL that may inline some of their member functions for efficiency.

One feature of an imported inline function is that in C++, you can take its address. The compiler returns the address of the copy of the inline function residing in the DLL. Another feature of imported inline functions is that unlike global imported data, you can initialize static local data of the imported function.

Caution   You should exercise care when providing imported inline functions because they can create the possibility of version conflicts. An inline function gets expanded into the application code; therefore, if you later rewrite the function, it does not get updated unless the application itself is recompiled. (Normally, DLL functions can be updated without rebuilding the applications that use them.)

What do you want to do?

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.