In the MSInternetExplorer.java, an Iexplore.exe is started via the lines of code like,
comServer = new JIComServer(JIProgId.valueOf("InternetExplorer.Application"), address, session);
ieObject = comServer.createInstance();
here the IE itself is the com server on the specified desktop.
It's a little bit strange, in contrast to what I knew about j-interop. Normally, when trying to make a connection to the remote device, j-interop creates an JIComServer using "WbemScripting.SWbemLocator", like
JIComServer comServer = new JIComServer(JIProgId.valueOf("WbemScripting.SWbemLocator"), address, session);
unknown = comServer.createInstance();
then from this com server, you can get the Swbemservices and get every thing via the wbemservices, including starting/stopping the win32 processes.
The questions are:
1. Why can the creation of IE browser go ahead independently without using "WbemScripting.SWbemLocator" as an entry point to have access to the remote device, like any other cases?
2. Can I go with WbemScripting.SWbemLocator and then create an instance of win32_process and then call its method of "create" to start an iexplore process?
I already tried the item 2). It seemed not working.
any hints?
thanks in advance,
mikej
Last edit: Mike J 2014-07-07
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It depends upon the way COM server is implemented. All COM Servers are
different. In first case, you are invoking the COM Server directly using
its ProgID and in the second case you are using another COM Server to do
the same. Both ways are correct. I am not sure why second point of yours
doesn't work. Could be many things, including permissions... what does the
error message say ?
In the MSInternetExplorer.java, an Iexplore.exe is started via the lines
of code like,
comServer = new
JIComServer(JIProgId.valueOf("InternetExplorer.Application"), address,
session);
ieObject = comServer.createInstance();
here the IE itself is the com server on the specified desktop.
It's a little bit in contrast to what I knew about j-interop. Normally,
when trying to make a connection to the remote device, j-interop creates an
JIComServer using "WbemScripting.SWbemLocator", like
JIComServer comServer = new
JIComServer(JIProgId.valueOf("WbemScripting.SWbemLocator"), address,
session);
unknown = comServer.createInstance();
then from this com server, you can get the Swbemservices and get every
thing via the wbemservices, including starting/stopping the win32 processes.
The questions are:
1. Why can the creation of IE browser go ahead independently without using
"WbemScripting.SWbemLocator" as an entry point to have access to the remote
device, like any other cases?
2. Can I go with WbemScripting.SWbemLocator and then create an instance of
win32_process and then call its method of "create" to start an iexplore
process?
I already tried the item 2). It seemed not working.
--
The Mind is a place of its own. It can make a heaven out of hell or a hell
out of heaven. Attitude is everything. No matter how adverse conditions
maybe, one has the capacity to turn things around by one's Determination,
Perseverance and Hardwork.
In the MSInternetExplorer.java, an Iexplore.exe is started via the lines of code like,
comServer = new JIComServer(JIProgId.valueOf("InternetExplorer.Application"), address, session);
ieObject = comServer.createInstance();
here the IE itself is the com server on the specified desktop.
It's a little bit strange, in contrast to what I knew about j-interop. Normally, when trying to make a connection to the remote device, j-interop creates an JIComServer using "WbemScripting.SWbemLocator", like
JIComServer comServer = new JIComServer(JIProgId.valueOf("WbemScripting.SWbemLocator"), address, session);
unknown = comServer.createInstance();
then from this com server, you can get the Swbemservices and get every thing via the wbemservices, including starting/stopping the win32 processes.
The questions are:
1. Why can the creation of IE browser go ahead independently without using "WbemScripting.SWbemLocator" as an entry point to have access to the remote device, like any other cases?
2. Can I go with WbemScripting.SWbemLocator and then create an instance of win32_process and then call its method of "create" to start an iexplore process?
I already tried the item 2). It seemed not working.
any hints?
thanks in advance,
mikej
Last edit: Mike J 2014-07-07
Dear Mike,
It depends upon the way COM server is implemented. All COM Servers are
different. In first case, you are invoking the COM Server directly using
its ProgID and in the second case you are using another COM Server to do
the same. Both ways are correct. I am not sure why second point of yours
doesn't work. Could be many things, including permissions... what does the
error message say ?
best regards,
Vikram
On Tue, Jul 8, 2014 at 12:46 AM, Mike J mikej1688@users.sf.net wrote:
--
The Mind is a place of its own. It can make a heaven out of hell or a hell
out of heaven. Attitude is everything. No matter how adverse conditions
maybe, one has the capacity to turn things around by one's Determination,
Perseverance and Hardwork.
John Milton
(Paradise Lost)