Link to home
Start Free TrialLog in
Avatar of fraeliz8
fraeliz8

asked on

Visual C++ Access violation reading location 0x00000004

Well...i've converted to bstr 10 different ways and still get this error.

Unhandled exception at 0x00f61ce0 (FEPAdapterWrapperCPP2.dll) in ceraexe0471.exe: 0xC0000005: Access violation reading location 0x00000004.

I’m sure it just has to do with the way I’m referring to a variable…. Here is the code causing the error.

Last line is where the error occurs……. pstrInputClaim is passed into this function as a char[]

                  CComBSTR bstr(pstrInputClaim);
                  BSTR bstrInputClaim = bstr.Copy();    
                  vResult = plDomDocument->loadXML(bstrInputClaim,&bSuccess);

thanks for your continued support : )
ASKER CERTIFIED SOLUTION
Avatar of pgnatyuk
pgnatyuk
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fraeliz8
fraeliz8

ASKER

Thanks.... turns out the bstr conversion was not the problem..but that example you provided from MSDN helped my find the problem...it was with the pXMLDoc....not being valid.... all is good for now..thanks so much.
You are welcome. I'm glad to help.