Hi,

A short time ago, I asked a question in this newsgroup about
writing a device driver. It is:
--
Hi,
I would like to write a program:
In Windows Explorer, after drag&drop a file to
a pre-defined drive letter (for example F:) the file
should be sent through the COM port to an
external device(digital satellite receiver).
Where should I start?
Do I have to write a device driver?
--

I was told that writing a device driver
is not neccessary and a Shell Namespace Extension with a
drag&drop handler can do the job. I had a short look at MSDN about
Creating a Shell Namespace Extension.
Now, I'm asking my question more clearly.

My scenario is:
As soon as the user attaches the RS-232 cable to the computer (at the other
end it is attached to the RS-232 port present on the external device) a
drive
letter F: should appear in Windows Explorer automaticly(like in digital
cameras)
and when the user drag&drops a file to F: the file should be sent through
the
COM port to the external device.

So, can Shell Namespace Extension provide what I need? I'm going to execute
my program with Shell Namespace Extension only once, then restart the
computer.
Now, may I expect to see the drive letter F: in Windows Explorer if I attach
the
RS-232 cable to the computer? Will it disappear if I detach the cable?

About the other case (displaying the drive letter F: automaticly is not
necessary, it
may always be visible, it will not be influenced from attaching and
detaching the cable):
I'll execute my program with Shell Namespace Extension. I'll see the
drive letter F: in Windows Explorer, then I can transfer the file to the
external
device. What will happen if I restart the computer? Will the drive letter F:
remain
in Windows Explorer?

Thanks...

Re: Shell Namespace vs. Device Driver by Doron

Doron
Sat Apr 23 10:50:01 CDT 2005

typically name space extensions stick around after a reboot. serial ports
do not have plug in detection built into them. there is a serial
enumeration protocol to find devices attached, but that is not run
repeatedly, only when asked to. in your case, it doesn't matter anyways b/c
that protocol will enumerate a driver (asssuming your satellite dish
implements the protocol, which I highly doubt).

can you detect the device being attached / detached if you have the serial
port open? if you can't, then your namespace extension has to be present
the entire time and you must always attempt to write the file...
d


--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"Umut Ozden" <umut_ozden@yahoo.com> wrote in message
news:eg9dsBBSFHA.3052@TK2MSFTNGP09.phx.gbl...
> Hi,
>
> A short time ago, I asked a question in this newsgroup about
> writing a device driver. It is:
> --
> Hi,
> I would like to write a program:
> In Windows Explorer, after drag&drop a file to
> a pre-defined drive letter (for example F:) the file
> should be sent through the COM port to an
> external device(digital satellite receiver).
> Where should I start?
> Do I have to write a device driver?
> --
>
> I was told that writing a device driver
> is not neccessary and a Shell Namespace Extension with a
> drag&drop handler can do the job. I had a short look at MSDN about
> Creating a Shell Namespace Extension.
> Now, I'm asking my question more clearly.
>
> My scenario is:
> As soon as the user attaches the RS-232 cable to the computer (at the
> other
> end it is attached to the RS-232 port present on the external device) a
> drive
> letter F: should appear in Windows Explorer automaticly(like in digital
> cameras)
> and when the user drag&drops a file to F: the file should be sent through
> the
> COM port to the external device.
>
> So, can Shell Namespace Extension provide what I need? I'm going to
> execute
> my program with Shell Namespace Extension only once, then restart the
> computer.
> Now, may I expect to see the drive letter F: in Windows Explorer if I
> attach
> the
> RS-232 cable to the computer? Will it disappear if I detach the cable?
>
> About the other case (displaying the drive letter F: automaticly is not
> necessary, it
> may always be visible, it will not be influenced from attaching and
> detaching the cable):
> I'll execute my program with Shell Namespace Extension. I'll see the
> drive letter F: in Windows Explorer, then I can transfer the file to the
> external
> device. What will happen if I restart the computer? Will the drive letter
> F:
> remain
> in Windows Explorer?
>
> Thanks...
>
>
>
>
>



Re: Shell Namespace vs. Device Driver by Maxim

Maxim
Sat Apr 23 19:02:20 CDT 2005

> I would like to write a program:
> In Windows Explorer, after drag&drop a file to
> a pre-defined drive letter (for example F:) the file
> should be sent through the COM port to an
> external device(digital satellite receiver).
> Where should I start?
> Do I have to write a device driver?

No. Write the shell extension, something similar to Pocket PC's ActiveSync.

> As soon as the user attaches the RS-232 cable to the computer (at the other
> end it is attached to the RS-232 port present on the external device) a
> drive
> letter F: should appear in Windows Explorer automaticly(like in digital

No need in drive letters for this. Just add the "Digital Satellite Device" name
there and the folder hierarchy under it with the drag-and-drop handlers which
will implement copy/paste and "dragging a file" semantics. Look at ActiveSync,
how it implements the similar function of transferring the files across the PC
and the Pocket PC.

> Now, may I expect to see the drive letter F: in Windows Explorer if I attach
> the
> RS-232 cable to the computer? Will it disappear if I detach the cable?

No need in drive letters. Shell extension can add any name with any icon to My
Computer. More so - shell extension is not a real filesystem, so, using a drive
letter to it is extremely stupid and confusing. Shell extension must have
strong visual difference from the filesystem.

Also. You can do it in a way so that the shell extension is always present, but
just shows the empty folder hierarchy if the hardware is not attached.
ActiveSync works this way.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com



Re: Shell Namespace vs. Device Driver by Umut

Umut
Mon Apr 25 08:35:25 CDT 2005

> typically name space extensions stick around after a reboot.

stick around??? I've looked up in a dictionary for this phrase
and understood that the folder which Shell Namespace extension
create will remain after a reboot,but I'm not sure. Am I correct?


serial ports
> do not have plug in detection built into them. there is a serial
> enumeration protocol to find devices attached, but that is not run
> repeatedly, only when asked to. in your case, it doesn't matter anyways
b/c
> that protocol will enumerate a driver (asssuming your satellite dish
> implements the protocol, which I highly doubt).

Sorry, what is "b/c"?

About "satellite dish", I'm not communicating with the dish, I'm
communicating
with the satellite receiver, known as Set Top Box.

> can you detect the device being attached / detached if you have the serial
> port open? if you can't, then your namespace extension has to be present
> the entire time and you must always attempt to write the file...

We have already written a program. The protocol between satellite receiver
and computer
used to be the XModem protocol. Then we've changed it a bit. After executing
the program in PC, it sends a handshaking string to the satellite receiver
every 1000msec.
At the other end the satellite receiver reads a string every 1000msec.
If the receiver recognizes this string it sends a reply to the PC. If the PC
gets the reply both the satellite
receiver and the PC go to the "connected" state. In "connected" state they
continue to
communicate every 3000msec. In "connected" state, if the PC cannot read the
reply
they go back to the "not connected" state. So, I can detect the RS-232 cable
being attached
and detached. Currently, we use a button "Send Data" which is present on the
main form of our
application which runs on the PC. After clicking button "Send Data" the PC
sends another short
string to the satellite. Then, the task which runs on the satellite receiver
recognizes this string and
starts reading data, there is no need to press some buttons on the satellite
receiver side.

Umut





Re: Shell Namespace vs. Device Driver by Doron

Doron
Mon Apr 25 10:49:04 CDT 2005

stick around == the extension will remain running after a reboot (so yes,
you are correct)
b/c == because

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"Umut Ozden" <umut_ozden@yahoo.com> wrote in message
news:eCZVruZSFHA.1452@TK2MSFTNGP10.phx.gbl...
>> typically name space extensions stick around after a reboot.
>
> stick around??? I've looked up in a dictionary for this phrase
> and understood that the folder which Shell Namespace extension
> create will remain after a reboot,but I'm not sure. Am I correct?
>
>
> serial ports
>> do not have plug in detection built into them. there is a serial
>> enumeration protocol to find devices attached, but that is not run
>> repeatedly, only when asked to. in your case, it doesn't matter anyways
> b/c
>> that protocol will enumerate a driver (asssuming your satellite dish
>> implements the protocol, which I highly doubt).
>
> Sorry, what is "b/c"?
>
> About "satellite dish", I'm not communicating with the dish, I'm
> communicating
> with the satellite receiver, known as Set Top Box.
>
>> can you detect the device being attached / detached if you have the
>> serial
>> port open? if you can't, then your namespace extension has to be present
>> the entire time and you must always attempt to write the file...
>
> We have already written a program. The protocol between satellite receiver
> and computer
> used to be the XModem protocol. Then we've changed it a bit. After
> executing
> the program in PC, it sends a handshaking string to the satellite receiver
> every 1000msec.
> At the other end the satellite receiver reads a string every 1000msec.
> If the receiver recognizes this string it sends a reply to the PC. If the
> PC
> gets the reply both the satellite
> receiver and the PC go to the "connected" state. In "connected" state they
> continue to
> communicate every 3000msec. In "connected" state, if the PC cannot read
> the
> reply
> they go back to the "not connected" state. So, I can detect the RS-232
> cable
> being attached
> and detached. Currently, we use a button "Send Data" which is present on
> the
> main form of our
> application which runs on the PC. After clicking button "Send Data" the PC
> sends another short
> string to the satellite. Then, the task which runs on the satellite
> receiver
> recognizes this string and
> starts reading data, there is no need to press some buttons on the
> satellite
> receiver side.
>
> Umut
>
>
>
>



Re: Shell Namespace vs. Device Driver by Umut

Umut
Mon Apr 25 12:40:30 CDT 2005

> stick around == the extension will remain running after a reboot (so yes,
> you are correct)

Then I will start writing the Shell Namespace extension, thanks.

Umut