Re: Access Violation when transcoding a XalanDOMString

2004-05-13 Thread Keith Rogers
This is what I suspected.  It definitely won't work.  You need to build the DLLs and app with the same version of Visual Studio.  Like I said, I had no success with VC7 a while back and have not tried to upgrade.  VS.NET still shuts down on me unexpectedly from time to time and tries to send error

Re: Access Violation when transcoding a XalanDOMString

2004-05-13 Thread david_n_bertoni
> Ryan, > No, I don't think it's VC7. You can't do what XalanDOMString::transcode is trying to > do - return memory allocated in one heap (the DLLs) and have it released in the EXE's > space. Bad idea. I've got a simple test DLL & EXE that confirms this. It crashes > whether built with VC6 or VC

Re: Access Violation when transcoding a XalanDOMString

2004-05-13 Thread Keith Rogers
Ryan, No, I don't think it's VC7.  You can't do what XalanDOMString::transcode is trying to do - return memory allocated in one heap (the DLLs) and have it released in the EXE's space.  Bad idea.  I've got a simple test DLL & EXE that confirms this.  It crashes whether built with VC6 or VC7.   Keit

Re: Access Violation when transcoding a XalanDOMString

2004-05-13 Thread david_n_bertoni
> Hey Keith and Dave, > > Well I figured out a work-around for my particular problem. I found out > that I didn't have to be converting to an 8-bit character after all. I > was using it to do a strtok() on an XML string, and then after some > digging I found the StringTokenizer class in the Xalan

Re: Access Violation when transcoding a XalanDOMString

2004-05-13 Thread Ryan Sawatzky
Hey Keith and Dave, Well I figured out a work-around for my particular problem. I found out that I didn't have to be converting to an 8-bit character after all. I was using it to do a strtok() on an XML string, and then after some digging I found the StringTokenizer class in the Xalan docs. S

Re: Access Violation when transcoding a XalanDOMString

2004-05-13 Thread Keith Rogers
Ryan's compiler options looked Ok (in the first posting) for a debug build.  If the right library is being linked, it *should* work.   Ryan, what compiler are you building the app with?  I know when I tried to use a VC7-built app with the VC6 built DLLs (that was Xerces 2.2, Xalan 1.5, as I recall

Re: Access Violation when transcoding a XalanDOMString

2004-05-13 Thread david_n_bertoni
> Hi Keith, > Thanks for the reply. The function in question calls the > XalanDOMString.transcode() function to get a CharVectorType back. Then > the function allocates a char[] of appropraite length, and then it > copies characters from the vector into the array one by one. When the > function

Re: Access Violation when transcoding a XalanDOMString

2004-05-13 Thread Ryan Sawatzky
Hi Keith, Thanks for the reply. The function in question calls the XalanDOMString.transcode() function to get a CharVectorType back. Then the function allocates a char[] of appropraite length, and then it copies characters from the vector into the array one by one. When the function tries to

Re: Access Violation when transcoding a XalanDOMString

2004-05-13 Thread Keith Rogers
Ok, I looked at the code.  It actually creates a string object that encapsulates both std::wstring (UCS2) and std::string (UTF8).  We don't use the transcode functions -- too many problems some years ago (Xalan 1.0?).  All of our wide character data is UCS2, and char is UTF8.  There are Microsoft A

Re: Access Violation when transcoding a XalanDOMString

2004-05-13 Thread Keith Rogers
I've got a fair amount of code that uses the XalanDOMString::c_str() to create std::string objects, and all linking is with runtime DLLs.  I haven't seen a crash.  What are you doing, exactly?  You can't actually push a char[] array into a vector unless you've got it wrapped in a class that has cop

Access Violation when transcoding a XalanDOMString

2004-05-13 Thread Ryan Sawatzky
Hi, We are trying to move our code over to Windows. In our code we have a function that converts a XalanDOMString into a old C-Style null terminated character array. When we try to run through this function, the program usually crashes on the fourth or fifth time it is called. The access vio