anishpeter Level: Protégé
 Registered: 16-02-2005 Posts: 6
|
Auto Detection of external device
Hi...,
I am doing a project where i require to detect a pocket pc when it is connected. i have got a code from msdn which searches for the external device provided active sync is running. my program does not require active sync. i am using com port for the transfers ( no activ sync runing ). but the code will launch active sync. can any one help me to change the notification flag to rs 232 detect and help me with this code where i want active sync to be killed as soon as the program detects the presence of the pocket pc and give the com port for my original program for full access. i am sendingthe code ui already have....... pls someone help me urgent..........
Option Explicit
Private Declare Function CeGetDeviceId Lib "ceutil" () As Long
Private Sub Command1_Click()
' Look if there is a device connected
Dim idDvc&
idDvc& = CeGetDeviceId()
If idDvc& = 0 Then
MsgBox " No device connected"
Exit Sub
End If
End Sub
For the PPC:
Please read the article here : http://support.microsoft.com/default.aspx?scid=KB%3BEN-US%3BQ276556&
|