- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hello,
Is it possible to DLLEXPORT an overloaded function from a DLL? If it is possible, how do I do it?
Thanks for any help,
Jon
Is it possible to DLLEXPORT an overloaded function from a DLL? If it is possible, how do I do it?
Thanks for any help,
Jon
コピーされたリンク
3 返答(返信)
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Yes - you don't DLLEXPORT the overloaded function itself, but rather each of the module procedures that implement the function for each signature.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Thanks, Steve. So, when I use the overloaded function name outside the DLL, Fortran knows which of the actual functions to use. Can I expect the same behavior if I call the overloaded function from a VB.NET application? Or will VB stall in this case?
Jon
Jon
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
When you USE the module in a Fortran program, the compiler knows about the individial specific procedures and their global names, so that's why you DLLEXPORT them.
If you are calling from a non-Fortran language, it has no concept of Fortran overloading - you have to tell it the exact exported name of the routine to call, which will be one of the specific procedures. You'll need to know how the compiler decorates that name unless you add an ALIAS attribute.
If you are calling from a non-Fortran language, it has no concept of Fortran overloading - you have to tell it the exact exported name of the routine to call, which will be one of the specific procedures. You'll need to know how the compiler decorates that name unless you add an ALIAS attribute.
