diff options
author | Rob Mensching <rob@firegiant.com> | 2021-05-11 07:38:07 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2021-05-11 07:38:07 -0700 |
commit | 0c6aea2de8db1258949a741b1c504307a81bf579 (patch) | |
tree | df45a1c3acf2a2af4c8c62d9461f4483bcd0c28c /src/libs/dutil/WixToolset.DUtil/inc/sczutil.h | |
parent | 985b2683b2717c83a27295b36e09b126083238f9 (diff) | |
parent | 7f642e51670bc38a4ef782a363936850bc2b0ba9 (diff) | |
download | wix-0c6aea2de8db1258949a741b1c504307a81bf579.tar.gz wix-0c6aea2de8db1258949a741b1c504307a81bf579.tar.bz2 wix-0c6aea2de8db1258949a741b1c504307a81bf579.zip |
Merge dutil
Diffstat (limited to 'src/libs/dutil/WixToolset.DUtil/inc/sczutil.h')
-rw-r--r-- | src/libs/dutil/WixToolset.DUtil/inc/sczutil.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/libs/dutil/WixToolset.DUtil/inc/sczutil.h b/src/libs/dutil/WixToolset.DUtil/inc/sczutil.h new file mode 100644 index 00000000..fcfbd13a --- /dev/null +++ b/src/libs/dutil/WixToolset.DUtil/inc/sczutil.h | |||
@@ -0,0 +1,30 @@ | |||
1 | #pragma once | ||
2 | // 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. | ||
3 | |||
4 | |||
5 | #ifdef __cplusplus | ||
6 | class PSCZ | ||
7 | { | ||
8 | public: | ||
9 | PSCZ() : m_scz(NULL) { } | ||
10 | |||
11 | ~PSCZ() { ReleaseNullStr(m_scz); } | ||
12 | |||
13 | operator LPWSTR() { return m_scz; } | ||
14 | |||
15 | operator LPCWSTR() { return m_scz; } | ||
16 | |||
17 | operator bool() { return NULL != m_scz; } | ||
18 | |||
19 | LPWSTR* operator &() { return &m_scz; } | ||
20 | |||
21 | bool operator !() { return !m_scz; } | ||
22 | |||
23 | WCHAR operator *() { return *m_scz; } | ||
24 | |||
25 | LPWSTR Detach() { LPWSTR scz = m_scz; m_scz = NULL; return scz; } | ||
26 | |||
27 | private: | ||
28 | LPWSTR m_scz; | ||
29 | }; | ||
30 | #endif //__cplusplus | ||