added some development tools
[windows-sources.git] / developer / VSSDK / VisualStudioIntegration / Common / Source / CPP / VSL / MockInterfaces / VSLMockIVsComponentSelectorDlg2.h
bloba9aa5c4e2f255c6b605297377be8d890876d7f71
1 /***************************************************************************
3 Copyright (c) Microsoft Corporation. All rights reserved.
4 This code is licensed under the Visual Studio SDK license terms.
5 THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
6 ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
7 IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
8 PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
10 This code is a part of the Visual Studio Library.
12 ***************************************************************************/
14 #ifndef IVSCOMPONENTSELECTORDLG2_H_10C49CA1_2F46_11D3_A504_00C04F5E0BA5
15 #define IVSCOMPONENTSELECTORDLG2_H_10C49CA1_2F46_11D3_A504_00C04F5E0BA5
17 #if _MSC_VER > 1000
18 #pragma once
19 #endif
21 #include "vsshell80.h"
23 #pragma warning(push)
24 #pragma warning(disable : 4510) // default constructor could not be generated
25 #pragma warning(disable : 4610) // can never be instantiated - user defined constructor required
26 #pragma warning(disable : 4512) // assignment operator could not be generated
27 #pragma warning(disable : 6011) // Dereferencing NULL pointer (a NULL derference is just another kind of failure for a unit test
29 namespace VSL
32 class IVsComponentSelectorDlg2NotImpl :
33 public IVsComponentSelectorDlg2
36 VSL_DECLARE_NONINSTANTIABLE_BASE_CLASS(IVsComponentSelectorDlg2NotImpl)
38 public:
40 typedef IVsComponentSelectorDlg2 Interface;
42 STDMETHOD(ComponentSelectorDlg2)(
43 /*[in]*/ VSCOMPSELFLAGS2 /*grfFlags*/,
44 /*[in]*/ IVsComponentUser* /*pUser*/,
45 /*[in]*/ ULONG /*cComponents*/,
46 /*[in,size_is(cComponents)]*/ PVSCOMPONENTSELECTORDATA[] /*rgpcsdComponents*/,
47 /*[in]*/ LPCOLESTR /*lpszDlgTitle*/,
48 /*[in]*/ LPCOLESTR /*lpszHelpTopic*/,
49 /*[in,out]*/ ULONG* /*pxDlgSize*/,
50 /*[in,out]*/ ULONG* /*pyDlgSize*/,
51 /*[in]*/ ULONG /*cTabInitializers*/,
52 /*[in,size_is(cTabInitializers)]*/ VSCOMPONENTSELECTORTABINIT[] /*rgcstiTabInitializers*/,
53 /*[in,out]*/ GUID* /*pguidStartOnThisTab*/,
54 /*[in]*/ LPCOLESTR /*pszBrowseFilters*/,
55 /*[in,out]*/ BSTR* /*pbstrBrowseLocation*/)VSL_STDMETHOD_NOTIMPL
58 class IVsComponentSelectorDlg2MockImpl :
59 public IVsComponentSelectorDlg2,
60 public MockBase
63 VSL_DECLARE_NONINSTANTIABLE_BASE_CLASS(IVsComponentSelectorDlg2MockImpl)
65 public:
67 VSL_DEFINE_MOCK_CLASS_TYPDEFS(IVsComponentSelectorDlg2MockImpl)
69 typedef IVsComponentSelectorDlg2 Interface;
70 struct ComponentSelectorDlg2ValidValues
72 /*[in]*/ VSCOMPSELFLAGS2 grfFlags;
73 /*[in]*/ IVsComponentUser* pUser;
74 /*[in]*/ ULONG cComponents;
75 /*[in,size_is(cComponents)]*/ PVSCOMPONENTSELECTORDATA* rgpcsdComponents;
76 /*[in]*/ LPCOLESTR lpszDlgTitle;
77 /*[in]*/ LPCOLESTR lpszHelpTopic;
78 /*[in,out]*/ ULONG* pxDlgSize;
79 /*[in,out]*/ ULONG* pyDlgSize;
80 /*[in]*/ ULONG cTabInitializers;
81 /*[in,size_is(cTabInitializers)]*/ VSCOMPONENTSELECTORTABINIT* rgcstiTabInitializers;
82 /*[in,out]*/ GUID* pguidStartOnThisTab;
83 /*[in]*/ LPCOLESTR pszBrowseFilters;
84 /*[in,out]*/ BSTR* pbstrBrowseLocation;
85 HRESULT retValue;
88 STDMETHOD(ComponentSelectorDlg2)(
89 /*[in]*/ VSCOMPSELFLAGS2 grfFlags,
90 /*[in]*/ IVsComponentUser* pUser,
91 /*[in]*/ ULONG cComponents,
92 /*[in,size_is(cComponents)]*/ PVSCOMPONENTSELECTORDATA rgpcsdComponents[],
93 /*[in]*/ LPCOLESTR lpszDlgTitle,
94 /*[in]*/ LPCOLESTR lpszHelpTopic,
95 /*[in,out]*/ ULONG* pxDlgSize,
96 /*[in,out]*/ ULONG* pyDlgSize,
97 /*[in]*/ ULONG cTabInitializers,
98 /*[in,size_is(cTabInitializers)]*/ VSCOMPONENTSELECTORTABINIT rgcstiTabInitializers[],
99 /*[in,out]*/ GUID* pguidStartOnThisTab,
100 /*[in]*/ LPCOLESTR pszBrowseFilters,
101 /*[in,out]*/ BSTR* pbstrBrowseLocation)
103 VSL_DEFINE_MOCK_METHOD(ComponentSelectorDlg2)
105 VSL_CHECK_VALIDVALUE(grfFlags);
107 VSL_CHECK_VALIDVALUE_INTERFACEPOINTER(pUser);
109 VSL_CHECK_VALIDVALUE(cComponents);
111 VSL_CHECK_VALIDVALUE_MEMCMP(rgpcsdComponents, cComponents*sizeof(rgpcsdComponents[0]), validValues.cComponents*sizeof(validValues.rgpcsdComponents[0]));
113 VSL_CHECK_VALIDVALUE_STRINGW(lpszDlgTitle);
115 VSL_CHECK_VALIDVALUE_STRINGW(lpszHelpTopic);
117 VSL_SET_VALIDVALUE(pxDlgSize);
119 VSL_SET_VALIDVALUE(pyDlgSize);
121 VSL_CHECK_VALIDVALUE(cTabInitializers);
123 VSL_CHECK_VALIDVALUE_MEMCMP(rgcstiTabInitializers, cTabInitializers*sizeof(rgcstiTabInitializers[0]), validValues.cTabInitializers*sizeof(validValues.rgcstiTabInitializers[0]));
125 VSL_SET_VALIDVALUE(pguidStartOnThisTab);
127 VSL_CHECK_VALIDVALUE_STRINGW(pszBrowseFilters);
129 VSL_SET_VALIDVALUE_BSTR(pbstrBrowseLocation);
131 VSL_RETURN_VALIDVALUES();
136 } // namespace VSL
138 #pragma warning(pop)
140 #endif // IVSCOMPONENTSELECTORDLG2_H_10C49CA1_2F46_11D3_A504_00C04F5E0BA5