Re: find instance of IE for server socket in activex component

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I've not worked with IE or add-ins, so at this point, you'll have to rely on someone who
can explain how to find the window for which the data is destined. Note that once you
create a server port, you are going to have to figure out how to connect each window to
it. This is a very odd architecture, I might add.
joe

On Tue, 22 Apr 2008 08:37:33 -0700, kahn <kahn@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

Thanks for the reply

I am looking for a solution for the second case .I am also thinking of a
protocol but am not been able to locate the corresponding IE window.Do I need
to send a fu

window .I think I need to send the funnction pointer of the javascript
callback fuction but I am not sure as to how to do this.Any help would be
appreciated

Thanks


"kahn" wrote:
ok sorry againnction
"The activex control creates a server port on the client's machine, to which
I will
establish communication"

So now how can i send the reply back to the window of ie

"Joseph M. Newcomer" wrote:

It is still confusing. "I have a server listing to port xxxx in the activex" does not
convey useful information. You might say

"The activex control will act as a client, and attempt to establish communication to a
remote server at port xxxx"
or
"The activex control creates a server port on the client's machine, to which I will
establish communication"

If it is the first case, you need to worry about the fact that there is only one instance
of IE running, but lots of views; you would need to make sure the context of your client
app establishing the connection uses a page-local variable to represent the connection,
instead of a global variable.

If the answer is the second case, there's nothing you can do. There can be exactly ONE
instance of a server socket on a machine for a given IP address. That is, the pair
<IP,socket> can have only one instance, period. If you need to do something complex in
this scenario, it is up to you to create protocols that will route the messages to the
appropriate view window, or whatever IE calls those windows internally.
joe

On Tue, 22 Apr 2008 00:21:01 -0700, kahn <kahn@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

Sorry for the confusion .Actually I have a server listening to port xxxx in
the activex .Basically what I want is that when ever any data is available to
the server it is sent to that active view of IE that requested for it.
(Exampl e we have 10 IE opened and let's say that in the 2nd IE windows I
click 2+2 the result 4 is sent back through the server socket .Now I want the
data to be recieved only by the second view of IE not by any other ).

Again Do I need to send a pointer to the callback from the javascript or
something like that .If yes how if no what's the other way

Thanks

"rodream" wrote:

I believe that the problem is not in ActiveX.

The problem comes from Socket.

If you do in Application(.exe), may occurs same problem.

Because, One system has one server.

When you open one port as server, you can not open same port, In TCP.

The one method to figure out this problem is using UDP.

But, UDP is not proper way to manage network traffic which you need.

--
WebSite :
Realization of Dream { imagine your dream} - http://rodream.net

WebMail :
rodream@xxxxxxxxx


"kahn" wrote:

Hi
I have an activex component that has a server socket (using casyncsocket
class) ..The problem is that when I have multiple instances of the IE open
only the first instance (created first) recieves the messages the rest do
not recieve the message. Is there a way to solve this problem .(i want the
server send the reply to that instance of ie that sent the message) .Do I
need to pass something like a pointer of hte javascript object .If so how

Thanks
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm

Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.


Quantcast