I work for a company that makes heat exchangers and I have written a PowerBasic DLL that helps our customers to select the right exchanger.
Now a new customer want an ActiveX DLL instead of a PowerBasic DLL because he thinks he will have problems to call the DLL from C# (and he knows how to use ActiveX DLLs). I have promised him to try to find the right way to "declare" and call my DLL in C# (so I do not have to write an ActiveX DLL)
In PowerBasic the subs in the DLL look like this:
Code:
SUB Get_Calculation(B1 AS BYTE, B2 AS BYTE, HeatexIn AS DOUBLE, _ sHeatexType AS ASCIIZ, B3 AS BYTE, B4 AS BYTE, HeatexOut AS DOUBLE) EXPORT SUB Get_Price (B1 AS BYTE, B2 AS BYTE, PriceIn AS DOUBLE, _ sHeatexType AS ASCIIZ, B3 AS BYTE, B4 AS BYTE, PriceOut AS DOUBLE, sArtCode AS ASCIIZ) EXPORT
Code:
Declare Sub Get_Calculation Lib "HEATEX32.DLL" Alias "GET_CALCULATION" _ (b1 As Byte, b2 As Byte, heatexin As Double, ByVal X$, _ B3 As Byte, b4 As Byte, heatexout As Double) Declare Sub Get_Price Lib "HEATEX32.DLL" Alias "GET_PRICE" _ (b1 As Byte, b2 As Byte, pricein As Double, ByVal X$, _ B3 As Byte, b4 As Byte, priceout As Double, ByVal Y$)
Best Regards
Krister Olsson
------------------
Comment