S
simonlyr
Unregistered / Unconfirmed
GUEST, unregistred user!
我有一个VC++编写的XnSynchGpsCar.dll,在VC++中调用函数如下:
VC++中使用例子:
{
CoInitialize(NULL);
CComPtr<ISynchData> synch;
HRESULT hr = CoCreateInstance(CLSID_SynchData, NULL, CLSCTX_INPROC_SERVER ,IID_ISynchData, (void**)&synch);
if (FAILED(hr))
{
Return false;
}
//设置一条实时记录的字段内容
//CID,LON,LAT,SPEED,ANGLE,GPSTIME
synch->SetOneLiveInfoField("CID", "12"
synch->SetOneLiveInfoField("LON", "121.3434"
synch->SetOneLiveInfoField("LAT", "30.13423"
synch->SetOneLiveInfoField("SPEED", "23"
……
//完成一条完整记录字段内容设置,添加记录
synch->AddOneLiveInfoRecord();
//以上代码可为循环设置记录并添加,
//设置完记录后发送数据
synch->SendData(1);
}
其中dll里定义了许多函数:如
HRESULT SetOneLiveInfoField([in] BSTR bstrFieldName, [in] BSTR bstrFieldContent)
我想用Delphi6编写程序调用dll里的函数,怎么调用编写???急!!!
VC++中使用例子:
{
CoInitialize(NULL);
CComPtr<ISynchData> synch;
HRESULT hr = CoCreateInstance(CLSID_SynchData, NULL, CLSCTX_INPROC_SERVER ,IID_ISynchData, (void**)&synch);
if (FAILED(hr))
{
Return false;
}
//设置一条实时记录的字段内容
//CID,LON,LAT,SPEED,ANGLE,GPSTIME
synch->SetOneLiveInfoField("CID", "12"
synch->SetOneLiveInfoField("LON", "121.3434"
synch->SetOneLiveInfoField("LAT", "30.13423"
synch->SetOneLiveInfoField("SPEED", "23"
……
//完成一条完整记录字段内容设置,添加记录
synch->AddOneLiveInfoRecord();
//以上代码可为循环设置记录并添加,
//设置完记录后发送数据
synch->SendData(1);
}
其中dll里定义了许多函数:如
HRESULT SetOneLiveInfoField([in] BSTR bstrFieldName, [in] BSTR bstrFieldContent)
我想用Delphi6编写程序调用dll里的函数,怎么调用编写???急!!!