~ubuntu-branches/ubuntu/precise/arj/precise-security

« back to all changes in this revision

Viewing changes to ntstream.h

  • Committer: Bazaar Package Importer
  • Author(s): Guillem Jover
  • Date: 2004-06-27 08:07:09 UTC
  • Revision ID: james.westby@ubuntu.com-20040627080709-1gkxm72ex66gkwe4
Tags: upstream-3.10.21
ImportĀ upstreamĀ versionĀ 3.10.21

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * $Id: ntstream.h,v 1.1 2003/01/25 15:10:04 andrew_belov Exp $
 
3
 * ---------------------------------------------------------------------------
 
4
 * Prototypes of the functions located in NTSTREAM.C are declared here.
 
5
 *
 
6
 *
 
7
 */
 
8
 
 
9
#ifndef NTSTREAM_INCLUDED
 
10
#define NTSTREAM_INCLUDED
 
11
 
 
12
#if TARGET==WIN32
 
13
 
 
14
#include <largeint.h>
 
15
 
 
16
/* Read/write (backup/restore) modes */
 
17
 
 
18
#define NTSTREAMS_READ             0
 
19
#define NTSTREAMS_WRITE            1
 
20
 
 
21
/* NT stream operations structure */
 
22
 
 
23
struct nt_sid
 
24
{
 
25
 HANDLE hf;                             /* Win32 file handle */
 
26
 LARGE_INTEGER rem;                     /* Bytes remaining in xaction */
 
27
 int is_write;                          /* 1 = write */
 
28
 LPVOID lpcontext;                      /* !NULL = need to finalize */
 
29
};
 
30
 
 
31
/* Prototypes */
 
32
 
 
33
struct nt_sid *open_streams(char *name, int is_write);
 
34
void close_streams(struct nt_sid *sid);
 
35
int next_stream(WIN32_STREAM_ID *dest, struct nt_sid *sid);
 
36
unsigned long seek_stream_id(DWORD id, struct nt_sid *sid);
 
37
unsigned long read_stream(unsigned char *dest, unsigned long bytes, struct nt_sid *sid);
 
38
int create_stream(WIN32_STREAM_ID *src, struct nt_sid *sid);
 
39
unsigned long write_stream(unsigned char *src, unsigned long bytes, struct nt_sid *sid);
 
40
 
 
41
#endif  /* TARGET==WIN32 */
 
42
 
 
43
#endif