能不能确定具体是那个参数错了? 调用 CoCreateInstanceEx ( )访问服务器上的com+组件 时返回 E_INVALIDARG?
CoInitialize(NULL);
// Initialize the server information.
pSInfo.pwszName = L"\\192.168.1.56";
pSInfo.pAuthInfo = NULL;
// Initialize the result structure.
mqi.pIID = &IID_IOrderModify;
mqi.pItf = NULL;
mqi.hr = 0;
// Create an instance of the object.
hr = CoCreateInstanceEx(CLSID_OrderModify,
NULL,
CLSCTX_ALL,
&pSInfo,
1,
&mqi);
// If the creation failed, exit.
if (FAILED(hr))
{
if (hr == E_INVALIDARG)
AfxMessageBox("One or more of the arguments were invalid.");
}
我想知道是那个变量错了
我是在一台电脑上运行该程序的,192.168.1.56 是我的局域网的 IP
随便问一下,服务器名怎样查阿,我得电脑在局域网上看是叫 john 那么
服务器名也是叫 JOHN 吗
去不区分大小写呀? 我在msdn上没有查到这方面的资料