Home > Software engineering >  Please help bosses, COM interface big string is empty
Please help bosses, COM interface big string is empty

Time:11-12

Returns a string with the following interface, data volume is larger, more than twenty thousand bytes,

StartFileScan ([in] BSTR szFilePath, [out, retval] BSTR * pVal)
{
.
* pVal=m_strScanResult. AllocSysString ();//m_strScanResult cstrings
}

Between the return VS debug for memory, pVal is * pVal storage address, to the address storage is a string, no problem, but after returned to the calling module

CoInitializeEx (NULL, COINIT_MULTITHREADED);
BSTR PSTR=pTest - & gt; M_Client - & gt; StartFileScan (pTest - & gt; M_ScanPath. Get string ());

PSTR IP address and interface * pVal is consistent, but there is no string, don't know what's the reason, small string is no problem, is to do with the MTA suite?

CodePudding user response:

More than twenty thousand bytes around 20 k is not big

CodePudding user response:

Not by StartFileScan parameters returned to you, how is the return value,

CodePudding user response:

Look at the return value, perhaps method returns the other errors,
  • Related