summaryrefslogtreecommitdiff
path: root/src/binder/inc/bindresult.hpp
blob: 54d154a009c1399566e796297e67762ef1ba5450 (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
61
62
63
64
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// ============================================================
//
// BindResult.hpp
//


//
// Defines the BindResult class
//
// ============================================================

#ifndef __BINDER__BIND_RESULT_HPP__
#define __BINDER__BIND_RESULT_HPP__

#include "bindertypes.hpp"
 
namespace BINDER_SPACE
{
    class BindResult
    {
    public:
        inline BindResult();
        inline ~BindResult();

        inline AssemblyName *GetAssemblyName(BOOL fAddRef = FALSE);
        inline IUnknown *GetAssembly(BOOL fAddRef = FALSE);
        inline Assembly *GetAsAssembly(BOOL fAddRef = FALSE);

        inline AssemblyName *GetRetargetedAssemblyName();
        inline void SetRetargetedAssemblyName(AssemblyName *pRetargetedAssemblyName);

        inline BOOL GetIsDynamicBind();
        inline void SetIsDynamicBind(BOOL fIsDynamicBind);
        inline BOOL GetIsInGAC();
        inline void SetIsInGAC(BOOL fIsInGAC);
        inline BOOL GetIsContextBound();
        inline void SetIsContextBound(BOOL fIsContextBound);
        inline BOOL GetIsFirstRequest();
        inline void SetIsFirstRequest(BOOL fIsFirstRequest);
        inline BOOL GetIsSharable();
        inline void SetIsSharable(BOOL fIsSharable);

        inline void SetResult(ContextEntry *pContextEntry, BOOL fIsContextBound = TRUE);
        inline void SetResult(Assembly *pAssembly);
        inline void SetResult(BindResult *pBindResult);

        inline void SetNoResult();
        inline BOOL HaveResult();

        inline IUnknown *ExtractAssembly();
        inline void Reset();

    protected:
        DWORD m_dwResultFlags;
        AssemblyName *m_pAssemblyName;
        AssemblyName *m_pRetargetedAssemblyName;
        ReleaseHolder<IUnknown> m_pIUnknownAssembly;
    };
};

#endif