Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Wed, 3 Oct 2007 09:18:31 -0500,    group: microsoft.public.platformsdk.win_base_svcs        back       


Terminal Services   
Hello,

I am seeking guidance on working with virtual channels through terminal 
services.  I hope this is a good spot to post.

I think what I really need to understand is the order of operation for 
conversations on the channel.


I have been able to create a component and create a registry entry for the 
channel in the terminal services add-on.  I have successfully opened the 
channel from the terminal server and pushed a message down to the client 
machine.

What I have not been able to do is respond to the message from the client 
box.  Any attempt write to the channel from the client causes mstsc to 
crash.


MSDN does not really expound on the api, certainly it describes each of the 
api calls and structures.  I am assuming that once the channel was opened 
and I have a handle to the channel that I can simply
call WTSVirtualChannelWrite to write back to the session application.  Even 
if the session application wasn't listening for the message, it should be 
that simple.

Now the next question is how do I poll for messages pending to be read by 
the session application?  Since I am not supposed to be blocking, I don't 
know how to peek into a queue.  I assume that I can use 
WTSVirtualChannelRead, but I don't know how big to the pending message will 
be.


Any help on the subject is greatly appreciated.

Thanks in advance.
date: Wed, 3 Oct 2007 09:18:31 -0500   author:   amdrit

Re: Terminal Services   
I have made less progress than you. I know the documentation is vague and 
that there are not articles .... wait I think there is an article I found 
when I searched, but I forget where it is. I searched the MSDN and the 
internet using relevant function names.

I assume the networking newsgroup is more likely to get answers.


"amdrit"  wrote in message 
news:%23JyHIhcBIHA.912@TK2MSFTNGP05.phx.gbl...
> Hello,
>
> I am seeking guidance on working with virtual channels through terminal 
> services.  I hope this is a good spot to post.
>
> I think what I really need to understand is the order of operation for 
> conversations on the channel.
>
>
> I have been able to create a component and create a registry entry for the 
> channel in the terminal services add-on.  I have successfully opened the 
> channel from the terminal server and pushed a message down to the client 
> machine.
>
> What I have not been able to do is respond to the message from the client 
> box.  Any attempt write to the channel from the client causes mstsc to 
> crash.
>
>
> MSDN does not really expound on the api, certainly it describes each of 
> the api calls and structures.  I am assuming that once the channel was 
> opened and I have a handle to the channel that I can simply
> call WTSVirtualChannelWrite to write back to the session application. 
> Even if the session application wasn't listening for the message, it 
> should be that simple.
>
> Now the next question is how do I poll for messages pending to be read by 
> the session application?  Since I am not supposed to be blocking, I don't 
> know how to peek into a queue.  I assume that I can use 
> WTSVirtualChannelRead, but I don't know how big to the pending message 
> will be.
>
>
> Any help on the subject is greatly appreciated.
>
> Thanks in advance.
>
date: Wed, 3 Oct 2007 08:38:57 -0700   author:   Sam Hobbs _change_social_to_socal

Re: Terminal Services   
Thanks Sam,

I have included the networking group in this post.

Currently I am working with documentation found:
http://www.microsoft.com/technet/archive/termsrv/maintain/featusability/tsrvapi.mspx?mfr=true
http://msdn2.microsoft.com/en-us/library/aa383580.aspx
http://msdn2.microsoft.com/en-us/library/aa383853.aspx
http://www.codeproject.com/cs/system/TSAddinInCS.asp?df=100&forumid=358838&exp=0&select=1961960

That is all I can really find about the topic.

I am still having problems with WTSVirtualChannelRead, at least I think I 
am.  Nothing seems to be writtin.

Here is a brief overview of What I have done:

I created a messagelib that will contain messages I am sending back and 
forth.

Class MessageHeader
  int MessageType
  MessageBase Message

Abstract Class MessageBase

Class StatusMessage:  MessageBase
  String StatusText


Now on my session component I do:

  1.  Call WTSVirtualChannelOpen to get a handle on the channel
  2.  Create a StatusMessage
    StatusText = "ACK"
  3.  Serialize the message
  4.  Send the message

Now on my client component I do:

  1.  VirtualChannelEntry waits to be called (This is what loads the 
assembly), store the handle in mHandle
       point my VirtualChannelInit to the function 
VirtualChannelInitEventProc
  2.  Once the VirtualChannelInitEventProc determines that a complete 
message was send over, I deserialize and process the message
  3.  Determine the type of message that was send (type == 1 
//StatusMessage)
  4.  Determine what the StatusText is "ACK"
  5.  Generate a reply StatusMessage "NACK"
  6.  Serialize the message
  7.  Send the message
     a.  open the channel using the WTSVirtualChannelOpen(mHandle,-1, 
"Impact"), store the new pointer in intTemp
     b.  write the data using WTSVirtualChannelWrite

     at this point, I believe my data is waiting for the server to pick it 
up.  I get a true returned from WTSVirtualChannelWrite

Back to the session component

  I have a background worker process that is monitoring for pending 
messages.

  1.  Open the channel with WTSVirtualChannelOpen
  2.  Read until there is nothing left to read, add the read bytes into 
list<byte> using WTSVirtualChannelRead
  3.  If anything was read
    a.  Deserialize the MessageHeader
    b.  Determine Message Type (type == 1//StatusMessage)
    c.  Report StatusText "NACK"

    At this point, nothing is read by the WTSVirtualChannelRead.  I don't 
know where my message is.

Does anyone have any ideas of where to start?

BTW, I am using C# 2005.  But the concept should be the same.

Thanks in advance.


"Sam Hobbs" <samuel@social.rr.com_change_social_to_socal> wrote in message 
news:OKM2HOdBIHA.3548@TK2MSFTNGP06.phx.gbl...
>I have made less progress than you. I know the documentation is vague and 
>that there are not articles .... wait I think there is an article I found 
>when I searched, but I forget where it is. I searched the MSDN and the 
>internet using relevant function names.
>
> I assume the networking newsgroup is more likely to get answers.
>
>
> "amdrit"  wrote in message 
> news:%23JyHIhcBIHA.912@TK2MSFTNGP05.phx.gbl...
>> Hello,
>>
>> I am seeking guidance on working with virtual channels through terminal 
>> services.  I hope this is a good spot to post.
>>
>> I think what I really need to understand is the order of operation for 
>> conversations on the channel.
>>
>>
>> I have been able to create a component and create a registry entry for 
>> the channel in the terminal services add-on.  I have successfully opened 
>> the channel from the terminal server and pushed a message down to the 
>> client machine.
>>
>> What I have not been able to do is respond to the message from the client 
>> box.  Any attempt write to the channel from the client causes mstsc to 
>> crash.
>>
>>
>> MSDN does not really expound on the api, certainly it describes each of 
>> the api calls and structures.  I am assuming that once the channel was 
>> opened and I have a handle to the channel that I can simply
>> call WTSVirtualChannelWrite to write back to the session application. 
>> Even if the session application wasn't listening for the message, it 
>> should be that simple.
>>
>> Now the next question is how do I poll for messages pending to be read by 
>> the session application?  Since I am not supposed to be blocking, I don't 
>> know how to peek into a queue.  I assume that I can use 
>> WTSVirtualChannelRead, but I don't know how big to the pending message 
>> will be.
>>
>>
>> Any help on the subject is greatly appreciated.
>>
>> Thanks in advance.
>>
>
>
date: Wed, 3 Oct 2007 11:45:42 -0500   author:   amdrit

Re: Terminal Services   
Is there nobody that knows how to work with RDP or is everyone just ignoring 
me?  I don't know where else to post my questions and my need is still real, 
I am just looking for the formula to have two way communications via RDP.




"amdrit"  wrote in message 
news:%23yLeXzdBIHA.1164@TK2MSFTNGP02.phx.gbl...
> Thanks Sam,
>
> I have included the networking group in this post.
>
> Currently I am working with documentation found:
> http://www.microsoft.com/technet/archive/termsrv/maintain/featusability/tsrvapi.mspx?mfr=true
> http://msdn2.microsoft.com/en-us/library/aa383580.aspx
> http://msdn2.microsoft.com/en-us/library/aa383853.aspx
> http://www.codeproject.com/cs/system/TSAddinInCS.asp?df=100&forumid=358838&exp=0&select=1961960
>
> That is all I can really find about the topic.
>
> I am still having problems with WTSVirtualChannelRead, at least I think I 
> am.  Nothing seems to be writtin.
>
> Here is a brief overview of What I have done:
>
> I created a messagelib that will contain messages I am sending back and 
> forth.
>
> Class MessageHeader
>  int MessageType
>  MessageBase Message
>
> Abstract Class MessageBase
>
> Class StatusMessage:  MessageBase
>  String StatusText
>
>
> Now on my session component I do:
>
>  1.  Call WTSVirtualChannelOpen to get a handle on the channel
>  2.  Create a StatusMessage
>    StatusText = "ACK"
>  3.  Serialize the message
>  4.  Send the message
>
> Now on my client component I do:
>
>  1.  VirtualChannelEntry waits to be called (This is what loads the 
> assembly), store the handle in mHandle
>       point my VirtualChannelInit to the function 
> VirtualChannelInitEventProc
>  2.  Once the VirtualChannelInitEventProc determines that a complete 
> message was send over, I deserialize and process the message
>  3.  Determine the type of message that was send (type == 1 
> //StatusMessage)
>  4.  Determine what the StatusText is "ACK"
>  5.  Generate a reply StatusMessage "NACK"
>  6.  Serialize the message
>  7.  Send the message
>     a.  open the channel using the WTSVirtualChannelOpen(mHandle,-1, 
> "Impact"), store the new pointer in intTemp
>     b.  write the data using WTSVirtualChannelWrite
>
>     at this point, I believe my data is waiting for the server to pick it 
> up.  I get a true returned from WTSVirtualChannelWrite
>
> Back to the session component
>
>  I have a background worker process that is monitoring for pending 
> messages.
>
>  1.  Open the channel with WTSVirtualChannelOpen
>  2.  Read until there is nothing left to read, add the read bytes into 
> list<byte> using WTSVirtualChannelRead
>  3.  If anything was read
>    a.  Deserialize the MessageHeader
>    b.  Determine Message Type (type == 1//StatusMessage)
>    c.  Report StatusText "NACK"
>
>    At this point, nothing is read by the WTSVirtualChannelRead.  I don't 
> know where my message is.
>
> Does anyone have any ideas of where to start?
>
> BTW, I am using C# 2005.  But the concept should be the same.
>
> Thanks in advance.
>
>
> "Sam Hobbs" <samuel@social.rr.com_change_social_to_socal> wrote in message 
> news:OKM2HOdBIHA.3548@TK2MSFTNGP06.phx.gbl...
>>I have made less progress than you. I know the documentation is vague and 
>>that there are not articles .... wait I think there is an article I found 
>>when I searched, but I forget where it is. I searched the MSDN and the 
>>internet using relevant function names.
>>
>> I assume the networking newsgroup is more likely to get answers.
>>
>>
>> "amdrit"  wrote in message 
>> news:%23JyHIhcBIHA.912@TK2MSFTNGP05.phx.gbl...
>>> Hello,
>>>
>>> I am seeking guidance on working with virtual channels through terminal 
>>> services.  I hope this is a good spot to post.
>>>
>>> I think what I really need to understand is the order of operation for 
>>> conversations on the channel.
>>>
>>>
>>> I have been able to create a component and create a registry entry for 
>>> the channel in the terminal services add-on.  I have successfully opened 
>>> the channel from the terminal server and pushed a message down to the 
>>> client machine.
>>>
>>> What I have not been able to do is respond to the message from the 
>>> client box.  Any attempt write to the channel from the client causes 
>>> mstsc to crash.
>>>
>>>
>>> MSDN does not really expound on the api, certainly it describes each of 
>>> the api calls and structures.  I am assuming that once the channel was 
>>> opened and I have a handle to the channel that I can simply
>>> call WTSVirtualChannelWrite to write back to the session application. 
>>> Even if the session application wasn't listening for the message, it 
>>> should be that simple.
>>>
>>> Now the next question is how do I poll for messages pending to be read 
>>> by the session application?  Since I am not supposed to be blocking, I 
>>> don't know how to peek into a queue.  I assume that I can use 
>>> WTSVirtualChannelRead, but I don't know how big to the pending message 
>>> will be.
>>>
>>>
>>> Any help on the subject is greatly appreciated.
>>>
>>> Thanks in advance.
>>>
>>
>>
>
>
date: Thu, 4 Oct 2007 12:26:54 -0500   author:   amdrit

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us