api函数之getwindowsdirectory结果赋给text1.text出错,
Private Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long---------------------------------
Private Sub Command1_Click()
Dim sBuffer,a As String
sBuffer = Space(255)
a=GetWindowsDirectory(sBuffer, 255)
text1.text=a
End Sub
为什么我一运行,出错了,vB整个程序都关掉了,擦,,这是什么意思呢,