Files
admin
base
com
developer
drivers
ds
enduser
inetcore
inetsrv
loc
mergedcomponents
multimedia
net
printscan
ddk
dload
fax
faxsrv
inc
lib
print
drivers
embedded
spooler
dbglib
exts
idl
inc
inetpp2
inetsrv
localspl
monitors
oleprn
perflib
prtprocs
scripts
splexts
spllib
splsetup
spoolss
bidispl
client
daytona
hydra
bind.c
change.c
client.h
clusspl.c
cstrings.c
cstrings.h
data.c
defprn.c
defprn.h
devmode.c
dirs
drvsetup.c
drvsetup.h
dsutil.cxx
dsutil.hxx
handle.c
init.c
memory.cxx
memory.hxx
midluser.c
pfdlg.c
pfdlg.h
precomp.h
prnprst.cxx
prnprst.hxx
prnstrm.cxx
prnstrm.hxx
prop.c
property.cxx
property.hxx
pubprn.cxx
pubprn.hxx
resource.h
sources.inc
splinit.c
splperst.cxx
splwow64c.c
stream.cxx
stream.hxx
util.c
varconv.cxx
varconv.hxx
winspla.c
winsplc.c
winspool.c
winspool.def
winspool.prf
winspool.rc
wlkprn.cxx
wlkprn.hxx
dll
idl
perf
server
splwow64
win32
dirs
wpnpinst
dirs
makefil0
dirs
publish
scan
ui
wia
dirs
project.mk
public
published
sdktools
shell
termsrv
tools
windows
dirs
makefil0
WindowsXP/printscan/print/spooler/spoolss/client/stream.hxx
2025-04-27 07:49:33 -04:00

105 lines
1.7 KiB
C++

/*++
Copyright (C) Microsoft Corporation, 1998 - 1999
All rights reserved.
Module Name:
Stream.hxx
Abstract:
Implements read, write , seek methods to operate a file likewise a stream
Author:
Adina Trufinescu (AdinaTru) 4-Nov-1998
Revision History:
--*/
#ifndef _TSTREAM_HXX_
#define _TSTREAM_HXX_
class TStream
{
public:
TStream::
TStream(
IN TString& strFileName
);
TStream::
~TStream();
HRESULT
Read(
IN VOID * pv,
IN ULONG cb,
IN ULONG * pcbRead
);
HRESULT
Write(
IN VOID const* pv,
IN ULONG cb,
IN ULONG * pcbWritten
);
HRESULT
Seek(
IN LARGE_INTEGER dlibMove,
IN DWORD dwOrigin,
IN ULARGE_INTEGER * plibNewPosition
);
HRESULT
TStream::
DestroyFile(
VOID
);
BOOL
TStream::
bSetEndOfFile(
VOID
);
static
HRESULT
MapWin32ErrorCodeToHRes(
IN DWORD dwErrorCode
);
private:
BOOL
TStream::
bValid
(
VOID
);
HANDLE
PCreateFile(
OUT LPDWORD pdwAccess
);
TString m_strFileName; // file name
HANDLE m_hFileHandle; // file handle
BOOL m_bCreated; // specify is file was created or just opened
DWORD m_dwAccess; // specify access rights the file was opened with
ULARGE_INTEGER m_uliStreamSize; // specify file size
};
#endif