- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I created a little c# project which references a dotnet dll. After referencing this dll I can browse the classes defined in that dll in my c# project. Now I want to use this dll and its classes in a FORTRAN project, but the Module Wizzart fails because tlbexp.exe creates an empty (only 2KBytes) tlb file. regasm /tlb:filename (which can be used if tlbexp.exe isn't available) says that there are no types to register. I think it's because the dll does not contain any COM components and tlbexp/regasm only exports COM components. How can I call such a dotnet dll from FORTRAN?
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I guess the only way is to create new COM-Visible "wrapper" for that third party dll.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - rwg
I created a little c# project which references a dotnet dll. After referencing this dll I can browse the classes defined in that dll in my c# project. Now I want to use this dll and its classes in a FORTRAN project, but the Module Wizzart fails because tlbexp.exe creates an empty (only 2KBytes) tlb file. regasm /tlb:filename (which can be used if tlbexp.exe isn't available) says that there are no types to register. I think it's because the dll does not contain any COM components and tlbexp/regasm only exports COM components. How can I call such a dotnet dll from FORTRAN?
Your dotnet dll should have [assembly: ComVisible(true)] attribute. Please look at this link: http://support.microsoft.com/kb/828736 It describes how to make assembly to call it from native C++
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your help. But this solution requires that I can change the dotnet dll. In my case it's a third party dll so I can not change the dotnet dll. The solution also requires to register the dll which is not desired. Is there an other solution where both requirements are not necessary?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I guess the only way is to create new COM-Visible "wrapper" for that third party dll.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page