When programming with COM interface, maybe occure a LNK2001 error.
Following code makes a LNK2001 error
HRESULT hr = CoCreateInstance(CLSID_XXXXX, 0, CLSCTX_ALL, IID_XXXXX, (void**)lpVoid);
An CLSID_XXXXX defined as below.(Pressing F12)
DEFINE_GUID(..., ....)
Compiler makes an error , because compiler does not know where defined DEFINE_GUID is.
So to solve this error, you should include initguid.h header file.
#include <InitGuid.h>
Monday, December 8, 2008
error LNK2001: _CLSID_????
작성자: scor7910 시간 11:17 AM
레이블: LNK2001 error
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment