The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
October 2001



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


COM, Chat and Windows

Posted by Matt Gerrans on October 29, 2001 at 4:01 PM

> > If the client(s) offer OLE automation, then it would be a snap in C++/Delphi, Python, or even JScript and yes, VBScript (ick!).

> Do you know how I can find out more information about OLE automation. I'm not quite sure of what you mean.

Ooh. That's a big subject. Simply put, it is a way (on the Windows platform) for one application to control another (to the extent that the other allows it). It allows one app to ask another what interfaces it has and to use them. So for instance, using automation, I can write an app in C++ (I don't know about Java, maybe someone else knows of COM/OLE libraries for Java -- of course they would probably require native methods and be platform specific) that will Open up Word or Excel create and maniplate documents and get back information about them. Microsoft has more documentation on the subject than you can read in your lifetime at

> > You could try with a higher-level tool, like WinBatch, where can set the focus to the app and send it keys, etc.

> Thnx Matt! Do you think it would work if I instead sent out, using the correct protocol, a message to the server? That way, when the server responds, it would (hopefully) respond to the original program (eg. MSN Messenger) and that program would open up a chat window and take it from there.

Perhaps that would work. Sound like a clever idea, but you still would need intimate knowledge of the various vendors protocols. It also may work for some and not others. Some may even have encrypted protocols to prevent others from fooling with them (I don't know to what lengths MS and AOL went in their battles with one another).

> > On the second one, I'm not completely sure what you mean.
> What I mean is this: You know how in Windows Explorer it's possible to map a network drive to appear as a local hard drive. So if I have comp A and comp B networked, I can share comp B's hard drive, and map it on comp A. That way, when I open up Windows Explorer on comp A, it would show the A drive, D drive, C drive and comp B's hard drive. The user can then click on that drive, and browse through the files, copying and deleting like they would on their own hard drive. Well, I want to allow the user to do just that, except with comp B being connected to a WAN(the Internet) and not to a LAN. I hope this clarifies my question. If not, let me know.

This already exists. It is really just a matter of security. Many companies have VPNs that allow their employees to do exactly this. On you local area network, it is usually a matter (on the windows platform) of allowing file sharing. However, this is risky stuff, because it is easy for hackers and viruses to go haywire on the network and therefore rational system adminstrators would not allow such a thing outside their firewall.

- mfg


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us