Discussion:
virtual channels
(too old to reply)
Darren Brook
2006-06-04 00:53:20 UTC
Permalink
Does anyone know of anywhere that I can view code examples of how to use
VirtualChannels successfully with Visual Basic 6 (VB6)?

I have a VB app on one machine (running XP Pro) that starts a msrdp RDP
session with a server machine (Windows 2000 AS). When it starts the RDP
session, it also launches another VB application on the server.

But once launched, I need to send a message to the application from the
calling machine.

I think that Virtual Channels may allow me to do this but unsure?

And also unsure if possible with VB or how!? Can't seem to find any code
examples.

Can anyone offer any help or advice.

Many thanks,
Darren
ThomasT.
2006-06-04 12:59:45 UTC
Permalink
Hi,

On the server side you can use VB6 without any problem.
On the client side, if you wrap the MSRDP.OCX with VB6, you can capture
event for virtual channel , this is the easiest way. Or you have to use C++
to develop
your own virtual drivers on the client side .

Document about Virtual Channel functions is here:

http://msdn.microsoft.com/library/en-us/termserv/termserv/using_terminal_services_virtual_channels.asp?frame=true


Good luck

ThomasT
Post by Darren Brook
Does anyone know of anywhere that I can view code examples of how to use
VirtualChannels successfully with Visual Basic 6 (VB6)?
I have a VB app on one machine (running XP Pro) that starts a msrdp RDP
session with a server machine (Windows 2000 AS). When it starts the RDP
session, it also launches another VB application on the server.
But once launched, I need to send a message to the application from the
calling machine.
I think that Virtual Channels may allow me to do this but unsure?
And also unsure if possible with VB or how!? Can't seem to find any code
examples.
Can anyone offer any help or advice.
Many thanks,
Darren
Darren Brook
2006-06-04 13:32:53 UTC
Permalink
Hi.

Thanks for the reply - appreciated.

Having not done this before, I am totally at a loss a to what aspects I
should be wrapping, how I should be wrapping them, and how to implement the
solution I need.
Post by ThomasT.
On the server side you can use VB6 without any problem.
I currently have a VB6 app with the msrdp ocx control on the server but it
is not detecting any messages through the "OnChannelReceivedData" event.

Do I need to get the VB6 to communicate with the same session as what was
setup via the Client? If so, I have not been able to find how to do
this!???

Are virtual channels independent of the sessions?
Post by ThomasT.
On the client side, if you wrap the MSRDP.OCX with VB6, you can capture
event for virtual channel , this is the easiest way. Or you have to use
C++ to develop
your own virtual drivers on the client side .
Confused about this...

Can't I just use the msrdp ocx control in my client side VB6 app to send a
message via a virtual channel using the "Create Virtual Channels", followed
by the "SendOnVirtualChannel" methods?

I just want to send a message from the client to the server. I don't need
the client to receive anything.

Thanks,
Darren
Post by ThomasT.
Hi,
On the server side you can use VB6 without any problem.
On the client side, if you wrap the MSRDP.OCX with VB6, you can capture
event for virtual channel , this is the easiest way. Or you have to use
C++ to develop
your own virtual drivers on the client side .
http://msdn.microsoft.com/library/en-us/termserv/termserv/using_terminal_services_virtual_channels.asp?frame=true
Good luck
ThomasT
Post by Darren Brook
Does anyone know of anywhere that I can view code examples of how to use
VirtualChannels successfully with Visual Basic 6 (VB6)?
I have a VB app on one machine (running XP Pro) that starts a msrdp RDP
session with a server machine (Windows 2000 AS). When it starts the RDP
session, it also launches another VB application on the server.
But once launched, I need to send a message to the application from the
calling machine.
I think that Virtual Channels may allow me to do this but unsure?
And also unsure if possible with VB or how!? Can't seem to find any code
examples.
Can anyone offer any help or advice.
Many thanks,
Darren
ThomasT.
2006-06-04 16:27:06 UTC
Permalink
You should read about Virtual Channel documentation . The communication
is one way . App on the server has to initialize the communication, you can
not
only send data from the client side, always like this:

#1 - Server send data to client
#2 - Client receives data and processes data
#3 - If there is any data need to send back to the server, the client sends
to the server
#4 - On the server, read the data from virtual channel .

these 4 steps should be continuous and each round trip includes these 4
steps.

Remember, on both sides, create/open Virtual Channel with the same name
first, then
after that you can use it .
Post by Darren Brook
Are virtual channels independent of the sessions?
Yes, they are, don't worry .

Important tip: with VB6 on the server side, when read back the data, you
need to convert it to UNICODE , use StrConv function .

Good luck

Thomas T.
Post by Darren Brook
Hi.
Thanks for the reply - appreciated.
Having not done this before, I am totally at a loss a to what aspects I
should be wrapping, how I should be wrapping them, and how to implement
the solution I need.
Post by ThomasT.
On the server side you can use VB6 without any problem.
I currently have a VB6 app with the msrdp ocx control on the server but it
is not detecting any messages through the "OnChannelReceivedData" event.
Do I need to get the VB6 to communicate with the same session as what was
setup via the Client? If so, I have not been able to find how to do
this!???
Are virtual channels independent of the sessions?
Post by ThomasT.
On the client side, if you wrap the MSRDP.OCX with VB6, you can capture
event for virtual channel , this is the easiest way. Or you have to use
C++ to develop
your own virtual drivers on the client side .
Confused about this...
Can't I just use the msrdp ocx control in my client side VB6 app to send a
message via a virtual channel using the "Create Virtual Channels",
followed by the "SendOnVirtualChannel" methods?
I just want to send a message from the client to the server. I don't need
the client to receive anything.
Thanks,
Darren
Post by ThomasT.
Hi,
On the server side you can use VB6 without any problem.
On the client side, if you wrap the MSRDP.OCX with VB6, you can capture
event for virtual channel , this is the easiest way. Or you have to use
C++ to develop
your own virtual drivers on the client side .
http://msdn.microsoft.com/library/en-us/termserv/termserv/using_terminal_services_virtual_channels.asp?frame=true
Good luck
ThomasT
Post by Darren Brook
Does anyone know of anywhere that I can view code examples of how to use
VirtualChannels successfully with Visual Basic 6 (VB6)?
I have a VB app on one machine (running XP Pro) that starts a msrdp RDP
session with a server machine (Windows 2000 AS). When it starts the RDP
session, it also launches another VB application on the server.
But once launched, I need to send a message to the application from the
calling machine.
I think that Virtual Channels may allow me to do this but unsure?
And also unsure if possible with VB or how!? Can't seem to find any
code examples.
Can anyone offer any help or advice.
Many thanks,
Darren
Loading...