summaryrefslogtreecommitdiff
path: root/plugins/IEView/src/stdafx.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/IEView/src/stdafx.h')
-rw-r--r--plugins/IEView/src/stdafx.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/IEView/src/stdafx.h b/plugins/IEView/src/stdafx.h
index 51e408cf01..8ec7481c40 100644
--- a/plugins/IEView/src/stdafx.h
+++ b/plugins/IEView/src/stdafx.h
@@ -79,4 +79,14 @@ extern IEView *debugView;
extern char *workingDirUtf8;
extern HANDLE hHookOptionsChanged;
+class BSTR_PTR
+{
+ BSTR _data;
+public:
+ BSTR_PTR(const wchar_t *src) : _data(SysAllocString(src)) {}
+ ~BSTR_PTR() { SysFreeString(_data); }
+ size_t length() { return SysStringLen(_data); }
+ operator BSTR () { return _data; }
+};
+
#endif