ReactOS 0.4.17-dev-1190-g4c812f4
shfldr_netconnect.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  shvheader
 
class  CNetworkConnections
 
class  CNetConUiObject
 

Functions

HRESULT ShowNetConnectionProperties (INetConnection *pNetConnect, HWND hwnd)
 

Function Documentation

◆ ShowNetConnectionProperties()

HRESULT ShowNetConnectionProperties ( INetConnection *  pNetConnect,
HWND  hwnd 
)

Definition at line 568 of file shfldr_netconnect.cpp.

571{
572 HRESULT hr;
573 CLSID ClassID;
574 PROPSHEETHEADERW pinfo;
577 NETCON_PROPERTIES * pProperties;
578
579 if (pNetConnect->GetProperties(&pProperties) != S_OK)
580 return E_FAIL;
581
582 hr = pNetConnect->GetUiObjectClassId(&ClassID);
583 if (FAILED(hr))
584 {
585 NcFreeNetconProperties(pProperties);
586 return hr;
587 }
588
589 hr = CoCreateInstance(ClassID, NULL, CLSCTX_INPROC_SERVER, IID_INetConnectionPropertyUi, (LPVOID*)&pNCP);
590 if (FAILED(hr))
591 {
592 NcFreeNetconProperties(pProperties);
593 return hr;
594 }
595
596 hr = pNCP->SetConnection(pNetConnect);
597 if (SUCCEEDED(hr))
598 {
599 ZeroMemory(&pinfo, sizeof(PROPSHEETHEADERW));
600 ZeroMemory(hppages, sizeof(hppages));
601 pinfo.dwSize = sizeof(PROPSHEETHEADERW);
602 pinfo.dwFlags = PSH_NOCONTEXTHELP | PSH_PROPTITLE | PSH_NOAPPLYNOW |
606 pinfo.phpage = hppages;
607 pinfo.hwndParent = hwnd;
609
610 pinfo.pszCaption = pProperties->pszwName;
611 hr = pNCP->AddPages(hwnd, PropSheetExCallback, (LPARAM)&pinfo);
612 if (SUCCEEDED(hr))
613 {
614 if (PropertySheetW(&pinfo) < 0)
615 hr = E_FAIL;
616 }
617 }
618 NcFreeNetconProperties(pProperties);
619 return hr;
620}
#define E_FAIL
Definition: ddrawi.h:102
HRESULT hr
Definition: delayimp.cpp:582
#define NULL
Definition: types.h:112
#define IDI_SHELL_NETWORK_FOLDER
Definition: resource.h:8
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
Definition: combase.c:1685
INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh)
Definition: propsheet.c:2950
HRESULT GetProperties([out] NETCON_PROPERTIES **ppProps)
HRESULT GetUiObjectClassId([out, ref] CLSID *pclsid)
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
#define ZeroMemory
Definition: minwinbase.h:31
LONG_PTR LPARAM
Definition: minwindef.h:175
EXTERN_C const IID IID_INetConnectionPropertyUi
Definition: netcon.h:227
HINSTANCE netshell_hInstance
Definition: netshell.cpp:12
VOID WINAPI NcFreeNetconProperties(NETCON_PROPERTIES *pProps)
Definition: netshell.cpp:119
#define PSH_PROPTITLE
Definition: prsht.h:40
#define PSH_USECALLBACK
Definition: prsht.h:48
#define PSH_USEICONID
Definition: prsht.h:42
struct _PROPSHEETHEADERW PROPSHEETHEADERW
#define PSH_NOAPPLYNOW
Definition: prsht.h:47
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
BOOL CALLBACK PropSheetExCallback(HPROPSHEETPAGE hPage, LPARAM lParam)
#define MAX_PROPERTY_SHEET_PAGE
static int CALLBACK PropSheetProc(HWND hwndDlg, UINT uMsg, LPARAM lParam)
HINSTANCE hInstance
Definition: prsht.h:296
DWORD dwSize
Definition: prsht.h:293
DWORD dwFlags
Definition: prsht.h:294
LPCWSTR pszIcon
Definition: prsht.h:299
HWND hwndParent
Definition: prsht.h:295
PFNPROPSHEETCALLBACK pfnCallback
Definition: prsht.h:311
HPROPSHEETPAGE * phpage
Definition: prsht.h:309
LPCWSTR pszCaption
Definition: prsht.h:301
Definition: mmc.idl:376
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023

Referenced by CNetConUiObject::InvokeCommand(), LANStatusDlg(), LANStatusUiDlg(), and ShowStatusPropertyDialog().