使用vb.net 调用dll文件出问题,vb6.0可以用,希望能帮忙解决
1个回答
展开全部
给你个例子
'函数声明
<System.Runtime.InteropServices.DllImport("winmm.dll")> _
Private Shared Function mciSendString(ByVal strCommand As String, ByVal strReturn As StringBuilder, ByVal iReturnLength As Integer, ByVal hwndCallBack As IntPtr) As Long
End Function
'注释:vb6中调用api函数时参数long类型的在vb.net里要改为integer ,调用的时候和vb6一样
'函数声明
<System.Runtime.InteropServices.DllImport("winmm.dll")> _
Private Shared Function mciSendString(ByVal strCommand As String, ByVal strReturn As StringBuilder, ByVal iReturnLength As Integer, ByVal hwndCallBack As IntPtr) As Long
End Function
'注释:vb6中调用api函数时参数long类型的在vb.net里要改为integer ,调用的时候和vb6一样
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询