Skip to content

Commit 8caf6e8

Browse files
author
Colin Robertson
committed
Clarification
1 parent aee359e commit 8caf6e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/build/importing-function-calls-using-declspec-dllimport.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ call DWORD PTR __imp_func1
6262

6363
There's no thunk and no `jmp` instruction, so the code is smaller and faster. You can also get the same effect without **`__declspec(dllimport)`** by using whole program optimization. For more information, see [/GL (Whole Program Optimization)](reference/gl-whole-program-optimization.md).
6464

65-
For function calls within a DLL, you don't want to have to use an indirect call. You already know the function's address. It takes extra time and space to load and store the address of the function before an indirect call. A direct call is always faster and smaller. You only want to use **`__declspec(dllimport)`** when calling DLL functions from outside the DLL itself. Don't use **`__declspec(dllimport)`** on functions inside a DLL when building that DLL.
65+
For function calls within a DLL, you don't want to have to use an indirect call. The linker already knows the function's address. It takes extra time and space to load and store the address of the function before an indirect call. A direct call is always faster and smaller. You only want to use **`__declspec(dllimport)`** when calling DLL functions from outside the DLL itself. Don't use **`__declspec(dllimport)`** on functions inside a DLL when building that DLL.
6666

6767
## See also
6868

0 commit comments

Comments
 (0)