Go to the source code of this file.
Defines | |
#define | _LEN_VARIANT2BSTR (500) |
A definition for the string length for converting VARIANT to BSTR. | |
Functions | |
HRESULT | SafeArrayAccessData (SAFEARRAY *psa, void **ppvData) |
Accesses the SAFEARRAY and gets the pointer of array data. | |
SAFEARRAY * | SafeArrayCreateVector (uint16_t vt, int32_t lLbound, uint32_t cElements) |
Allocates and returns SAFEARRAY. | |
HRESULT | SafeArrayDestroy (SAFEARRAY *psa) |
Releases the memory of SAFEARRAY. | |
uint16_t | SafeArrayGetDim (SAFEARRAY *psa) |
Gets and returns the dimension of SAFEARRAY. | |
uint32_t | SafeArrayGetElemsize (SAFEARRAY *psa) |
Gets and returns the size of an element. | |
HRESULT | SafeArrayGetLBound (SAFEARRAY *psa, uint16_t nDim, int32_t *plLbound) |
Gets the lower bound of SAFEARRAY. | |
HRESULT | SafeArrayGetUBound (SAFEARRAY *psa, uint16_t nDim, int32_t *plUbound) |
Gets the upper bound of SAFEARRAY. | |
HRESULT | SafeArrayGetVartype (SAFEARRAY *psa, uint16_t *pvt) |
Gets the variant type of SAFEARRAY. | |
HRESULT | SafeArrayUnaccessData (SAFEARRAY *psa) |
Unaccesses the SAFEARRAY. | |
BSTR | SysAllocString (const wchar_t *sz) |
Allocates and returns BSTR. | |
BSTR | SysAllocStringLen (const wchar_t *pch, uint16_t cch) |
Allocates and returns BSTR. | |
void | SysFreeString (BSTR bstr) |
Releases the memory of BSTR. | |
uint16_t | SysStringLen (BSTR bstr) |
Gets and returns the number of characters of BSTR. | |
void | VariantClear (VARIANT *pvarg) |
Clears the VARIANT. | |
void | VariantInit (VARIANT *pvarg) |
Initializes the VARIANT. |
#define _LEN_VARIANT2BSTR (500) |
A definition for the string length for converting VARIANT to BSTR.
Software License Agreement (MIT License)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Definition at line 50 of file dn_common.c.
HRESULT SafeArrayAccessData | ( | SAFEARRAY * | psa, |
void ** | ppvData | ||
) |
Accesses the SAFEARRAY and gets the pointer of array data.
[in] | psa | SAFEARRAY to be accessed. |
[out] | ppvData | The gotten pointer. |
Definition at line 336 of file dn_common.c.
SAFEARRAY* SafeArrayCreateVector | ( | uint16_t | vt, |
int32_t | lLbound, | ||
uint32_t | cElements | ||
) |
Allocates and returns SAFEARRAY.
[in] | vt | Variant type. |
[in] | lLbound | The lower bound of array. This should be 0. |
[in] | cElements | The number of elements. |
Definition at line 138 of file dn_common.c.
HRESULT SafeArrayDestroy | ( | SAFEARRAY * | psa | ) |
Releases the memory of SAFEARRAY.
[in,out] | psa | SAFEARRAY to be freed. |
Definition at line 212 of file dn_common.c.
uint16_t SafeArrayGetDim | ( | SAFEARRAY * | psa | ) |
Gets and returns the dimension of SAFEARRAY.
[in] | psa | SAFEARRAY to be gotten. |
Definition at line 248 of file dn_common.c.
uint32_t SafeArrayGetElemsize | ( | SAFEARRAY * | psa | ) |
Gets and returns the size of an element.
[in] | psa | SAFEARRAY to be gotten. |
Definition at line 262 of file dn_common.c.
HRESULT SafeArrayGetLBound | ( | SAFEARRAY * | psa, |
uint16_t | nDim, | ||
int32_t * | plLbound | ||
) |
Gets the lower bound of SAFEARRAY.
[in] | psa | SAFEARRAY to be gotten. |
[in] | nDim | The target dimension. |
[out] | plLbound | The gotten lower bound. |
Definition at line 278 of file dn_common.c.
HRESULT SafeArrayGetUBound | ( | SAFEARRAY * | psa, |
uint16_t | nDim, | ||
int32_t * | plUbound | ||
) |
Gets the upper bound of SAFEARRAY.
[in] | psa | SAFEARRAY to be gotten. |
[in] | nDim | The target dimension. |
[out] | plUbound | The gotten upper bound. |
Definition at line 298 of file dn_common.c.
HRESULT SafeArrayGetVartype | ( | SAFEARRAY * | psa, |
uint16_t * | pvt | ||
) |
Gets the variant type of SAFEARRAY.
[in] | psa | SAFEARRAY to be gotten. |
[out] | pvt | The gotten variant type. |
Definition at line 318 of file dn_common.c.
HRESULT SafeArrayUnaccessData | ( | SAFEARRAY * | psa | ) |
Unaccesses the SAFEARRAY.
[in] | psa | SAFEARRAY to be unaccessed. |
Definition at line 353 of file dn_common.c.
BSTR SysAllocString | ( | const wchar_t * | sz | ) |
Allocates and returns BSTR.
[in] | sz | Unicode string to be copied. This must be NULL terminated. |
Definition at line 61 of file dn_common.c.
BSTR SysAllocStringLen | ( | const wchar_t * | pch, |
uint16_t | cch | ||
) |
Allocates and returns BSTR.
[in] | pch | Unicode string to be copied. This must be NULL terminated. |
[in] | cch | The number of characters to be copied. |
Definition at line 77 of file dn_common.c.
void SysFreeString | ( | BSTR | bstr | ) |
Releases the memory of BSTR.
[in,out] | bstr | Unicode string to be freed. |
Definition at line 104 of file dn_common.c.
uint16_t SysStringLen | ( | BSTR | bstr | ) |
Gets and returns the number of characters of BSTR.
[in] | bstr | Unicode string to be gotten. This must be NULL terminated. |
Definition at line 118 of file dn_common.c.
void VariantClear | ( | VARIANT * | pvarg | ) |
Clears the VARIANT.
[in,out] | pvarg | VARIANT to be cleared. |
Definition at line 382 of file dn_common.c.
void VariantInit | ( | VARIANT * | pvarg | ) |
Initializes the VARIANT.
[in,out] | pvarg | VARIANT to be initialized. |
Definition at line 368 of file dn_common.c.