Click here to Skip to main content
15,921,941 members
Home / Discussions / C#
   

C#

 
GeneralSending Fax Using RightFax.DLL in c#.net Pin
pavan goud30-Dec-04 2:39
pavan goud30-Dec-04 2:39 
GeneralRe: Sending Fax Using RightFax.DLL in c#.net Pin
Heath Stewart30-Dec-04 7:28
protectorHeath Stewart30-Dec-04 7:28 
GeneralRe: Sending Fax Using RightFax.DLL in c#.net Pin
Kotte_SDS23-Sep-11 5:48
Kotte_SDS23-Sep-11 5:48 
GeneralI am unable to handle POST method. Response required as soon as possible. Pin
Mohammed Aijaz Mohiuddin30-Dec-04 1:21
Mohammed Aijaz Mohiuddin30-Dec-04 1:21 
GeneralRe: I am unable to handle POST method. Response required as soon as possible. Pin
Nick Parker30-Dec-04 2:43
protectorNick Parker30-Dec-04 2:43 
GeneralRe: I am unable to handle POST method. Response required as soon as possible. Pin
Heath Stewart30-Dec-04 7:11
protectorHeath Stewart30-Dec-04 7:11 
GeneralFinding if a Pocket PC is attached to desktop via usb Pin
yetanotherchris29-Dec-04 23:05
yetanotherchris29-Dec-04 23:05 
GeneralRe: Finding if a Pocket PC is attached to desktop via usb Pin
Heath Stewart30-Dec-04 7:02
protectorHeath Stewart30-Dec-04 7:02 
smallguy78 wrote:
This will probably remain unanswered

That's a rather negative way to start off a question. Fortunately some of us like research.

There are several ways documented in the ActiveSync APIs, from getting notified of connection to querying for a device ID, which I've coded below:
using System;
using System.Runtime.InteropServices;
 
class DetectDevice
{
  static void Main()
  {
    int id = CeGetDeviceId();
    if (id == 0)
      Console.WriteLine("Device not connected.");
    else if (id == -1)
      Console.WriteLine("Quest device connected.");
    else
      Console.WriteLine("Device ID: " + id);
  }
 
  [DllImport("ceutil.dll")]
  static extern int CeGetDeviceId();
}
Unfortunately I'm not able to test this, but it should work. This morning I decided to leave my iPAQ at home thinking I wouldn't need it, but figuring that if I didn't take it I'd probably need it. I guess I did.

Let me know if this works, though. There are a number of other ways, but this way seems to be the easiest.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralRe: Finding if a Pocket PC is attached to desktop via usb Pin
Nick Parker30-Dec-04 7:19
protectorNick Parker30-Dec-04 7:19 
GeneralPocket PC Apllication Pin
vksrisridhar29-Dec-04 23:04
vksrisridhar29-Dec-04 23:04 
GeneralPocket PC Application. Pin
vksrisridhar29-Dec-04 23:03
vksrisridhar29-Dec-04 23:03 
GeneralRe: Pocket PC Application. Pin
Heath Stewart30-Dec-04 6:33
protectorHeath Stewart30-Dec-04 6:33 
GeneralRe: Pocket PC Application. Pin
vksrisridhar30-Dec-04 17:09
vksrisridhar30-Dec-04 17:09 
GeneralRe: Pocket PC Application. Pin
vksrisridhar30-Dec-04 17:44
vksrisridhar30-Dec-04 17:44 
GeneralRe: Pocket PC Application. Pin
Heath Stewart30-Dec-04 19:53
protectorHeath Stewart30-Dec-04 19:53 
GeneralRe: Pocket PC Application. Pin
vksrisridhar30-Dec-04 21:10
vksrisridhar30-Dec-04 21:10 
GeneralRe: Pocket PC Application. Pin
Heath Stewart31-Dec-04 6:00
protectorHeath Stewart31-Dec-04 6:00 
GeneralPocket PC Application. Pin
vksrisridhar2-Jan-05 17:57
vksrisridhar2-Jan-05 17:57 
Questionhow to calculate factorial of # >170 Pin
asmyan29-Dec-04 22:52
asmyan29-Dec-04 22:52 
AnswerRe: how to calculate factorial of # >170 Pin
Nick Parker30-Dec-04 2:53
protectorNick Parker30-Dec-04 2:53 
GeneralRe: how to calculate factorial of # >170 Pin
asmyan30-Dec-04 7:42
asmyan30-Dec-04 7:42 
AnswerRe: how to calculate factorial of # >170 Pin
WDI30-Dec-04 22:51
WDI30-Dec-04 22:51 
Questionhow to calculate factorial of # >170 Pin
asmyan29-Dec-04 22:52
asmyan29-Dec-04 22:52 
AnswerRe: how to calculate factorial of # >170 Pin
leppie29-Dec-04 23:11
leppie29-Dec-04 23:11 
GeneralRe: how to calculate factorial of # >170 Pin
DavidNohejl30-Dec-04 5:29
DavidNohejl30-Dec-04 5:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.