#import not resolving correctly
Hi there,
I am importing a type library via a #import statement. All of the
interfaces appear correctly under it's own name space that I can view in
intellisense.
I then create an instance of one of the classes and aquire it's
interface. This succeeds, but when I attempt to use the interface by
calling one of the methods I get an "Unresolved external symbol" LNK2001
error on that line.
I thought that #import would give enough information to be able to
correctly resolve an external dependency? The file is a DLL and is located
within the Windows\System32 folder.
How would I resolve this symbol?
....
#import "c:\windows\system32\cdintf251.dll" named_guids
rename("CreateDC","CreateDC1")
rename("SetDefaultPrinter","SetDefaultPrinter1")
....
::CDIntfEx::ICDIntfEx* pPDFPrinter;
if(S_OK==CoCreateInstance(::CDIntfEx::CLSID_CDIntfEx, NULL, CLSCTX_ALL,
__uuidof(pPDFPrinter), (void **)&pPDFPrinter))
{
BSTR pBStName = iName.AllocSysString();
pPDFPrinter->PDFDriverInit(pBStName); << Unresolved
external symbol.
SysFreeString(pBStName);
}
....
TIA.
Nick.