PC Review


Reply
Thread Tools Rate Thread

Cradle Detect - NO ActiveSync, no internet

 
 
Andrew Martin
Guest
Posts: n/a
 
      11th Nov 2003
I've read through pages of solutions for detecting the cradle, but in
my case, we are not using ActiveSync nor are we on a network with a
webserver. For this enterprise app, we have a series of Intermec
devices with ethernet cradles. What I want to do is detect when the
device is physically in the cradle to allow the application to attempt
an FTP connection to our remote file store.

I can check the IP, but it caches the connected IP for a while after I
pull it out of the cradle which is no good either.

Currently, or connection detection logic opens and closes an FTP
session which seems foolish and slow. This is the best I have so far,
but not very compelling a workaround:


private const int NOTIFICATION_EVENT_NONE = 0;
private const int NOTIFICATION_EVENT_TIME_CHANGE = 1;
private const int NOTIFICATION_EVENT_SYNC_END = 2;
private const int NOTIFICATION_EVENT_ON_AC_POWER = 3;
private const int NOTIFICATION_EVENT_OFF_AC_POWER = 4;
private const int NOTIFICATION_EVENT_NET_CONNECT = 5;
private const int NOTIFICATION_EVENT_NET_DISCONNECT = 6;
private const int NOTIFICATION_EVENT_DEVICE_CHANGE = 7;
private const int NOTIFICATION_EVENT_IR_DISCOVERED = 8;
private const int NOTIFICATION_EVENT_RS232_DETECTED = 9;
private const int NOTIFICATION_EVENT_RESTORE_END = 10;
private const int NOTIFICATION_EVENT_WAKEUP = 11;
private const int NOTIFICATION_EVENT_TZ_CHANGE = 12;

[System.Runtime.InteropServices.DllImport ("coredll.dll")]
public static extern long CeRunAppAtEvent(string AppName, int
WhichEvent);

private void SetNotification()
{
long r;

r = CeRunAppAtEvent(@"\Program Files\Temp\hack.exe",
NOTIFICATION_EVENT_NONE);
r = CeRunAppAtEvent(@"\Program Files\Temp\hack.exe",
NOTIFICATION_EVENT_RS232_DETECTED);
}
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Detect ActiveSync =?Utf-8?B?TWljaGFsIFJpemVr?= Microsoft C# .NET 0 29th Oct 2007 12:51 PM
Detect if activesync is installed is on PC Darren Coleman Microsoft Dot NET Compact Framework 1 28th Apr 2005 09:03 PM
Detect ActiveSync connection or internet connection Mike Microsoft Dot NET Compact Framework 1 4th Jun 2004 10:41 PM
Detect Cradle state Mike Microsoft Dot NET Compact Framework 1 22nd Aug 2003 06:23 PM
Direct Connection and Deploying Over TCP (USB Cradle and ActiveSync) Kai Microsoft Dot NET Compact Framework 0 28th Jul 2003 11:30 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:33 AM.