| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BASE_WIN_SCOPED_VARIANT_H_ | 5 #ifndef BASE_WIN_SCOPED_VARIANT_H_ |
| 6 #define BASE_WIN_SCOPED_VARIANT_H_ | 6 #define BASE_WIN_SCOPED_VARIANT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <windows.h> | 9 #include <windows.h> |
| 10 #include <oleauto.h> | 10 #include <oleauto.h> |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 // This is equivalent to what VariantInit does, but less code. | 31 // This is equivalent to what VariantInit does, but less code. |
| 32 var_.vt = VT_EMPTY; | 32 var_.vt = VT_EMPTY; |
| 33 } | 33 } |
| 34 | 34 |
| 35 // Constructor to create a new VT_BSTR VARIANT. | 35 // Constructor to create a new VT_BSTR VARIANT. |
| 36 // NOTE: Do not pass a BSTR to this constructor expecting ownership to | 36 // NOTE: Do not pass a BSTR to this constructor expecting ownership to |
| 37 // be transferred | 37 // be transferred |
| 38 explicit ScopedVariant(const wchar_t* str); | 38 explicit ScopedVariant(const wchar_t* str); |
| 39 | 39 |
| 40 // Creates a new VT_BSTR variant of a specified length. | 40 // Creates a new VT_BSTR variant of a specified length. |
| 41 explicit ScopedVariant(const wchar_t* str, UINT length); | 41 ScopedVariant(const wchar_t* str, UINT length); |
| 42 | 42 |
| 43 // Creates a new integral type variant and assigns the value to | 43 // Creates a new integral type variant and assigns the value to |
| 44 // VARIANT.lVal (32 bit sized field). | 44 // VARIANT.lVal (32 bit sized field). |
| 45 explicit ScopedVariant(int value, VARTYPE vt = VT_I4); | 45 explicit ScopedVariant(int value, VARTYPE vt = VT_I4); |
| 46 | 46 |
| 47 // Creates a new double-precision type variant. |vt| must be either VT_R8 | 47 // Creates a new double-precision type variant. |vt| must be either VT_R8 |
| 48 // or VT_DATE. | 48 // or VT_DATE. |
| 49 explicit ScopedVariant(double value, VARTYPE vt = VT_R8); | 49 explicit ScopedVariant(double value, VARTYPE vt = VT_R8); |
| 50 | 50 |
| 51 // VT_DISPATCH | 51 // VT_DISPATCH |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 // Use the Compare method instead. | 158 // Use the Compare method instead. |
| 159 bool operator==(const ScopedVariant& var) const; | 159 bool operator==(const ScopedVariant& var) const; |
| 160 bool operator!=(const ScopedVariant& var) const; | 160 bool operator!=(const ScopedVariant& var) const; |
| 161 DISALLOW_COPY_AND_ASSIGN(ScopedVariant); | 161 DISALLOW_COPY_AND_ASSIGN(ScopedVariant); |
| 162 }; | 162 }; |
| 163 | 163 |
| 164 } // namespace win | 164 } // namespace win |
| 165 } // namesoace base | 165 } // namesoace base |
| 166 | 166 |
| 167 #endif // BASE_WIN_SCOPED_VARIANT_H_ | 167 #endif // BASE_WIN_SCOPED_VARIANT_H_ |
| OLD | NEW |