Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Any Windows devs out there with USB experience?

Thread Tools
 
Search this Thread
 
Old Jan 27, 2004 | 12:17 PM
  #1  
chinnybloke's Avatar
chinnybloke
Thread Starter
Scooby Regular
 
Joined: May 2003
Posts: 185
Likes: 0
Post

Hi,

We are writing file to USB datapens but find that the users do not power them down and so dismount them before removing the pen. This sometimes results in lost data. Does anyone know how to force the powerdown/dismount via an application?

Cheers
Reply
Old Jan 27, 2004 | 12:43 PM
  #2  
IWatkins's Avatar
IWatkins
Scooby Regular
 
Joined: Mar 2000
Posts: 4,531
Likes: 0
From: Gloucestershire, home of the lawnmower.
Post

You want to basically flush the write cache after the file is written. This ensures the file has finished writing when your application thinks it has finished writing. Have a look at the API call entitled "FlushFileBuffers".

However, doesn't stop the user removing the pen while it is writing...

Cheers

Ian
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
JimBowen
ICE
5
Jul 2, 2023 01:54 PM
KAS35RSTI
Subaru
27
Nov 4, 2021 07:12 PM
Mattybr5@MB Developments
Full Cars Breaking For Spares
12
Nov 18, 2015 07:03 AM
FuZzBoM
Wheels, Tyres & Brakes
16
Oct 4, 2015 09:49 PM
Ganz1983
Subaru
5
Oct 2, 2015 09:22 AM




All times are GMT +1. The time now is 09:05 AM.