aboutsummaryrefslogtreecommitdiff
path: root/src/dutil/inc/butil.h
blob: d1ec73bc802efe660858e9a827388283103f2ede (plain)
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
#pragma once
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.


#ifdef __cplusplus
extern "C" {
#endif

enum BUNDLE_INSTALL_CONTEXT
{
    BUNDLE_INSTALL_CONTEXT_MACHINE,
    BUNDLE_INSTALL_CONTEXT_USER,
};


/********************************************************************
BundleGetBundleInfo - Queries the bundle installation metadata for a given property

RETURNS:
    E_INVALIDARG
        An invalid parameter was passed to the function.
    HRESULT_FROM_WIN32(ERROR_UNKNOWN_PRODUCT)
        The bundle is not installed
    HRESULT_FROM_WIN32(ERROR_UNKNOWN_PROPERTY)
        The property is unrecognized
    HRESULT_FROM_WIN32(ERROR_MORE_DATA)
        A buffer is too small to hold the requested data.
    E_NOTIMPL:
        Tried to read a bundle attribute for a type which has not been implemented

    All other returns are unexpected returns from other dutil methods.
********************************************************************/
HRESULT DAPI BundleGetBundleInfo(
  __in_z LPCWSTR szBundleId,                             // Bundle code
  __in_z LPCWSTR szAttribute,                            // attribute name
  __out_ecount_opt(*pcchValueBuf) LPWSTR lpValueBuf,     // returned value, NULL if not desired
  __inout_opt                     LPDWORD pcchValueBuf   // in/out buffer character count
    );

/********************************************************************
BundleEnumRelatedBundle - Queries the bundle installation metadata for installs with the given upgrade code

NOTE: lpBundleIdBuff is a buffer to receive the bundle GUID. This buffer must be 39 characters long. 
        The first 38 characters are for the GUID, and the last character is for the terminating null character.
RETURNS:
    E_INVALIDARG
        An invalid parameter was passed to the function.

    All other returns are unexpected returns from other dutil methods.
********************************************************************/
HRESULT DAPI BundleEnumRelatedBundle(
  __in_z   LPCWSTR lpUpgradeCode,
  __in     BUNDLE_INSTALL_CONTEXT context,
  __inout  PDWORD pdwStartIndex,
  __out_ecount(MAX_GUID_CHARS+1)  LPWSTR lpBundleIdBuf
    );

#ifdef __cplusplus
}
#endif