- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've created a Fortran dll (via CVF) to use with Excel. The Fortran subroutine name is HSMR4_MEM12(), and I make it available via:
!DEC$ ATTRIBUTES DLLEXPORT :: HSMR4_MEM12
I find that the name HSMR4b_MEM12() (one more character)does NOT work, nor does HSMR4bMEM12() (same number of characters). Any idea why? Limitations on the length of:
- CVF subroutine name?
- VBA subroutine name?
- subroutine name within Excel VB?
Not a big deal, but I wasted an amazing amount of time tracking this one down!
Thanks,
Tom Kreutz
!DEC$ ATTRIBUTES DLLEXPORT :: HSMR4_MEM12
I find that the name HSMR4b_MEM12() (one more character)does NOT work, nor does HSMR4bMEM12() (same number of characters). Any idea why? Limitations on the length of:
- CVF subroutine name?
- VBA subroutine name?
- subroutine name within Excel VB?
Not a big deal, but I wasted an amazing amount of time tracking this one down!
Thanks,
Tom Kreutz
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No small length limitations that I know of (could be around 32 characters for some uses, but you're nowhere near). The problem lies elsewhere. Why did you attribute the problem to name length? What does dumpbin /exports yourdll.dll give?
Jugoslav
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I must be missing something obvious here. Why does your second paragraph contain the extra letter b in the name?
Both Fortran and Excel VBA have alias statements that will allow you to adjust the recognized name of the DLL.
Mike
Both Fortran and Excel VBA have alias statements that will allow you to adjust the recognized name of the DLL.
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Jugoslav and Mike,
Thanks for your help. DUMPBIN.EXE reveals that when I used a lower case "b" in the subroutine name, the DLL's internals revealed it as an upper case "B" in the name. Apparently, Excel VB is sensitive to case, for when I changed the declaration in my Excel macro to an upper case "B", it worked perfectly.
(Mike, I was trying to add the "b" - unsuccessfully - into name HSMR_MEM12 in order to distinguish it from its predecessor dll.)
So, what I thought was some sort of character limitation issue was simply a case mismatch, presumably induced by Fortran's case insensitivity (or conversion to upper case, in this case).
Thanks very much.
Tom
Thanks for your help. DUMPBIN.EXE reveals that when I used a lower case "b" in the subroutine name, the DLL's internals revealed it as an upper case "B" in the name. Apparently, Excel VB is sensitive to case, for when I changed the declaration in my Excel macro to an upper case "B", it worked perfectly.
(Mike, I was trying to add the "b" - unsuccessfully - into name HSMR_MEM12 in order to distinguish it from its predecessor dll.)
So, what I thought was some sort of character limitation issue was simply a case mismatch, presumably induced by Fortran's case insensitivity (or conversion to upper case, in this case).
Thanks very much.
Tom

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