Quote
isotherm - 2008-03-18 1:15 AM
You would need to create a program which calls the appropriate API's
(in coredll
). As far as I know, there's no way to enable/disable PCMCIA cards with registry editing only. However, on the positive side, such a program could do this for
any PCMCIA/CF device
(not just wireless cards
).
By the way, I haven't tried this on CE.NET
(only CE 3.0
). Maybe it wouldn't work. But as far as the OS is concerned, doing this should be just like if you said "No" to the "Use PCMCIA card while running on battery?" warning. It removes it from the System cpanel applet, for example; as far as the OS is concerned, the card is removed. Hopefully that is enough so that it cuts the power.
You can try it easily enough without writing a full-fledged program; just find the appropriate Hnd value in the registry, as I described above, and then run a program with the following principal line:
DeactivateDevice((HANDLE)0x12345678);
where 12345678 is the hexadecimal handle value you retrieved from the registry.
well i wrote a program that does this, but it only turns the PCMCIA slot off, but the OS still thinks the driver is loaded... the PRISM1 is still in network connections, Storage Card folder is still there,
and i can't reload the driver by reinserting a card... you have to soft reset or run another program that activates it... which i did. but due to the fact the OS didn't fully realize i unloaded the driver previously it then asks me for the wifi card driver name and names the CF card Storage Card2 and Storage Card
(which is invalid
) is still there too.
so what did i do wrong, also, this turns CF off too, maybe not the perfect way to deal with this
EDIT: sorry, i realize now i was accessing the lowlevel pcmcia driver
but the wifi and the CF have their separate drivers too, so this sounds like a perfect solution!
yes, i can now turn the wifi off nicely, while CF is still working.
i'll soon release an app that can turn wifi off / on and maybe CF and full pcmcia too though i don't see a point in those
app already works for me but i want to clean it up etc.
for example, it'll need a way to find your wifi card's pnpid in the registry, because that varies for each wifi card model, until then it won't know what to turn off... what would be the most user friendly way to do that?
for example on first load it could require you to turn the wifi on, then it can look at all active drivers and find something that seems like a pcmcia card's pnpid... maybe. then save that for future use. or the user can input it in an .ini file? any better ideas?
Edited by cmonex 2008-03-21 1:12 AM