ReactOS  0.4.14-dev-77-gd9e7c48
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;
610  pinfo.pfnCallback = PropSheetProc;
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 }
HWND hwndParent
Definition: prsht.h:277
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define PSH_NOAPPLYNOW
Definition: prsht.h:47
HRESULT hr
Definition: shlfolder.c:183
HRESULT GetProperties([out] NETCON_PROPERTIES **ppProps)
#define ZeroMemory
Definition: winbase.h:1635
struct _PROPSHEETHEADERW PROPSHEETHEADERW
#define PSH_USECALLBACK
Definition: prsht.h:48
#define E_FAIL
Definition: ddrawi.h:102
static int CALLBACK PropSheetProc(HWND hwndDlg, UINT uMsg, LPARAM lParam)
VOID WINAPI NcFreeNetconProperties(NETCON_PROPERTIES *pProps)
Definition: netshell.cpp:119
HINSTANCE netshell_hInstance
Definition: netshell.cpp:12
EXTERN_C const IID IID_INetConnectionPropertyUi
Definition: netcon.h:227
#define PSH_USEICONID
Definition: prsht.h:42
LPCWSTR pszCaption
Definition: prsht.h:283
struct _PSP * HPROPSHEETPAGE
Definition: mstask.idl:90
PFNPROPSHEETCALLBACK pfnCallback
Definition: prsht.h:293
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh)
Definition: propsheet.c:2902
#define IDI_SHELL_NETWORK_FOLDER
Definition: resource.h:5
#define PSH_PROPTITLE
Definition: prsht.h:40
LONG HRESULT
Definition: typedefs.h:77
HINSTANCE hInstance
Definition: prsht.h:278
BOOL CALLBACK PropSheetExCallback(HPROPSHEETPAGE hPage, LPARAM lParam)
LPCWSTR pszIcon
Definition: prsht.h:281
DWORD dwSize
Definition: prsht.h:275
DWORD dwFlags
Definition: prsht.h:276
HPROPSHEETPAGE * phpage
Definition: prsht.h:291
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3234
#define S_OK
Definition: intsafe.h:59
HRESULT GetUiObjectClassId([out, ref] CLSID *pclsid)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define MAX_PROPERTY_SHEET_PAGE
#define SUCCEEDED(hr)
Definition: intsafe.h:57

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