SafeArray--Windows API--SafeArrayGetLBound

150 篇文章 0 订阅
3 篇文章 0 订阅

原文来自MSDN Library for Visual Studio 2008 SP1,翻译部分仅为个人观点,想要看更多信息请看MSDN,如有版权问题请联系QQ 643166601,邮件643166601@qq.com

 

Platform Builder for Microsoft Windows CE 5.0   

SafeArrayGetLBound

This function retrieves the lower bound for any dimension of a safearray.
这个函数取回任何一个safearray维数的下界。
HRESULT SafeArrayGetLBound(
  SAFEARRAY FAR* psa,
  unsigned int nDim,
  long FAR* plLbound
);
Parameters
psa
[in] Pointer to an array descriptor created by SafeArrayCreate.
指针指向一个由SafeArrayCreate创建的一个数组描述符。
nDim
[in] Specifies the array dimension to get the lower bound for.
指定数组维数去获得下界。
plLbound
[out] Pointer to the location to return the lower bound.
指针指向的位置去返回下界。
Return Values
Returns the HRESULT values shown in the following table.
返回的HRESULT值展示在下表。
Value Description
S_OK
Success.
成功。
DISP_E_BADINDEX
The specified index is out of bounds.
指定的索引超出范围。
E_INVALIDARG
An argument is invalid. 
一个无效的说法。
Remarks
Passing invalid (and under some circumstances NULL) pointers to this function causes an unexpected termination of the application.
传入无效的(在某些情况下NULL)指针到这个函数引起意外的程序终止。
Example
HRESULT
CEnumPoint::Create(SAFEARRAY FAR* psa, CEnumPoint FAR* FAR* ppenum)
{
  long lBound;
  HRESULT hresult;
  CEnumPoint FAR* penum;

  // Verify that the SafeArray is the proper shape.
  HRESULT = SafeArrayGetLBound(psa, 1, &lBound);
  if(FAILED(hresult))
    return hresult;

  // Code omitted here for brevity.

}
Requirements
OS Versions: Windows CE 2.0 and later.
Header: Oleauto.h.
Link Library: Oleaut32.lib.

See Also
Automation Functions | SafeArrayCreate

 


--------------------------------------------------------------------------------

Last updated on Wednesday, September 14, 2005

© 2005 Microsoft Corporation. All rights reserved.

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值