Voldemort
Feb 1st, 2002, 06:43 PM
I have created a DLL that I want to use to work data in an array of types. All of the types (there are several ) are singles and there are no sub arrays.
When I make the dll, XP automatically registers the dll - ta very much Bill. I can check this out using the OLEViewer. It all looks OK.
The array is defined as a SAFEARRAY and the type is visible and correct.
I can run the dll by attaching it as a reference to my calling project and get at my subroutine (its a SUB call not a FUNCTION by the way) by using the structure ...
dllname.sub array(),t,p
Where t and p are a couple of extra singles that I pass into the dll.
When I try and access the dll using a declare statement calling the sub directly in my program I get the message
Run-Time error '453'
Can't find entry point FilterTheCPs in CP_Filter
FilterTheCPs is my subroutine name
CP_Filter is my dll name
Spelling and type structures all look OK and my declare statement is..
Public Declare Sub FilterTheCPs Lib "CP_Filter" (ByRef CPInfo() As CardinalPoint2, ByVal NoOfTemps2 As Single, ByVal NoOfPowers2 As Single)
CardinalPoint2 refers to an identical type structure (defined in my calling program) as that used in the dll.
Where am I going wrong? Can anybody help me out on this one?
-----------------------------
Trouble at the mill
When I make the dll, XP automatically registers the dll - ta very much Bill. I can check this out using the OLEViewer. It all looks OK.
The array is defined as a SAFEARRAY and the type is visible and correct.
I can run the dll by attaching it as a reference to my calling project and get at my subroutine (its a SUB call not a FUNCTION by the way) by using the structure ...
dllname.sub array(),t,p
Where t and p are a couple of extra singles that I pass into the dll.
When I try and access the dll using a declare statement calling the sub directly in my program I get the message
Run-Time error '453'
Can't find entry point FilterTheCPs in CP_Filter
FilterTheCPs is my subroutine name
CP_Filter is my dll name
Spelling and type structures all look OK and my declare statement is..
Public Declare Sub FilterTheCPs Lib "CP_Filter" (ByRef CPInfo() As CardinalPoint2, ByVal NoOfTemps2 As Single, ByVal NoOfPowers2 As Single)
CardinalPoint2 refers to an identical type structure (defined in my calling program) as that used in the dll.
Where am I going wrong? Can anybody help me out on this one?
-----------------------------
Trouble at the mill