一个Type Library的问题!
我是个BCB新手,想用BCB做一个网站,书上有一个例子,其中有一部分是这样的,
2:点击菜单的View->Type Library,打开Type Library编辑器,并且在界面IServer1下新建一个method叫做QueryEmployee,另外加上三个参数,分别是INPUT1,INPUT2及ret,下面是此方法的程序内容
STDMETHODIMP TServer1Impl::QueryEmployee(BSTR INPUT1,BSTR INPUT2,BSTR* ret)
{WideString temp;
temp=INPUT2;
temp=temp+"%";
m_DataModule->qQueryEmployee->Close();
m_DataModule->qQueryEmployee->ParamByName("名字")->AsString=INPUT1;
m_DataModule->qQueryEmployee->Open();
m_DataModule->qtpQueryEmployee->MaxRows=m_DataModule->qQueryEmployee->RecordCount;
*ret =(WideString)(m_DataModule->qtpQueryEmployee->Content());
return S_OK;
}
我一直找不到写这个程序的地方,如果在那个TEXT的地方写,他又告诉出错。关键是找不到STDMETHODIMP TServer1Impl::QueryEmployee(BSTR INPUT1,BSTR INPUT2,BSTR* ret)这个头。
我到现在还弄不明白Type Library的真正用处.