Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Thu, 14 Feb 2008 08:00:05 -0800 (PST),    group: microsoft.public.platformsdk.com_ole        back       


ILockBytes, IStorage, IStream, shared memory, transactions, argh...   
I have a win32 application (win2k or winxp) where I am logging non-
permanently-persistent data that must be available to multiple
applications -- at most 1 producer to write, several consumers to read
-- & am trying to rethink my implementation of the lower-level
storage, & could use some help understanding some of the gory details
of what Windows does and does not offer.

Basically the producer produces an infinite stream of (raw bytes +
metadata) in a series of chunks, but because of practical storage
concerns, the chunks need to disappear when no one "cares" about them
any more -- e.g. I plan to reference count the chunks with "claims"
from either the producer or the consumers, & when the reference count
reaches 0, they deallocate. Producer typically puts a claim on only
the last 64K or so of data; consumers may hold random individual
chunks for longer.

I need to support both using shared memory and disk, and I need to be
robust against application crashing so that if any of the producer or
consumers die, the shared storage needs to be left in a consistent
state. All producer/consumers are on the same CPU.

My question is that I'm trying to figure out what OS primitives to
base this thing on. I figured I could do an implementation of
ILockBytes (with locking) based on CreateFileMapping/MapViewofFiles
and maybe then use StgCreateDocfileOnILockBytes to get the transaction
stuff for free but I can't determine whether that's the case... & I
don't really need all the bells & whistles of structured storage, just
the transactioning.

any suggestions?
date: Thu, 14 Feb 2008 08:00:05 -0800 (PST)   author:   Jason S

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us