ReactOS 0.4.15-dev-6661-gcc6e444
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 570 of file shfldr_netconnect.cpp.

573{
574 HRESULT hr;
575 CLSID ClassID;
576 PROPSHEETHEADERW pinfo;
579 NETCON_PROPERTIES * pProperties;
580
581 if (pNetConnect->GetProperties(&pProperties) != S_OK)
582 return E_FAIL;
583
584 hr = pNetConnect->GetUiObjectClassId(&ClassID);
585 if (FAILED(hr))
586 {
587 NcFreeNetconProperties(pProperties);
588 return hr;
589 }
590
591 hr = CoCreateInstance(ClassID, NULL, CLSCTX_INPROC_SERVER, IID_INetConnectionPropertyUi, (LPVOID*)&pNCP);
592 if (FAILED(hr))
593 {
594 NcFreeNetconProperties(pProperties);
595 return hr;
596 }
597
598 hr = pNCP->SetConnection(pNetConnect);
599 if (SUCCEEDED(hr))
600 {
601 ZeroMemory(&pinfo, sizeof(PROPSHEETHEADERW));
602 ZeroMemory(hppages, sizeof(hppages));
603 pinfo.dwSize = sizeof(PROPSHEETHEADERW);
604 pinfo.dwFlags = PSH_NOCONTEXTHELP | PSH_PROPTITLE | PSH_NOAPPLYNOW |
608 pinfo.phpage = hppages;
609 pinfo.hwndParent = hwnd;
611
612 pinfo.pszCaption = pProperties->pszwName;
613 hr = pNCP->AddPages(hwnd, PropSheetExCallback, (LPARAM)&pinfo);
614 if (SUCCEEDED(hr))
615 {
616 if (PropertySheetW(&pinfo) < 0)
617 hr = E_FAIL;
618 }
619 }
620 NcFreeNetconProperties(pProperties);
621 return hr;
622}
#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:2905
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:1700
_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().