|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Opening cd-drawer remotely
hello, i have a snippet of code here that i will show you, it simply allows a user to click a button to open the CD Drawer and another button to close, however i have been asked if i could get this feature to work across a network, but as networks are the abyss to me i would apreciate any hints or help that could be provided.
thanks alot in advance John Wesley Code: Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long Private Sub cmdOpen_Click() Dim lngReturn As Long Dim strReturn As Long lngReturn = mciSendString("set CDAudio door open", strReturn, 127, 0) End Sub Private Sub cmdClose_Click() Dim lngReturn As Long Dim strReturn As Long lngReturn = mciSendString("set CDAudio door closed", strReturn, 127, 0) End Sub |
|
#2
|
|||
|
|||
|
The problem with remote devices is that such routines doesn't work, because it works on the device that is connected to the CPU that is running such program (local devices).
If you want to do in another machine, the machine must wait for the order in a daemon, recident program or running program, the way to make the daemon execute such order can be with a file put by the other machine in a specific place, so the daemon will know that an order has arrived and execute such code locally. ![]() |
|
#3
|
|||
|
|||
|
Quote:
Is There any chance of an example that i could maybe work on with this, i understand exactly what your saying but with limited capabilities im at a loose end, as i say an example that i could re-do myself would be appreciated and a great learning curve in my experience. thanks Sor Far |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Opening cd-drawer remotely |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|