...
#include <comutil.h>
...
struct _finddata_t c_file;
...
BSTR tFName = _com_util::ConvertStringToBSTR((const char*)c_file.name);
...
compiles OK, but gives the link error
BCiTool_DBS error LNK2019: unresolved external symbol "unsigned short *
__stdcall _com_util::ConvertStringToBSTR(char const *)"
(?ConvertStringToBSTR@_com_util@@YGPAGPBD@Z) referenced in function "public:
long __thiscall CBCiTool_DB::FinalConstruct(void)"
(?FinalConstruct@CBCiTool_DB@@QAEJXZ)
What I don't understand is why does the linker think BSTR tFName is an
unsigned short* ? Or should I use another function?
Thanks to anyone who can help.
David Bell
Does this apply?
http://support.microsoft.com/support/kb/articles/Q168/0/03.ASP
>
> What I don't understand is why does the linker think BSTR tFName is an
> unsigned short* ?
Platform SDK docs for BSTR gives the typedef as:
<quote>
typedef OLECHAR FAR* BSTR;
</quote>
OLECHAR is unsigned short, so...
> Or should I use another function?
>
> Thanks to anyone who can help.
>
Jay
Thanks
David Bell
#include <comutil.h>
but also needed
#pragma comment(lib, "comsupp.lib")
Hope this isn't out of date... this NG seems to have died on my server.
David Bell
"Jay Nabonne" <j...@rightagain.com> wrote in message
news:#0ySO3qTCHA.1632@tkmsftngp11...