Hi,
I'm using PBCC 5.01.0100 on Windows XP.
I'm having difficulty in getting PBCC to use an ActiveXDLL that I created in Visual Basic 5.0.
The said DLL works fine from a VB program, and a Delphi program, so I know that the DLL is okay.
Here's the include file;
' Generated by: PowerBASIC COM Browser v.2.00.0070
' Date & Time : 7/28/2009 at 12:22 PM
' ------------------------------------------------
' Library Name: myjlc
' Library File: C:\Documents and Settings\jlc\My Documents\Data\Visual Basic\myjlc\myjlc.dll
' Description :
' GUID : {DDA871C3-7AEE-41E3-8C8C-D90E65180E1C}
' LCID : 0
' Version : 2.0
' Version Dependent ProgID's
$PROGID_myjlc_cMathcMath = "myjlc.cMath"
' Class Indentifiers
$CLSID_myjlc_cMath = GUID$("{ED22822B-A2B3-4B4B-9D26-21FCE57D318A}")
' Interface Indentifiers
$IID_myjlc_Int__cMath = GUID$("{597360D2-FB5E-4ED3-9452-158898F40676}")
' Interface Name : Int__cMath
' Class Name : cMath
' ClassID : $CLSID_myjlc_cMath
Interface Int__cMath $IID_myjlc_Int__cMath
Inherit IDispatch
Method PricePerPound <1610809344> (ByRef In PricePerKg As Currency) As Currency
Method test <1610809345> ()
Method IsPrime <1610809346> (Byval number As Currency) As Integer
End Interface
Here's the PBTEST.BAS program,
#COMPILE EXE
#INCLUDE "myjlc.inc"
FUNCTION PBMAIN () AS LONG
DIM rc AS CURRENCY
DIM jlcutils AS Int__cMath
LET jlcutils = GETCOM "$CLSID_myjlc_cMath"
IF ISOBJECT(jlcutils) AND ISFALSE ERR THEN
PRINT "Success!"
rc = jlcutils.PricePerPound(4.54)
ELSE
PRINT "Error"
END IF
END FUNCTION
I have read "The Life and Times of an Object" at http://www.powerbasic.com/support/pb...ad.php?t=39898 but I must be missing something very simple.
Constructive assistance would be appreciated.
Thanks from Joe
I'm using PBCC 5.01.0100 on Windows XP.
I'm having difficulty in getting PBCC to use an ActiveXDLL that I created in Visual Basic 5.0.
The said DLL works fine from a VB program, and a Delphi program, so I know that the DLL is okay.
Here's the include file;
' Generated by: PowerBASIC COM Browser v.2.00.0070
' Date & Time : 7/28/2009 at 12:22 PM
' ------------------------------------------------
' Library Name: myjlc
' Library File: C:\Documents and Settings\jlc\My Documents\Data\Visual Basic\myjlc\myjlc.dll
' Description :
' GUID : {DDA871C3-7AEE-41E3-8C8C-D90E65180E1C}
' LCID : 0
' Version : 2.0
' Version Dependent ProgID's
$PROGID_myjlc_cMathcMath = "myjlc.cMath"
' Class Indentifiers
$CLSID_myjlc_cMath = GUID$("{ED22822B-A2B3-4B4B-9D26-21FCE57D318A}")
' Interface Indentifiers
$IID_myjlc_Int__cMath = GUID$("{597360D2-FB5E-4ED3-9452-158898F40676}")
' Interface Name : Int__cMath
' Class Name : cMath
' ClassID : $CLSID_myjlc_cMath
Interface Int__cMath $IID_myjlc_Int__cMath
Inherit IDispatch
Method PricePerPound <1610809344> (ByRef In PricePerKg As Currency) As Currency
Method test <1610809345> ()
Method IsPrime <1610809346> (Byval number As Currency) As Integer
End Interface
Here's the PBTEST.BAS program,
#COMPILE EXE
#INCLUDE "myjlc.inc"
FUNCTION PBMAIN () AS LONG
DIM rc AS CURRENCY
DIM jlcutils AS Int__cMath
LET jlcutils = GETCOM "$CLSID_myjlc_cMath"
IF ISOBJECT(jlcutils) AND ISFALSE ERR THEN
PRINT "Success!"
rc = jlcutils.PricePerPound(4.54)
ELSE
PRINT "Error"
END IF
END FUNCTION
I have read "The Life and Times of an Object" at http://www.powerbasic.com/support/pb...ad.php?t=39898 but I must be missing something very simple.
Constructive assistance would be appreciated.
Thanks from Joe
Comment