L
lsyx
Unregistered / Unconfirmed
GUEST, unregistred user!
我想使用接口IStockDriver2中的一个方法,但是却不知道怎么使用接口,这个接口的
定义如下:
IStockDriver2 = interface(IDispatch)
['{7EC46973-C25F-42E3-B22E-806D3FC5C20E}']
function Get_EnableNewFormat: Integer
safecall;
procedure Set_EnableNewFormat(pVal: Integer)
safecall
//这是我想调用的方法;
property EnableNewFormat: Integer read Get_EnableNewFormat write Set_EnableNewFormat;
end;
现在有VB的例子,但是我确不会改成delphi的;
在VB中是这么写的:
Dim OneHis As New StockHisData
Dim OneMin As New StockMinData
Dim OneStk As New StockReport
Dim StkReport2 As IStockReport2
Private Sub Form_Load()
Dim StkDrv2 As IStockDriver2
Set StkDrv2 = m_stkdrv.Object //这一句用delphi该怎么写???
(m_stkdrv 是 StockDriver对象);
StkDrv2.EnableNewFormat = True
Set StkDrv2 = Nothing
Set StkReport2 = OneStk
哪位大侠知道,请赐教!!多谢!
定义如下:
IStockDriver2 = interface(IDispatch)
['{7EC46973-C25F-42E3-B22E-806D3FC5C20E}']
function Get_EnableNewFormat: Integer
safecall;
procedure Set_EnableNewFormat(pVal: Integer)
safecall
//这是我想调用的方法;
property EnableNewFormat: Integer read Get_EnableNewFormat write Set_EnableNewFormat;
end;
现在有VB的例子,但是我确不会改成delphi的;
在VB中是这么写的:
Dim OneHis As New StockHisData
Dim OneMin As New StockMinData
Dim OneStk As New StockReport
Dim StkReport2 As IStockReport2
Private Sub Form_Load()
Dim StkDrv2 As IStockDriver2
Set StkDrv2 = m_stkdrv.Object //这一句用delphi该怎么写???
(m_stkdrv 是 StockDriver对象);
StkDrv2.EnableNewFormat = True
Set StkDrv2 = Nothing
Set StkReport2 = OneStk
哪位大侠知道,请赐教!!多谢!