🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #5712

Modal dialog in main thread causes file io in another to fail

#5712
From: Pontius
Date: Wed, 20 Jul 2005 19:12
10 lines
1442 bytes
I have a very strange problem that I can't seem to figure out.

I have two forms in my program. The second form spawns a thread when it is created that opens a file via CreateFile() and reads from it.

This works fine, except if I happen to open a modal dialog in the main form, like a FileOpenDialog for example. If it's open while the thread in the second form makes the call to CreateFile(), then CreateFile() will fail.

Is there any documentation that says having a modal dialog open will cause all file IO in all other threads to fail? I've never seen any.

Has anyone else experienced this? I'm out of ideas. Thanks.
Technical Details
Message-ID: <42dea200$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news3.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,ea5ae54620c4626a,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Pontius" <mfbscs@mchsi.com>
Sender: "Pontius" <mfbscs@mchsi.com>
Reply-To: "Pontius" <mfbscs@mchsi.com>
Subject: Modal dialog in main thread causes file io in another to fail
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 138.163.0.44     
NNTP-Posting-Host: 207.105.83.66
Message-ID: <42dea200$1@newsgroups.borland.com>
Date: 20 Jul 2005 12:12:00 -0700
X-Trace: newsgroups.borland.com 1121886720 207.105.83.66 (20 Jul 2005 12:12:00 -0700)
Lines: 12
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news3.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail