|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Marko Brakus (marko_b
USA.NET)Date: Sun Apr 29 2001 - 07:52:42 CDT
Why isn't CoCreateInstance working? CoInitialize returns S_OK but
CoCreateInstance returns something different from S_OK and from any of
other three, in MSDN, documented return values.
...
HRESULT hres;
IShellLink* psl;
CoInitialize(NULL);
hres = CoCreateInstance(CLSID_ShellLink, NULL,
CLSCTX_INPROC_SERVER, IID_IShellLink, (LPVOID *) psl);
if (SUCCEEDED(hres))
MessageBox("OK!");
else
MessageBox("ERROR!");
CoUninitialize();
...
Any ideas?
Thanks
----------------------------------------------------------------
Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
contains important info. Save time, search the archives at
http://discuss.microsoft.com/archives/index.html .
To unsubscribe, mailto:DCOM-signoff-request
DISCUSS.MICROSOFT.COM
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]