Defines | Functions
dn_common.c File Reference
#include "stdint.h"
#include <stdlib.h>
#include <string.h>
#include "dn_common.h"
Include dependency graph for dn_common.c:

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.
SAFEARRAYSafeArrayCreateVector (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 Documentation

#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.


Function Documentation

HRESULT SafeArrayAccessData ( SAFEARRAY psa,
void **  ppvData 
)

Accesses the SAFEARRAY and gets the pointer of array data.

Parameters:
[in]psaSAFEARRAY to be accessed.
[out]ppvDataThe gotten pointer.
Note:
This function must be called before accessing SAFEARRAY data.

Definition at line 336 of file dn_common.c.

SAFEARRAY* SafeArrayCreateVector ( uint16_t  vt,
int32_t  lLbound,
uint32_t  cElements 
)

Allocates and returns SAFEARRAY.

Parameters:
[in]vtVariant type.
[in]lLboundThe lower bound of array. This should be 0.
[in]cElementsThe number of elements.
Note:
If there is no enough memory space, then return NULL.

Definition at line 138 of file dn_common.c.

HRESULT SafeArrayDestroy ( SAFEARRAY psa)

Releases the memory of SAFEARRAY.

Parameters:
[in,out]psaSAFEARRAY to be freed.

Definition at line 212 of file dn_common.c.

Gets and returns the dimension of SAFEARRAY.

Parameters:
[in]psaSAFEARRAY to be gotten.

Definition at line 248 of file dn_common.c.

Gets and returns the size of an element.

Parameters:
[in]psaSAFEARRAY 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.

Parameters:
[in]psaSAFEARRAY to be gotten.
[in]nDimThe target dimension.
[out]plLboundThe 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.

Parameters:
[in]psaSAFEARRAY to be gotten.
[in]nDimThe target dimension.
[out]plUboundThe 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.

Parameters:
[in]psaSAFEARRAY to be gotten.
[out]pvtThe gotten variant type.

Definition at line 318 of file dn_common.c.

HRESULT SafeArrayUnaccessData ( SAFEARRAY psa)

Unaccesses the SAFEARRAY.

Parameters:
[in]psaSAFEARRAY to be unaccessed.
Note:
This function must be called after accessing SAFEARRAY data.

Definition at line 353 of file dn_common.c.

BSTR SysAllocString ( const wchar_t *  sz)

Allocates and returns BSTR.

Parameters:
[in]szUnicode string to be copied. This must be NULL terminated.
Note:
If there is no enough memory space, then return NULL.

Definition at line 61 of file dn_common.c.

BSTR SysAllocStringLen ( const wchar_t *  pch,
uint16_t  cch 
)

Allocates and returns BSTR.

Parameters:
[in]pchUnicode string to be copied. This must be NULL terminated.
[in]cchThe number of characters to be copied.
Note:
If there is no enough memory space, then return NULL.

Definition at line 77 of file dn_common.c.

void SysFreeString ( BSTR  bstr)

Releases the memory of BSTR.

Parameters:
[in,out]bstrUnicode string to be freed.

Definition at line 104 of file dn_common.c.

Gets and returns the number of characters of BSTR.

Parameters:
[in]bstrUnicode 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.

Parameters:
[in,out]pvargVARIANT to be cleared.
Note:
This function must be called before destructing VARIANT.

Definition at line 382 of file dn_common.c.

void VariantInit ( VARIANT pvarg)

Initializes the VARIANT.

Parameters:
[in,out]pvargVARIANT to be initialized.
Note:
This function must be called before accessing VARIANT.

Definition at line 368 of file dn_common.c.



bcap_core
Author(s): DENSO WAVE INCORPORATED
autogenerated on Thu Jun 6 2019 21:00:03