calling Microsoft application from my app

A

arssa2020

Hello all,
i am making a replacement for the Wi-Fi wizard application (under
Settings->Connections->Wi-Fi application) on a WM 5.0 smartphone, my
application will have the following menu options

1)Wi-Fi : this will allow u to connect to Access point, edit a
connection, etc
2) Wi-Fi Power modes: will allow the user to select power modes for the
driver (turn off Wi-Fi if no activity... etc)

now i have implemented option #2 in C#, option #1 already is done by
Microsoft (its part of the Settings->Connections-->Wi-Fi application) i
want a way to launch this Wi-Fi wizard from my C# application when the
user clicks on option #1 from my menu above, I don't want to
re-create option #1 in C#, i just want to use what MSFT has done,
problem is I don't know the name of that Wi-Fi wizard app
and whether its a .exe or a COM object referencing a DLL somewhere (i
have no idea how those Settings app work)

How can i obtain such info? I look into the processes running on the
phone, I c the "Settings.exe" running, but that's the full Settings app
and not just the Wi-Fi part.

thanks in advance for help


Cheers
 
A

arssa2020

Well thanks paul for ur answer, so sending a message message to
the window which will trigger the same operation as when the user does
something (in my case clicking on Settings->connections-> wifi) is bad
idea as
there is no clean way to do this (right)?

so i thought of this, to create an instance to the COM object via its
class id

I found on the registry that ConnMgrWifiMenu has CLSID
2E0EC8B4-831B-4c3c-A861-B760CF42A0A6

so in my code i created an instance to this COM object, but nothing
happens, the wifi menu
doesnt start (no dialog doesnt appear on the screen) so i wonder if i
need to invoke any method on this COM object
(something like init() or start()) how can i find out the exposed
methods of that COM object?


Object myComObj = Activator.CreateInstance(Type.GetTypeFromCLSID(new
Guid("{2E0EC8B4-831B-4c3c-A861-B760CF42A0A6}")));
if (myComObj == null)
{
uint uErrorCode =
WifiWrapper.WirelessManager.GetLastError();
}

Regards
 
P

Paul G. Tobey [eMVP]

It's possible to do it, but it's not a documented way to pop up the window.
It might work today and not in the next OS version or it might work on one
brand of devices and not the other, etc. As suggested in that thread, use
Remote Spy++ and see what messages are passed to what windows when you
manually open the window and then try to duplicate that in your code.

There is *no* COM interface to WZC in Windows CE. Whether the connection
manager on SmartPhone can do it or not, I don't know (I'm a device OEM, but
not SmartPhone devices and I carry a Pocket PC, not a SmartPhone).

Paul T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top