summaryrefslogtreecommitdiffstats
path: root/public/sdk/inc/ofsoid.hxx
blob: 6cbcb27e462a9059f78c56e431a1f36d87abbd21 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
//+-------------------------------------------------------------------------
//
//  Microsoft Windows
//  Copyright (C) Microsoft Corporation, 1992 - 1992.
//
//  File:       ofsoid.hxx
//
//  Contents:   Id and id search functionality
//
//  Functions:
//
//  History:    27-Jan-93   BillMo      Created.
//
//--------------------------------------------------------------------------

#include <stdlib.h>

EXPORTDEF NTSTATUS
ReadObjectId(HANDLE hFile, OBJECTID *poid);

EXPORTDEF NTSTATUS
WriteObjectId(HANDLE hFile, const OBJECTID *poid);

EXPORTDEF void
GenerateObjectId(OBJECTID *poid);

EXPORTDEF void
GenerateRelatedObjectId(const OBJECTID *poidIn, OBJECTID *poid);

EXPORTDEF NTSTATUS
GetObjectId(HANDLE hFile, OBJECTID *poid);

EXPORTDEF NTSTATUS
GetObjectIdFromPath(const WCHAR * pwcsFile, OBJECTID *poid);

EXPORTDEF NTSTATUS
DeleteObjectId(HANDLE hFile);


//+-------------------------------------------------------------------
//
//  Function:   SearchVolume
//
//  Synopsis:   Search the volume of the handle passed in and return the
//              path(s) of the matching objects relative to the handle.
//              See description of FindObject in ofs\fs\fs\objid.cxx or
//              win4dwb\ofs\link\alink.doc for SFindObjectOut structure.
//
//  Arguments:  [hAncestor] -- Handle to volume root or other object on
//                             volume of interest.
//              [oid]       -- The object id of the object(s) to search
//                             for.
//              [pResults]  -- A buffer, at least sizeof(SFindObjectOut)
//                             bytes long, to receive the path of the
//                             found object (or paths of Lineage matches.)
//              [usBufLen]  -- Length of buffer, in bytes, at [pResults.]
//              [cLineage]  -- Maximum number of Lineage matches to return.
//                             May be 0, in which case no search for Lineage
//                             matches is made if an exact match by
//                             OBJECTID is found.
//
//
//  Returns:    STATUS_SUCCESS -- Found exact match.
//              STATUS_NO_SUCH_FILE -- No exact match found.  May be lineage matches.
//              STATUS_FOUND_OUT_OF_SCOPE -- Found exact match but it is not
//                                  in the scope of [hAncestor.]
//
//  Signals:    None.
//
//  Modifies:   [pResults]
//
//  Algorithm:  Call OFS using FSCTL_OFS_LINK_FINDOBJECT
//
//  History:    3-Jun-93 BillMo    Created.
//
//  Notes:
//
//--------------------------------------------------------------------

NTSTATUS
SearchVolume(   HANDLE              hAncestor,
                const OBJECTID &    oid,
                SFindObjectOut *    pResults,
                USHORT              usBufLen,   // length in bytes of buffer
                                                // at pResults
                USHORT              cLineage ); // maximum number of lineage
                                                // matches to return

NTSTATUS
SearchVolume(const WCHAR *       pwszAncestor,
             const OBJECTID &    oid,
             SFindObjectOut *    pResults,
             USHORT              usBufLen,                                                 // at pResults
             USHORT              cLineage );