今天试了试,不要以为只有windows程序才能调用系统API哦
Asp.Net也是可以的,嘿嘿[emot]pig[/emot]
只要把需要的Dll文件引进来,然后就可以用API的接口啦
帖个试验成功的例子,获取当前用户名的
Declare Function GetUserName Lib "advapi32.dll" Alias _
"GetUserNameA" (ByVal lpBuffer As String, ByRef nSize As Integer) As Integer

调用方法如下:
Function GetUser()
Dim Ret As Integer
Dim UserName As String
Dim Buffer As String
Buffer = New String(CChar(" "), 25)
Ret = GetUserName(Buffer, 25)
UserName = Left(Buffer, InStr(Buffer, Chr(0)) - 1)
MsgBox(UserName)
End Function

[emot]grin[/emot]很简单吧,不过需要了解API.我还不太懂,不能放出好的例子来

Back