Home All Groups Group Topic Archive Search About

Directly Passing Variables

Author
2 Aug 2006 1:25 PM
Miro
Hi,    ( using vb.net 2003 )

Im not quite sure what to look for in the help / online for this.

Example:  You have 2 seperate .exe files running ( both written in vb.net )

Is there a way to make 1 exe "listen" on a port or something   ( other than
a text file )  so the 2nd
exe can transfer a variable to it or an array ?

Currently my solution is that the 1 exe writes a text file and the other
goes and reads it.
I was wondering if I can create a direct approach somehow.  I do not want to
use a db file.  I barely
had the rights to a computer to write the txt file.

Thanks

Miro

Author
2 Aug 2006 1:59 PM
Denis Voyer
I'm still a little new to all of this coding stuff but could you not just
copy your info into the clipboard and then paste it into the new .exe? Just
a thought.

Show quoteHide quote
"Miro" <miron***@golden.net> wrote in message
news:OgUr6bjtGHA.4336@TK2MSFTNGP06.phx.gbl...
> Hi,    ( using vb.net 2003 )
>
> Im not quite sure what to look for in the help / online for this.
>
> Example:  You have 2 seperate .exe files running ( both written in
> vb.net )
>
> Is there a way to make 1 exe "listen" on a port or something   ( other
> than a text file )  so the 2nd
> exe can transfer a variable to it or an array ?
>
> Currently my solution is that the 1 exe writes a text file and the other
> goes and reads it.
> I was wondering if I can create a direct approach somehow.  I do not want
> to use a db file.  I barely
> had the rights to a computer to write the txt file.
>
> Thanks
>
> Miro
>
Author
2 Aug 2006 3:20 PM
Miro
Im new to vb.net as well.

The only thing i would be scared of using the clipboard for is that if the
user has something in the clipboard from
another application, i would be wiping that out.  So i would have to start
managing the clipboard - reading / storing/ and
re-writing the clipboard to the old data once i was done.
Still simpler ( for me ) then to use a text file still and do it in a timer
or filesystemwatcher on that file.

I never thought of the clipboard though... I like the answer, but looking
for a way to set an app to constantly listen
to a "port" or something so when the other app loads...itl just shoot off
some data to a "port" ( or something ) and the
other app instantly gets it.

Miro

Show quoteHide quote
"Denis Voyer" <denisvo***@adenak.com> wrote in message
news:ePmqVvjtGHA.1224@TK2MSFTNGP03.phx.gbl...
> I'm still a little new to all of this coding stuff but could you not just
> copy your info into the clipboard and then paste it into the new .exe?
> Just a thought.
>
> "Miro" <miron***@golden.net> wrote in message
> news:OgUr6bjtGHA.4336@TK2MSFTNGP06.phx.gbl...
>> Hi,    ( using vb.net 2003 )
>>
>> Im not quite sure what to look for in the help / online for this.
>>
>> Example:  You have 2 seperate .exe files running ( both written in
>> vb.net )
>>
>> Is there a way to make 1 exe "listen" on a port or something   ( other
>> than a text file )  so the 2nd
>> exe can transfer a variable to it or an array ?
>>
>> Currently my solution is that the 1 exe writes a text file and the other
>> goes and reads it.
>> I was wondering if I can create a direct approach somehow.  I do not want
>> to use a db file.  I barely
>> had the rights to a computer to write the txt file.
>>
>> Thanks
>>
>> Miro
>>
>
>
Author
2 Aug 2006 3:55 PM
Brian Tkatch
Miro wrote:
Show quoteHide quote
> Hi,    ( using vb.net 2003 )
>
> Im not quite sure what to look for in the help / online for this.
>
> Example:  You have 2 seperate .exe files running ( both written in vb.net )
>
> Is there a way to make 1 exe "listen" on a port or something   ( other than
> a text file )  so the 2nd
> exe can transfer a variable to it or an array ?
>
> Currently my solution is that the 1 exe writes a text file and the other
> goes and reads it.
> I was wondering if I can create a direct approach somehow.  I do not want to
> use a db file.  I barely
> had the rights to a computer to write the txt file.
>
> Thanks
>
> Miro

Perhaps you could create a pipe or message queue?

I have no idea how to use these, but i see message queues in Server
Explorer (in 2005 at least).

B.
Author
2 Aug 2006 4:07 PM
Miro
I have no idea those are, and they are present in vb.net 2003

I will read up on those and see how I can use those and see if it works.

If it does work, or I do run into a different solution I will post it here.

I have also tried and it does work - to write to the Log File.  This works
fine, and i read the log file
for the data i needed and continued.  However I dropped this solution
originally because not all machines
allow you to write to the registry ( which the log file uses ) - I never ran
into that situation, but if you do look
into your registery - that is where it stores the Log and the Source.  Its
really also a pain kinda to get working.
Somehow windows stores the Log even after you delete it from registery and
stuff.

But that was also another solution I used and dropped.

Miro


Show quoteHide quote
"Brian Tkatch" <Maxwell_Sm***@ThePentagon.com> wrote in message
news:1154534131.418658.31370@m79g2000cwm.googlegroups.com...
>
> Miro wrote:
>> Hi,    ( using vb.net 2003 )
>>
>> Im not quite sure what to look for in the help / online for this.
>>
>> Example:  You have 2 seperate .exe files running ( both written in
>> vb.net )
>>
>> Is there a way to make 1 exe "listen" on a port or something   ( other
>> than
>> a text file )  so the 2nd
>> exe can transfer a variable to it or an array ?
>>
>> Currently my solution is that the 1 exe writes a text file and the other
>> goes and reads it.
>> I was wondering if I can create a direct approach somehow.  I do not want
>> to
>> use a db file.  I barely
>> had the rights to a computer to write the txt file.
>>
>> Thanks
>>
>> Miro
>
> Perhaps you could create a pipe or message queue?
>
> I have no idea how to use these, but i see message queues in Server
> Explorer (in 2005 at least).
>
> B.
>
Author
2 Aug 2006 5:29 PM
The Grim Reaper
Miro,

I think the "easiest" way to do it, like you said originally is to open a
port and send from one app and listen from the other!
Just use TCP/IP or UDP to open a port - it works on the local machine, not
just across cables.
Solution worked well for me anyway!

HTH

___________________________________
The Grim Reaper

Show quoteHide quote
"Miro" <miron***@golden.net> wrote in message
news:%2323vv2ktGHA.4752@TK2MSFTNGP02.phx.gbl...
>I have no idea those are, and they are present in vb.net 2003
>
> I will read up on those and see how I can use those and see if it works.
>
> If it does work, or I do run into a different solution I will post it
> here.
>
> I have also tried and it does work - to write to the Log File.  This works
> fine, and i read the log file
> for the data i needed and continued.  However I dropped this solution
> originally because not all machines
> allow you to write to the registry ( which the log file uses ) - I never
> ran into that situation, but if you do look
> into your registery - that is where it stores the Log and the Source.  Its
> really also a pain kinda to get working.
> Somehow windows stores the Log even after you delete it from registery and
> stuff.
>
> But that was also another solution I used and dropped.
>
> Miro
>
>
> "Brian Tkatch" <Maxwell_Sm***@ThePentagon.com> wrote in message
> news:1154534131.418658.31370@m79g2000cwm.googlegroups.com...
>>
>> Miro wrote:
>>> Hi,    ( using vb.net 2003 )
>>>
>>> Im not quite sure what to look for in the help / online for this.
>>>
>>> Example:  You have 2 seperate .exe files running ( both written in
>>> vb.net )
>>>
>>> Is there a way to make 1 exe "listen" on a port or something   ( other
>>> than
>>> a text file )  so the 2nd
>>> exe can transfer a variable to it or an array ?
>>>
>>> Currently my solution is that the 1 exe writes a text file and the other
>>> goes and reads it.
>>> I was wondering if I can create a direct approach somehow.  I do not
>>> want to
>>> use a db file.  I barely
>>> had the rights to a computer to write the txt file.
>>>
>>> Thanks
>>>
>>> Miro
>>
>> Perhaps you could create a pipe or message queue?
>>
>> I have no idea how to use these, but i see message queues in Server
>> Explorer (in 2005 at least).
>>
>> B.
>>
>
>
Author
2 Aug 2006 6:25 PM
Miro
Can you point me in the right direction of where I can read on a
simple prog that opens listens and closes a tcp/ip / or udp port.
/ or sends.

I am a bit new to vb and not sure exactly the terminology to search for.
Im not asking for the code... just 'what am i looking for in vb / or the web
for help'

Thanks

Miro

Show quoteHide quote
"The Grim Reaper" <grim_rea***@REMOVEbtopenworld.com> wrote in message
news:DKWdnRp-Iq5-fU3ZRVnyvg@bt.com...
> Miro,
>
> I think the "easiest" way to do it, like you said originally is to open a
> port and send from one app and listen from the other!
> Just use TCP/IP or UDP to open a port - it works on the local machine, not
> just across cables.
> Solution worked well for me anyway!
>
> HTH
>
> ___________________________________
> The Grim Reaper
>
> "Miro" <miron***@golden.net> wrote in message
> news:%2323vv2ktGHA.4752@TK2MSFTNGP02.phx.gbl...
>>I have no idea those are, and they are present in vb.net 2003
>>
>> I will read up on those and see how I can use those and see if it works.
>>
>> If it does work, or I do run into a different solution I will post it
>> here.
>>
>> I have also tried and it does work - to write to the Log File.  This
>> works fine, and i read the log file
>> for the data i needed and continued.  However I dropped this solution
>> originally because not all machines
>> allow you to write to the registry ( which the log file uses ) - I never
>> ran into that situation, but if you do look
>> into your registery - that is where it stores the Log and the Source.
>> Its really also a pain kinda to get working.
>> Somehow windows stores the Log even after you delete it from registery
>> and stuff.
>>
>> But that was also another solution I used and dropped.
>>
>> Miro
>>
>>
>> "Brian Tkatch" <Maxwell_Sm***@ThePentagon.com> wrote in message
>> news:1154534131.418658.31370@m79g2000cwm.googlegroups.com...
>>>
>>> Miro wrote:
>>>> Hi,    ( using vb.net 2003 )
>>>>
>>>> Im not quite sure what to look for in the help / online for this.
>>>>
>>>> Example:  You have 2 seperate .exe files running ( both written in
>>>> vb.net )
>>>>
>>>> Is there a way to make 1 exe "listen" on a port or something   ( other
>>>> than
>>>> a text file )  so the 2nd
>>>> exe can transfer a variable to it or an array ?
>>>>
>>>> Currently my solution is that the 1 exe writes a text file and the
>>>> other
>>>> goes and reads it.
>>>> I was wondering if I can create a direct approach somehow.  I do not
>>>> want to
>>>> use a db file.  I barely
>>>> had the rights to a computer to write the txt file.
>>>>
>>>> Thanks
>>>>
>>>> Miro
>>>
>>> Perhaps you could create a pipe or message queue?
>>>
>>> I have no idea how to use these, but i see message queues in Server
>>> Explorer (in 2005 at least).
>>>
>>> B.
>>>
>>
>>
>
>
Author
2 Aug 2006 9:46 PM
Miro
seems to be a good simple example - well explaind on how to use udp.


http://www.codeproject.com/vb/net/UDP_Send_Receive.asp

Thanks for all your input everyone.

Miro

Show quoteHide quote
"Miro" <miron***@golden.net> wrote in message
news:%23Kaf$DmtGHA.4872@TK2MSFTNGP02.phx.gbl...
> Can you point me in the right direction of where I can read on a
> simple prog that opens listens and closes a tcp/ip / or udp port.
> / or sends.
>
> I am a bit new to vb and not sure exactly the terminology to search for.
> Im not asking for the code... just 'what am i looking for in vb / or the
> web for help'
>
> Thanks
>
> Miro
>
> "The Grim Reaper" <grim_rea***@REMOVEbtopenworld.com> wrote in message
> news:DKWdnRp-Iq5-fU3ZRVnyvg@bt.com...
>> Miro,
>>
>> I think the "easiest" way to do it, like you said originally is to open a
>> port and send from one app and listen from the other!
>> Just use TCP/IP or UDP to open a port - it works on the local machine,
>> not just across cables.
>> Solution worked well for me anyway!
>>
>> HTH
>>
>> ___________________________________
>> The Grim Reaper
>>
>> "Miro" <miron***@golden.net> wrote in message
>> news:%2323vv2ktGHA.4752@TK2MSFTNGP02.phx.gbl...
>>>I have no idea those are, and they are present in vb.net 2003
>>>
>>> I will read up on those and see how I can use those and see if it works.
>>>
>>> If it does work, or I do run into a different solution I will post it
>>> here.
>>>
>>> I have also tried and it does work - to write to the Log File.  This
>>> works fine, and i read the log file
>>> for the data i needed and continued.  However I dropped this solution
>>> originally because not all machines
>>> allow you to write to the registry ( which the log file uses ) - I never
>>> ran into that situation, but if you do look
>>> into your registery - that is where it stores the Log and the Source.
>>> Its really also a pain kinda to get working.
>>> Somehow windows stores the Log even after you delete it from registery
>>> and stuff.
>>>
>>> But that was also another solution I used and dropped.
>>>
>>> Miro
>>>
>>>
>>> "Brian Tkatch" <Maxwell_Sm***@ThePentagon.com> wrote in message
>>> news:1154534131.418658.31370@m79g2000cwm.googlegroups.com...
>>>>
>>>> Miro wrote:
>>>>> Hi,    ( using vb.net 2003 )
>>>>>
>>>>> Im not quite sure what to look for in the help / online for this.
>>>>>
>>>>> Example:  You have 2 seperate .exe files running ( both written in
>>>>> vb.net )
>>>>>
>>>>> Is there a way to make 1 exe "listen" on a port or something   ( other
>>>>> than
>>>>> a text file )  so the 2nd
>>>>> exe can transfer a variable to it or an array ?
>>>>>
>>>>> Currently my solution is that the 1 exe writes a text file and the
>>>>> other
>>>>> goes and reads it.
>>>>> I was wondering if I can create a direct approach somehow.  I do not
>>>>> want to
>>>>> use a db file.  I barely
>>>>> had the rights to a computer to write the txt file.
>>>>>
>>>>> Thanks
>>>>>
>>>>> Miro
>>>>
>>>> Perhaps you could create a pipe or message queue?
>>>>
>>>> I have no idea how to use these, but i see message queues in Server
>>>> Explorer (in 2005 at least).
>>>>
>>>> B.
>>>>
>>>
>>>
>>
>>
>
>