SteveBrett
Programmer
Bit of a newbie to com but I have the following questions.
I have the following function:
std::string ExtractSOAPAction(const char* pBuffer)
{
char szSOAPAction[255];
memset(szSOAPAction, 0, 255);
//////////////////////////////////////////////////////////
// Extract SOAP Action from message.
const char* pStartPos = NULL;
const char* pEndPos = NULL;
int iSOAPActionLength = 0;
// Get start position of actual data
pStartPos = pBuffer;
pStartPos = strstr(pStartPos, "<action");
pStartPos = strstr(pStartPos, ">");
pStartPos = strstr(pStartPos, "urn");
// Get end position of actual data
pEndPos = strpbrk(pStartPos, "\r\n<" );
iSOAPActionLength = pEndPos - pStartPos;
strncpy(szSOAPAction, pStartPos, iSOAPActionLength);
return szSOAPAction;
}
which sits in an atl com project.
it is referenced thus:
std::string objSOAPAction = CSSLConnection::ExtractSOAPAction(m_objMessage);
when i try to build the code i get the following error:
CallCreditSSL error LNK2019: unresolved external symbol "private: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall CSSLConnection::ExtractSOAPAction(char const *)" (?ExtractSOAPAction@CSSLConnection@@AAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PBD@Z) referenced in function "public: virtual long __stdcall CSSLConnection::SendMsg(unsigned short *,long *)" (?SendMsg@CSSLConnection@@UAGJPAGPAJ@Z)
Any ideas ? 5 hours on google has got me nowhere ;-(
I have the following function:
std::string ExtractSOAPAction(const char* pBuffer)
{
char szSOAPAction[255];
memset(szSOAPAction, 0, 255);
//////////////////////////////////////////////////////////
// Extract SOAP Action from message.
const char* pStartPos = NULL;
const char* pEndPos = NULL;
int iSOAPActionLength = 0;
// Get start position of actual data
pStartPos = pBuffer;
pStartPos = strstr(pStartPos, "<action");
pStartPos = strstr(pStartPos, ">");
pStartPos = strstr(pStartPos, "urn");
// Get end position of actual data
pEndPos = strpbrk(pStartPos, "\r\n<" );
iSOAPActionLength = pEndPos - pStartPos;
strncpy(szSOAPAction, pStartPos, iSOAPActionLength);
return szSOAPAction;
}
which sits in an atl com project.
it is referenced thus:
std::string objSOAPAction = CSSLConnection::ExtractSOAPAction(m_objMessage);
when i try to build the code i get the following error:
CallCreditSSL error LNK2019: unresolved external symbol "private: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall CSSLConnection::ExtractSOAPAction(char const *)" (?ExtractSOAPAction@CSSLConnection@@AAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PBD@Z) referenced in function "public: virtual long __stdcall CSSLConnection::SendMsg(unsigned short *,long *)" (?SendMsg@CSSLConnection@@UAGJPAGPAJ@Z)
Any ideas ? 5 hours on google has got me nowhere ;-(