- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi! i am compiling this DLL that has several different subroutines in separate files. some subroutines make use of the others in the same DLL, and i want to make every subroutine available for calling in the DLL. so it was like this...:
subroutine A (a1, a2)
!DEC$ ATTRIBUTES DLLEXPORT :: A
!DEC$ ATTRIBUTES ALIAS:'A' :: A
B (a1,a2)
return
end
subroutine B (b1,b2)
!DEC$ ATTRIBUTES DLLEXPORT :: B
!DEC$ ATTRIBUTES ALIAS:'B' :: B
b1 = b1 + b2
return
end
but when i compile this, it will give me an error that in A it cannot find external symbol B. if i delete the DLLEXPORT statements in B, it works fine, however, B will not be callable in VB... which i want it to be callable too...
any help please?
subroutine A (a1, a2)
!DEC$ ATTRIBUTES DLLEXPORT :: A
!DEC$ ATTRIBUTES ALIAS:'A' :: A
B (a1,a2)
return
end
subroutine B (b1,b2)
!DEC$ ATTRIBUTES DLLEXPORT :: B
!DEC$ ATTRIBUTES ALIAS:'B' :: B
b1 = b1 + b2
return
end
but when i compile this, it will give me an error that in A it cannot find external symbol B. if i delete the DLLEXPORT statements in B, it works fine, however, B will not be callable in VB... which i want it to be callable too...
any help please?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need to reference an interface block defining the B interface within the A routine.
interface
subroutine B (b1,b2)
!DEC$ ATTRIBUTES DLLEXPORT :: B
!DEC$ ATTRIBUTES ALIAS:'B' :: B
... and formal parameter declarations ...
end subroutine B
end interface
James
interface
subroutine B (b1,b2)
!DEC$ ATTRIBUTES DLLEXPORT :: B
!DEC$ ATTRIBUTES ALIAS:'B' :: B
... and formal parameter declarations ...
end subroutine B
end interface
James

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