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 IDEBUGENGINELAUNCH2_H_10C49CA1_2F46_11D3_A504_00C04F5E0BA5
15 #define IDEBUGENGINELAUNCH2_H_10C49CA1_2F46_11D3_A504_00C04F5E0BA5
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
32 class IDebugEngineLaunch2NotImpl
:
33 public IDebugEngineLaunch2
36 VSL_DECLARE_NONINSTANTIABLE_BASE_CLASS(IDebugEngineLaunch2NotImpl
)
40 typedef IDebugEngineLaunch2 Interface
;
42 STDMETHOD(LaunchSuspended
)(
43 /*[in,ptr]*/ LPCOLESTR
/*pszServer*/,
44 /*[in]*/ IDebugPort2
* /*pPort*/,
45 /*[in,ptr]*/ LPCOLESTR
/*pszExe*/,
46 /*[in,ptr]*/ LPCOLESTR
/*pszArgs*/,
47 /*[in,ptr]*/ LPCOLESTR
/*pszDir*/,
48 /*[in,ptr]*/ BSTR
/*bstrEnv*/,
49 /*[in,ptr]*/ LPCOLESTR
/*pszOptions*/,
50 /*[in]*/ LAUNCH_FLAGS
/*dwLaunchFlags*/,
51 /*[in]*/ DWORD
/*hStdInput*/,
52 /*[in]*/ DWORD
/*hStdOutput*/,
53 /*[in]*/ DWORD
/*hStdError*/,
54 /*[in]*/ IDebugEventCallback2
* /*pCallback*/,
55 /*[out]*/ IDebugProcess2
** /*ppProcess*/)VSL_STDMETHOD_NOTIMPL
57 STDMETHOD(ResumeProcess
)(
58 /*[in]*/ IDebugProcess2
* /*pProcess*/)VSL_STDMETHOD_NOTIMPL
60 STDMETHOD(CanTerminateProcess
)(
61 /*[in]*/ IDebugProcess2
* /*pProcess*/)VSL_STDMETHOD_NOTIMPL
63 STDMETHOD(TerminateProcess
)(
64 /*[in]*/ IDebugProcess2
* /*pProcess*/)VSL_STDMETHOD_NOTIMPL
67 class IDebugEngineLaunch2MockImpl
:
68 public IDebugEngineLaunch2
,
72 VSL_DECLARE_NONINSTANTIABLE_BASE_CLASS(IDebugEngineLaunch2MockImpl
)
76 VSL_DEFINE_MOCK_CLASS_TYPDEFS(IDebugEngineLaunch2MockImpl
)
78 typedef IDebugEngineLaunch2 Interface
;
79 struct LaunchSuspendedValidValues
81 /*[in,ptr]*/ LPCOLESTR pszServer
;
82 /*[in]*/ IDebugPort2
* pPort
;
83 /*[in,ptr]*/ LPCOLESTR pszExe
;
84 /*[in,ptr]*/ LPCOLESTR pszArgs
;
85 /*[in,ptr]*/ LPCOLESTR pszDir
;
86 /*[in,ptr]*/ BSTR bstrEnv
;
87 /*[in,ptr]*/ LPCOLESTR pszOptions
;
88 /*[in]*/ LAUNCH_FLAGS dwLaunchFlags
;
89 /*[in]*/ DWORD hStdInput
;
90 /*[in]*/ DWORD hStdOutput
;
91 /*[in]*/ DWORD hStdError
;
92 /*[in]*/ IDebugEventCallback2
* pCallback
;
93 /*[out]*/ IDebugProcess2
** ppProcess
;
97 STDMETHOD(LaunchSuspended
)(
98 /*[in,ptr]*/ LPCOLESTR pszServer
,
99 /*[in]*/ IDebugPort2
* pPort
,
100 /*[in,ptr]*/ LPCOLESTR pszExe
,
101 /*[in,ptr]*/ LPCOLESTR pszArgs
,
102 /*[in,ptr]*/ LPCOLESTR pszDir
,
103 /*[in,ptr]*/ BSTR bstrEnv
,
104 /*[in,ptr]*/ LPCOLESTR pszOptions
,
105 /*[in]*/ LAUNCH_FLAGS dwLaunchFlags
,
106 /*[in]*/ DWORD hStdInput
,
107 /*[in]*/ DWORD hStdOutput
,
108 /*[in]*/ DWORD hStdError
,
109 /*[in]*/ IDebugEventCallback2
* pCallback
,
110 /*[out]*/ IDebugProcess2
** ppProcess
)
112 VSL_DEFINE_MOCK_METHOD(LaunchSuspended
)
114 VSL_CHECK_VALIDVALUE_STRINGW(pszServer
);
116 VSL_CHECK_VALIDVALUE_INTERFACEPOINTER(pPort
);
118 VSL_CHECK_VALIDVALUE_STRINGW(pszExe
);
120 VSL_CHECK_VALIDVALUE_STRINGW(pszArgs
);
122 VSL_CHECK_VALIDVALUE_STRINGW(pszDir
);
124 VSL_CHECK_VALIDVALUE_BSTR(bstrEnv
);
126 VSL_CHECK_VALIDVALUE_STRINGW(pszOptions
);
128 VSL_CHECK_VALIDVALUE(dwLaunchFlags
);
130 VSL_CHECK_VALIDVALUE(hStdInput
);
132 VSL_CHECK_VALIDVALUE(hStdOutput
);
134 VSL_CHECK_VALIDVALUE(hStdError
);
136 VSL_CHECK_VALIDVALUE_INTERFACEPOINTER(pCallback
);
138 VSL_SET_VALIDVALUE_INTERFACE(ppProcess
);
140 VSL_RETURN_VALIDVALUES();
142 struct ResumeProcessValidValues
144 /*[in]*/ IDebugProcess2
* pProcess
;
148 STDMETHOD(ResumeProcess
)(
149 /*[in]*/ IDebugProcess2
* pProcess
)
151 VSL_DEFINE_MOCK_METHOD(ResumeProcess
)
153 VSL_CHECK_VALIDVALUE_INTERFACEPOINTER(pProcess
);
155 VSL_RETURN_VALIDVALUES();
157 struct CanTerminateProcessValidValues
159 /*[in]*/ IDebugProcess2
* pProcess
;
163 STDMETHOD(CanTerminateProcess
)(
164 /*[in]*/ IDebugProcess2
* pProcess
)
166 VSL_DEFINE_MOCK_METHOD(CanTerminateProcess
)
168 VSL_CHECK_VALIDVALUE_INTERFACEPOINTER(pProcess
);
170 VSL_RETURN_VALIDVALUES();
172 struct TerminateProcessValidValues
174 /*[in]*/ IDebugProcess2
* pProcess
;
178 STDMETHOD(TerminateProcess
)(
179 /*[in]*/ IDebugProcess2
* pProcess
)
181 VSL_DEFINE_MOCK_METHOD(TerminateProcess
)
183 VSL_CHECK_VALIDVALUE_INTERFACEPOINTER(pProcess
);
185 VSL_RETURN_VALIDVALUES();
194 #endif // IDEBUGENGINELAUNCH2_H_10C49CA1_2F46_11D3_A504_00C04F5E0BA5