VB编程高手来帮帮忙 100
我准备用winsock控件实现远程连接~~然后实现远程控制~~~现在我能连接了~~但是控制方面的代码我不会~~请教下大家~~如果我要对远程机实现远程"关机","注销"和"...
我准备用winsock控件实现远程连接~~然后实现远程控制~~~现在我能连接了~~但是控制方面的代码我不会~~请教下大家~~如果我要对远程机实现远程"关机","注销"和"重启"操作~~~我应该怎麼写代码呢?能详细一点说明下吗?我是新手~~~~
我一操作就出现找不到user32接入点的错误~这是什麽原因呢?能附上API函数吗?
附上我的API代码吧
Public Declare Function ExitWindow Lib "user32" Alias "ExitWindowA" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
Public Const EWX_LOGOFF = 0
Public Const EWX_REBOOT = 2
Public Const EWX_SHUTDOWN = 1
Public Declare Function ClipCursor Lib "user32" Alias "ClipCursor" (lpRect As Any) As Long
Public Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
大家看看有什麽问题~~为什麽会显示找不到ExitWindowA在user32的接入点呢? 展开
我一操作就出现找不到user32接入点的错误~这是什麽原因呢?能附上API函数吗?
附上我的API代码吧
Public Declare Function ExitWindow Lib "user32" Alias "ExitWindowA" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
Public Const EWX_LOGOFF = 0
Public Const EWX_REBOOT = 2
Public Const EWX_SHUTDOWN = 1
Public Declare Function ClipCursor Lib "user32" Alias "ClipCursor" (lpRect As Any) As Long
Public Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
大家看看有什麽问题~~为什麽会显示找不到ExitWindowA在user32的接入点呢? 展开
1个回答
展开全部
思路很简单,就是你的PC和远程机上分别得有socket通信程序.双方建立连接后,这边发送指令,那边解析指令,调用Windows API,分别执行 关机/注销/重启 等动作.
通信的指令协议,由你的程序决定.
针对你的补充问题,需要修改ExitWindow的声明为:
Declare Function ExitWindow Lib "user32" Alias "ExitWindowsEx" (ByVal _
dwReserved As Long, ByVal uReturnCode As Long) As Long
原因嘛,要与时俱进呵。
通信的指令协议,由你的程序决定.
针对你的补充问题,需要修改ExitWindow的声明为:
Declare Function ExitWindow Lib "user32" Alias "ExitWindowsEx" (ByVal _
dwReserved As Long, ByVal uReturnCode As Long) As Long
原因嘛,要与时俱进呵。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询