Funny you should mention the calling conventions. I'm getting LNK2019 error
when I tried to create the my C++ DLL and export it. Here is my export
statement:
#include "stdafx.h"
extern "C" DE_ERRORS __declspec(dllexport)DecodeAsnUser(Blob* pBlob,
CUserContextData *userData)
{
my code;
}
Here are my errors:
-------------------------------------------------------
Error 1 error LNK2019: unresolved external symbol "void __stdcall
_com_issue_error(long)" (?_com_issue_error@@YGXJ@Z) referenced in function
"public: class _bstr_t & __thiscall _bstr_t:
perator=(char const *)"
(??4_bstr_t@@QAEAAV0@PBD@Z) UnityDecodeAsnUser.obj
Error 2 error LNK2019: unresolved external symbol "wchar_t * __stdcall
_com_util::ConvertStringToBSTR(char const *)"
(?ConvertStringToBSTR@_com_util@@YGPA_WPBD@Z) referenced in function "public:
__thiscall _bstr_t:
ata_t:
ata_t(char const *)"
(??0Data_t@_bstr_t@@QAE@PBD@Z) UnityDecodeAsnUser.obj
Error 3 error LNK2019: unresolved external symbol "char * __stdcall
_com_util::ConvertBSTRToString(wchar_t *)"
(?ConvertBSTRToString@_com_util@@YGPADPA_W@Z) referenced in function "public:
char const * __thiscall _bstr_t:
ata_t::GetString(void)const "
(?GetString@Data_t@_bstr_t@@QBEPBDXZ) UnityDecodeAsnUser.obj
Error 4 fatal error LNK1120: 3 unresolved
externals C:\Projects\UnityDecodeAsnUser\Debug\UnityDecodeAsnUser.dll
How can I correct this Lnk error?