ReactOS 0.4.15-dev-7711-g5627da4
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 550 of file shfldr_netconnect.cpp.

553{
554 HRESULT hr;
555 CLSID ClassID;
556 PROPSHEETHEADERW pinfo;
559 NETCON_PROPERTIES * pProperties;
560
561 if (pNetConnect->GetProperties(&pProperties) != S_OK)
562 return E_FAIL;
563
564 hr = pNetConnect->GetUiObjectClassId(&ClassID);
565 if (FAILED(hr))
566 {
567 NcFreeNetconProperties(pProperties);
568 return hr;
569 }
570
571 hr = CoCreateInstance(ClassID, NULL, CLSCTX_INPROC_SERVER, IID_INetConnectionPropertyUi, (LPVOID*)&pNCP);
572 if (FAILED(hr))
573 {
574 NcFreeNetconProperties(pProperties);
575 return hr;
576 }
577
578 hr = pNCP->SetConnection(pNetConnect);
579 if (SUCCEEDED(hr))
580 {
581 ZeroMemory(&pinfo, sizeof(PROPSHEETHEADERW));
582 ZeroMemory(hppages, sizeof(hppages));
583 pinfo.dwSize = sizeof(PROPSHEETHEADERW);
584 pinfo.dwFlags = PSH_NOCONTEXTHELP | PSH_PROPTITLE | PSH_NOAPPLYNOW |
588 pinfo.phpage = hppages;
589 pinfo.hwndParent = hwnd;
591
592 pinfo.pszCaption = pProperties->pszwName;
593 hr = pNCP->AddPages(hwnd, PropSheetExCallback, (LPARAM)&pinfo);
594 if (SUCCEEDED(hr))
595 {
596 if (PropertySheetW(&pinfo) < 0)
597 hr = E_FAIL;
598 }
599 }
600 NcFreeNetconProperties(pProperties);
601 return hr;
602}
#define E_FAIL
Definition: ddrawi.h:102
#define NULL
Definition: types.h:112
#define IDI_SHELL_NETWORK_FOLDER
Definition: resource.h:5
INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh)
Definition: propsheet.c:2913
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
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
struct _PSP * HPROPSHEETPAGE
Definition: mstask.idl:90
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
BOOL CALLBACK PropSheetExCallback(HPROPSHEETPAGE hPage, LPARAM lParam)
#define MAX_PROPERTY_SHEET_PAGE
static int CALLBACK PropSheetProc(HWND hwndDlg, UINT uMsg, LPARAM lParam)
HRESULT hr
Definition: shlfolder.c:183
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
#define ZeroMemory
Definition: winbase.h:1712
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582

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