Hi Monty,

Previously we had conversed a bit about a problem where I ran across
the writefile() limit on the amount of data that can be written to a
file at one time.

Good thing you brought it up again, I'd forgotten all about it. I'm swamped with work at the moment, so I haven't been very active with DQSD.

I guess I am trying to guage how difficult it will be to fix. I am debating on whether to try to work around the limitation, or wait for
a routine change.

It's really a simple fix, the offending stuff is here (I'd even added a TODO because I was worried about it):

        // TODO: Avoid using conversion macros here -- it's dangerous,
        // since there's no telling how large bstrValue is
        DWORD dwBytesWritten = 0;
        BOOL bResult = ::WriteFile( hFile, W2CT( bstrValue ),
SysStringLen(bstrValue), &dwBytesWritten, NULL );

The problem is the use of W2CT, which dynamically allocates memory from
off the stack -- that may not mean much to most people, but the bottom
line is that if the incoming string is too long, you get a stack
overflow, and the process terminates unconditionally.

What happens in W2CT isn't that difficult to rewrite to use proper heap
allocation, but I don't think I'll be able to find the time this week
either...

Anyway, no need for alarm, it's a pretty local problem, and can be fixed
without disturbing clients.

Hope that helps,
- Kim


------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Archive: https://lists.sourceforge.net/lists/listinfo/dqsd-devel

Reply via email to