怎么调用API?

coolbye 2003-06-17 05:43:22
ZeroMemory(lpDest as Any, byval nNum as Long)

Dim a(1) as Byte
ZeroMemory a(0), 1

执行后非法操作,不知要怎么用
Any要怎么调
...全文
59 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
coolbye 2003-06-17
  • 打赏
  • 举报
回复
astring = "A"
不是已经有一个字节的空间吗?
of123 2003-06-17
  • 打赏
  • 举报
回复
Dim strTmp As String * 256
ZeroMemory strTmp, Len(strTmp)
coolbye 2003-06-17
  • 打赏
  • 举报
回复
我这样
dim astring as string
astring = "A"
ZeroMemory byval astring, len(astring)

也不行,错在哪
of123 2003-06-17
  • 打赏
  • 举报
回复
Public Declare Sub ZeroMemory Lib "KERNEL32" Alias "RtlMoveMemory" (dest As Any, ByVal numBytes As Long)

Dim CurrChars(0 To 255) As Byte
Call ZeroMemory(CurrChars(0), 256 * Len(CurrChars(0)))
rappercn 2003-06-17
  • 打赏
  • 举报
回复
Private Declare Sub FillMemory Lib "kernel32.dll" Alias "RtlFillMemory" (Destination As Any, ByVal Length As Long, ByVal Fill As Byte)
Private Declare Sub ZeroMemory Lib "kernel32.dll" Alias "RtlZeroMemory" (Destination As Any, ByVal Length As Long)
Private Sub Form_Load()
Dim TestString As String
'Mak sure Visual Basic repaint the form automatically
Me.AutoRedraw = True
'Create a buffer string
TestString = String(25, "X")
Me.Print "This is our initial string: " + TestString
'Fill the buffer-string with A's
FillMemory ByVal TestString, Len(TestString), Asc("A")
Me.Print "This is our string after FillMemory: " + TestString
'Empty the string
ZeroMemory ByVal TestString, Len(TestString)
Me.Print "This is our string after ZeroMemory: " + TestString
End Sub
本次更新内容主要是BUG修复和功能改进,相隔4个月又发布了新版本,这次更新更像是例行公事,不过好在修复了很多BUG,另外需要说一下,EasyUI框架当中其实官方还隐藏了不少API没有开放出来,有些朋友建议我把整理一下,将一些好用的API及其用法也更新到中文API中,这里我想说的是,有些API或许是因为不稳定、尚有BUG、未完全实现或者是未经过完整测试的,所以官方并未公布出来,因此我也不建议大家大面积的去使用,这样会带来很多不稳定因素,甚至是致命的BUG,这也是我没有将这些API写入中文API文档的原因,所以有能力并且需要的人就自行去源代码中挖掘吧,我这里只同步官网的API(外加少许的变动或者不影响稳定性和安全性的新增内容)。 jQuery EasyUI 1.4.4版本更新内容: Bug(修复) filebox:修复“clear”和“reset”方法在IE9下无法正常工作的问题; messager:修复调用无参的$.messager.progress()方法之后,再调用$.messager.progress('close')方法时无法正常工作的问题; timespinner:修复在IE8中点击微调按钮时无法正确显示值的问题; window:修复在“onMove”事件中调用“options”方法时无法正常显示的问题; treegrid:修复“getLevel”方法无法接受为0的参数值的问题。 Improvement(改进) layout:改进后的“collapsedContent”、“expandMode”和“hideExpandTool”属性可以支持区域面板; layout:改进后的“hideCollapsedContent”属性可以在折叠面板上设置显示垂直标题栏; layout:新增“onCollapse”、“onExpand”、“onAdd”、“onRemove”事件; datagrid:在排序列的标题上显示↑↓图标; datagrid:新增“gotoPage”方法; propertygrid:新增“groups”方法,以允许获取所有数据租; messager:在显示长消息的的时候支持对消息进行自动滚动; tabs:“disabled”属性支持定义一个被禁用的选项卡面板; tabs:支持百分比大小。

1,488

社区成员

发帖
与我相关
我的任务
社区描述
VB API
社区管理员
  • API
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧