Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Programmatically launch Network Connection Status

22 views
Skip to first unread message

Suman

unread,
Oct 7, 2003, 5:29:49 PM10/7/03
to
If I want to see the status of a network connection - I go
to Network connections folder and right click on a
connection icon and click status to launch the Status
dialog.

Does anyone know how to do it programmatically using C++
or is there a command line?

Thanks
Suman

Ken Wickes [MSFT]

unread,
Oct 7, 2003, 6:33:47 PM10/7/03
to
There are no APIs for this. Conceivably you could drill through the shell
namespace and apply the verb, but the folder tends to change from release to
release.

--

Ken Wickes [MSFT]
This posting is provided "AS IS" with no warranties, and confers no rights.


"Suman" <suman...@yahoo.com> wrote in message
news:0f4901c38d1a$23361980$a001...@phx.gbl...

Suman

unread,
Oct 7, 2003, 7:25:38 PM10/7/03
to
Thanks Ken. I did drill through the shell namespace and I
am able to operate on all the menu items that show in the
right context menu except the Status. I can launch the
properties Dialog, do enable/disable etc. However the same
piece of code that applies the verb does not work for the
Status dialog

Code snippet:
nVerbItemID = GetMenuItemID( hPopup, nVerbItemID );

//nVerbItemID is 9 for properties and 5 for status

CMINVOKECOMMANDINFO cmi;

ZeroMemory(&cmi, sizeof(cmi));

cmi.cbSize = sizeof(CMINVOKECOMMANDINFO);

cmi.lpVerb = MAKEINTRESOURCE(nVerbItemID-1);

cmi.nShow = SW_SHOWNORMAL;

hr = pcmLACContextMenu->InvokeCommand(&cmi);

Also do the Menu IDs change from release to release?

Thanks
Suman

>.
>

Ken Wickes [MSFT]

unread,
Oct 7, 2003, 7:53:58 PM10/7/03
to
Ah, that just jarred something loose in my memory. There is a bug in XP and
I think a side effect of that is that you can't use the status verb unless
you are within the main explorer process. You see the same problem if you
launch a new explorer process and try to activate the status via the UI.
Sorry bout that.

I wouldn't be surprised if the menus changed from release to release.

--

Ken Wickes [MSFT]
This posting is provided "AS IS" with no warranties, and confers no rights.


"Suman" <suman...@yahoo.com> wrote in message

news:24cfe01c38d2a$50df4c20$a601...@phx.gbl...

0 new messages