> Granted, we have tried the Enable Write Caching checks -
> but IS this a cast iron way of guaranteeing data will
> not be held by XP until later, and the FAT table will
> be updated instantly?

Yes, as "instantly" as possible.

>> I HOPE you don't mean you have two PCs on the same SCSI
>> bus, talking to the same drive... that would be bad
>> unless you're writing the underlying file-system and
>> coordinating writes between the multiple masters.
>> (seen this done, hated it with a passion)
>
> Yes, sort of.  The other machine is a non-Windows
> unit which has its own SCSI controller, and internal
> HD.

I guarantee that any success you have with this setup will be fleeting, and
random... what happens if someone on the XP box schedules a defrag, or
something equally invasive to the file-system?

> The user community is quite used to this set up with
> Windows 98 and previous, and users know not to mix
> and match the controller functions, and to set the
> device as Removeable.

Even with the device flagged as removable, there is NOTHING in the FAT
file-system that lets two machines share the drive.  There's nothing that
transactionalizes the updates to the drive.  One machine could have written
the updates for the FAT to remove a file, then just before it writes the FAT
updates to use that newly freed space, the other machine could wedge in and
claim that space.  You've been lucky.

> And the third party box is extremely well behaved - it finishes what it
does and gets away from the HD.

But that quickie update, if it allocates space from the FAT (as opposed to
just rewriting specific areas in a file) is NOT transactional, and there is
NOTHING either Win98 or XP can do about that.

> But it has a 40x8 LCD display and limited controls
> which makes disk managment difficult, when compared
> with drag and drop control in Windows.

What is this box?  Any chance you could point me at some specs?  I suspect
that it could have some sort of file-sharing or even some Service/TSR
written that would accept your updates from the XP and read/write them
itself.  Maybe it's even got a web server that could serve up the stuff
safely...

> And there are other issues that I need to solve
> with software - eg. long names are not supported
> by the drive format, but XP knows seems to know
> no limits - and this has caused corruption
> already.

To control this for FAT file systems, in REGEDIT:

System Key: [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\FileSystem]
Value Name: Win31FileSystem
Data Type: REG_DWORD (DWORD Value)
Value Data: (0 = long file names, 1 = 8.3 filenames)

> So I was hoping that there may be either a programmatic way
> to ensure that the file system updates at the time, or
> perhaps a process which if followed would cause that same
> effect.

You might try...

http://snurl.com/FlushAllFiles
(snurl of
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com/
support/kb/articles/Q99/7/94.asp )

Specifically, the trick at the bottom:

   hFile = CreateFile("\\\\.\\c:", ....);
   FlushFileBuffers(hFile);

Where the C: changes to the drive letter in question.

>> Why not just use Windows shares on the owning machine?
>
> If I understand your question, I think the answer lies in the fact that
the third-party box is non-Windows.

Does that non-windows box offer ANY network-based sharing?  What OS is it
running?

Marc

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
NEW! ASP.NET courses you may be interested in:

2 Days of ASP.NET, 29 Sept 2003, in Redmond
http://www.develop.com/courses/2daspdotnet

Guerrilla ASP.NET, 13 Oct 2003, in Boston
http://www.develop.com/courses/gaspdotnet

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to