compactframework >> Detecting memory card insertion/removal
by Michael » Tue, 26 Jul 2005 19:54:01 GMT
Hello everyone,
I was wondering if anyone knew of a way to detect a memory card's
insertion and/or removal from a PocketPC 2003? I'm looking for a way to
do this (even with P/Invoke) that doesn't involve me constantly polling
the slot.
Any help would be appreciated.
Thanks in advance,
Michael
------------------------------------
Please replace 'NOSPAM' with 'swiftlist' before replying via email.
Thank you.
compactframework >> Detecting memory card insertion/removal
by Steve Maillet (eMVP) » Tue, 26 Jul 2005 23:15:01 GMT
You can use the RequestDeviceNotifications() API with P/Invoke. Not sure if
the OpenNetCF libraries have anything for that or not.
--
Steve Maillet
EmbeddedFusion
www.EmbeddedFusion.com
smaillet at EmbeddedFusion dot com
compactframework >> Detecting memory card insertion/removal
by Paul G. Tobey [eMVP] » Wed, 27 Jul 2005 01:00:34 GMT
There's nothing present now. However, since the NDIS AdapterStatusMonitor
class already does this basic operation, I'm creating a new
DeviceStatusMonitor class for catching this type of notification. I'll
probably have something in the Vault by the end of the day...
Paul T.
compactframework >> Detecting memory card insertion/removal
by Paul G. Tobey [eMVP] » Wed, 27 Jul 2005 04:18:04 GMT
OK, it's done. To use this, get the new sample, StorageCardMonitor, from
the Samples folder in the Vault. Also, you'll need the latest GuidEx.cs (at
least, if not other things), from the basic OpenNETCF folder and the latest
files from OpenNETCF.Net. The sample shows how to detect insertion and
removal of storage cards.
Paul T.
"Paul G. Tobey [eMVP]" <ptobey no spam AT no instrument no spam DOT com>
compactframework >> Detecting memory card insertion/removal
by Michael » Wed, 27 Jul 2005 10:45:32 GMT
Great! Thanks for the info Steve. I guess I'll have to wait until .NET
v2.0 for the managed version of the notification API.
Ciao,
Michael
--
------------------------------------
Please replace 'NOSPAM' with 'swiftlist' before replying via email.
Thank you.
compactframework >> Detecting memory card insertion/removal
by Michael » Wed, 27 Jul 2005 11:37:13 GMT
Wow! Excellent! Thank you very much Paul. I've looked over the code - it
looks good. I'm going to have to look into the OpenNetCF library though,
as I'm not familiar with it at all.
As a follow-up question: I actually don't have a Pocket PC to test this
code out on yet - is it possible to trigger the event in the emulator
during debug somehow? I mean, am I able to raise device-level events
such as this programmatically, or are they protected in some way (both
with and without the emulator)?
Anyway, thanks again for your help with this. It's my first time posting
here, and my first impression is that you guys are great!
I hope I'll be able to start contributing soon.
Ciao,
Michael
--
------------------------------------
Please replace 'NOSPAM' with 'swiftlist' before replying via email.
Thank you.
compactframework >> Detecting memory card insertion/removal
by Steve Maillet (eMVP) » Wed, 27 Jul 2005 20:13:08 GMT
The emulator allows mounting folders from the host OS into the system and
that will appear as a storage card insertion you can detect.
--
Steve Maillet
EmbeddedFusion
www.EmbeddedFusion.com
smaillet at EmbeddedFusion dot com
Similar Threads
1. How to Detect the insertion/removal of flash card media
I am a developer and a photographer, and I am trying to write a windows
service that can recieve a notification that a compact flash card, or an SD
card has been insterted into a card reader slot. The card reader is a
multi-format (CF/SD/MMC, etc) reader connected to the machine by USB. I want
the service to recieve a notification of the card insertion, so it can grab
the files, read the EXIF/IPTC data, and process the files (cataloging, noise
reduction, other adjustments), etc.
I'm stuck on getting a notification that a media card has been inserted into
a reader. I want this to run as a windows service. Is there a way to do
this?
Thanks,
Joe
2. Detecting memory card/USB device insertion - how to? - .Net Framework
3. expansion card insertion/removal event
Hi,
I'm working on PocketPC application, which receive some reading using PCMCIA
card. I want to enable/disable some part of my application based on the
availability of card. Is there any API which will tell me that user has
inserted/removed the card from expansion slot?
Thanks in advance,
Pankaj
4. Detect insertion and removal of PCMCIA devices - Microsoft .NET Framework
5. Detecting insertion into/removal from cradle.
Are there events that are fired when I insert the handheld into or I remove
it from the cradle?
*OpenNETCF.Desktop.Communication.ActiveSync* class has *Active* (indicates
that a connection is established between
the client application and the connection manager) and *Inactive* (indicates
a disconnection, or disconnected state, between the
desktop computer and the Windows CE-based device) events, but I don't know
if I can use them:
"the OpenNETCF.Desktop.Communication namespace contains classes for working
remotely with devices through ActiveSync and RAPI" so I can use ActiveSync
class on an handheld to detect communication with a PC or only on a PC to
detect communication with the handheld?
Thanks,
Luigi.
6. Need to detect insertion and removal of USB Drive - CSharp/C#
7. Auto-detecting SD card insertion
Hello all,
Can someone point me in the direction to some c# code for auto-detecting
when a user inserts an sd card into a device?
--
Noble D. Bell
www.noblesoftware.com
8. Is it possible to detect storage card insertion?