Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 871 of file shfldr_netconnect.cpp.
Referenced by CNetConUiObject::InvokeCommand(), LANStatusUiDlg(), and ShowStatusPropertyDialog().
{ HRESULT hr; CLSID ClassID; PROPSHEETHEADERW pinfo; HPROPSHEETPAGE hppages[MAX_PROPERTY_SHEET_PAGE]; INetConnectionPropertyUi * pNCP; NETCON_PROPERTIES * pProperties; if (pNetConnect->GetProperties(&pProperties) != S_OK) return E_FAIL; hr = pNetConnect->GetUiObjectClassId(&ClassID); if (FAILED(hr)) { NcFreeNetconProperties(pProperties); return hr; } hr = CoCreateInstance(ClassID, NULL, CLSCTX_INPROC_SERVER, IID_INetConnectionPropertyUi, (LPVOID*)&pNCP); if (FAILED(hr)) { NcFreeNetconProperties(pProperties); return hr; } hr = pNCP->SetConnection(pNetConnect); if (SUCCEEDED(hr)) { ZeroMemory(&pinfo, sizeof(PROPSHEETHEADERW)); ZeroMemory(hppages, sizeof(hppages)); pinfo.dwSize = sizeof(PROPSHEETHEADERW); pinfo.dwFlags = PSH_NOCONTEXTHELP | PSH_PROPTITLE | PSH_NOAPPLYNOW; pinfo.phpage = hppages; pinfo.hwndParent = hwnd; pinfo.pszCaption = pProperties->pszwName; hr = pNCP->AddPages(hwnd, PropSheetExCallback, (LPARAM)&pinfo); if (SUCCEEDED(hr)) { if(PropertySheetW(&pinfo) < 0) hr = E_FAIL; } } pNCP->Release(); NcFreeNetconProperties(pProperties); return hr; }