D
drmy
Unregistered / Unconfirmed
GUEST, unregistred user!
我用C++Builder6做了一个COM+程序,安装到了COM+环境中。COM+中定义了几个函数,参数有in和in&out类型,我现在想做一个SOAP server程序调用这些函数,用了CreateOleObject等函数,也考虑到了函数参数等问题:
Variant vDODemo;
OleVariant sData;
CoInitialize(NULL);
// OleInitialize(NULL);
try
{
vDODemo = CreateOleObject("TDM1.TDM1");
vDODemlePropertySet("SQL",sSQL);
vDODemlePropertySet("Data",AnsiString(sData));
vDODemleFunction("QueryHjData");
/// Function QueryHjData("QueryHjData");
/// QueryHjData << NamedParm("SQL",sSQL) << NamedParm("Data",AnsiString(sData));
/// vDODemo.Exec(QueryHjData);
// vDODemo.QueryHjData(sSQL, sData);
// return sData;
}
__finally
{
CoUninitialize();
//OleUninitialize();
}
编译通过,但是连接时报错,怎么回事?
Variant vDODemo;
OleVariant sData;
CoInitialize(NULL);
// OleInitialize(NULL);
try
{
vDODemo = CreateOleObject("TDM1.TDM1");
vDODemlePropertySet("SQL",sSQL);
vDODemlePropertySet("Data",AnsiString(sData));
vDODemleFunction("QueryHjData");
/// Function QueryHjData("QueryHjData");
/// QueryHjData << NamedParm("SQL",sSQL) << NamedParm("Data",AnsiString(sData));
/// vDODemo.Exec(QueryHjData);
// vDODemo.QueryHjData(sSQL, sData);
// return sData;
}
__finally
{
CoUninitialize();
//OleUninitialize();
}
编译通过,但是连接时报错,怎么回事?