diff options
Diffstat (limited to 'src/ext/Util/ca')
| -rw-r--r-- | src/ext/Util/ca/test.cpp | 15 | ||||
| -rw-r--r-- | src/ext/Util/ca/utilca.def | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/ext/Util/ca/test.cpp b/src/ext/Util/ca/test.cpp index e9d02ed3..8f1c238b 100644 --- a/src/ext/Util/ca/test.cpp +++ b/src/ext/Util/ca/test.cpp | |||
| @@ -40,6 +40,21 @@ static LRESULT CALLBACK WndProc( | |||
| 40 | 40 | ||
| 41 | 41 | ||
| 42 | /****************************************************************** | 42 | /****************************************************************** |
| 43 | WixCancelWhenDeferred - entry point for WixCancelWhenDeferred | ||
| 44 | custom action which always cancels when running as a deferred | ||
| 45 | custom action (otherwise it blindly succeeds). It's useful when | ||
| 46 | testing the rollback of deferred custom actions: Schedule it | ||
| 47 | immediately after the rollback/deferred CA pair you're testing | ||
| 48 | and it will fail, causing your rollback CA to get invoked. | ||
| 49 | ********************************************************************/ | ||
| 50 | extern "C" UINT __stdcall WixCancelWhenDeferred( | ||
| 51 | __in MSIHANDLE hInstall | ||
| 52 | ) | ||
| 53 | { | ||
| 54 | return ::MsiGetMode(hInstall, MSIRUNMODE_SCHEDULED) ? ERROR_INSTALL_USEREXIT : ERROR_SUCCESS; | ||
| 55 | } | ||
| 56 | |||
| 57 | /****************************************************************** | ||
| 43 | WixFailWhenDeferred - entry point for WixFailWhenDeferred | 58 | WixFailWhenDeferred - entry point for WixFailWhenDeferred |
| 44 | custom action which always fails when running as a deferred | 59 | custom action which always fails when running as a deferred |
| 45 | custom action (otherwise it blindly succeeds). It's useful when | 60 | custom action (otherwise it blindly succeeds). It's useful when |
diff --git a/src/ext/Util/ca/utilca.def b/src/ext/Util/ca/utilca.def index 2aeb54f4..f525233d 100644 --- a/src/ext/Util/ca/utilca.def +++ b/src/ext/Util/ca/utilca.def | |||
| @@ -82,6 +82,7 @@ EXPORTS | |||
| 82 | WixShellExecBinary | 82 | WixShellExecBinary |
| 83 | WixUnelevatedShellExec | 83 | WixUnelevatedShellExec |
| 84 | ; test.cpp | 84 | ; test.cpp |
| 85 | WixCancelWhenDeferred | ||
| 85 | WixFailWhenDeferred | 86 | WixFailWhenDeferred |
| 86 | WixWaitForEvent | 87 | WixWaitForEvent |
| 87 | ; TouchFile.cpp | 88 | ; TouchFile.cpp |
