未分类--Windows API--SysAllocString

150 篇文章 0 订阅
31 篇文章 0 订阅

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

 

Platform Builder for Microsoft Windows CE 5.0   

SysAllocString

This function allocates a new string and copies the passed string into it.
这个函数申请一个新的字符串并且拷贝传入的字符串到它里面。
This function returns null if there is insufficient memory or if a null pointer is passed in.
如果不足内存或如果一个空指针传入则这个函数返回null。
BSTR SysAllocString(
  OLECHAR FAR* sz
);
Parameters
sz
[in] Null-terminated string to copy.
空结束字符串去拷贝。
The string must be a Unicode string in 32-bit applications, and an ANSI string in 16-bit applications.
这个字符在32位应用程序中必须是Unicode字符串,在16位应用程序中必须是ANSI字符串。
Return Values
Returns the allocated string to indicate success, or NULL to indicate that insufficient memory exists or that the sz parameter was NULL.
返回分配的字符串指示成功,或者用NULL指示内存存在不足或sz参数是NULL。
Remarks
Windows CE supports only Unicode strings.
Windows CE只支持Unicode字符串。
Passing invalid (and under some circumstances NULL) pointers to this function causes an unexpected termination of the application.
传入无效的(在某些情况下NULL)指针到这个函数引起意外的程序终止。
You can free strings created with SysAllocString using SysFreeString.
你可以用 SysFreeString释放SysAllocString创建的字符串。
Requirements
OS Versions: Windows CE 2.0 and later.
Header: Oleauto.h.
Link Library: Oleaut32.lib.

See Also
Automation Functions | SysFreeString

 


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

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、付费专栏及课程。

余额充值