ReactOS  0.4.14-dev-41-g31d7680
netshell.cpp File Reference
#include "precomp.h"
Include dependency graph for netshell.cpp:

Go to the source code of this file.

Classes

class  CNetshellModule
 

Functions

HPROPSHEETPAGE InitializePropertySheetPage (LPWSTR resname, DLGPROC dlgproc, LPARAM lParam, LPWSTR szTitle)
 
BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
 
HRESULT WINAPI DllCanUnloadNow (void)
 
STDAPI DllRegisterServer (void)
 
STDAPI DllUnregisterServer (void)
 
STDAPI DllGetClassObject (REFCLSID rclsid, REFIID riid, LPVOID *ppv)
 
VOID WINAPI NcFreeNetconProperties (NETCON_PROPERTIES *pProps)
 
BOOL WINAPI NcIsValidConnectionName (_In_ PCWSTR pszwName)
 

Variables

HMODULE g_hModule = NULL
 
HINSTANCE netshell_hInstance
 
CNetshellModule gModule
 

Function Documentation

◆ DllCanUnloadNow()

HRESULT WINAPI DllCanUnloadNow ( void  )

Definition at line 71 of file netshell.cpp.

72 {
73  return S_FALSE;
74 }
#define S_FALSE
Definition: winerror.h:2357

◆ DllGetClassObject()

STDAPI DllGetClassObject ( REFCLSID  rclsid,
REFIID  riid,
LPVOID ppv 
)

Definition at line 109 of file netshell.cpp.

113 {
114  return gModule.DllGetClassObject(rclsid, riid, ppv);
115 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
HRESULT DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
Definition: atlbase.h:935
CNetshellModule gModule
Definition: netshell.cpp:26

◆ DllMain()

BOOL WINAPI DllMain ( HINSTANCE  hinstDLL,
DWORD  fdwReason,
LPVOID  fImpLoad 
)

Definition at line 53 of file netshell.cpp.

54 {
55  switch (fdwReason)
56  {
57  case DLL_PROCESS_ATTACH:
58  netshell_hInstance = hinstDLL;
60  gModule.Init(ObjectMap, netshell_hInstance, NULL);
61  break;
62  default:
63  break;
64  }
65 
66  return TRUE;
67 }
#define TRUE
Definition: types.h:120
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
#define DLL_PROCESS_ATTACH
Definition: compat.h:120
HINSTANCE netshell_hInstance
Definition: netshell.cpp:12
HRESULT Init(_ATL_OBJMAP_ENTRY *p, HINSTANCE, const GUID *plibid)
Definition: atlbase.h:797
smooth NULL
Definition: ftsmooth.c:416
CNetshellModule gModule
Definition: netshell.cpp:26

◆ DllRegisterServer()

STDAPI DllRegisterServer ( void  )

Definition at line 77 of file netshell.cpp.

78 {
79  HRESULT hr;
80 
83  return hr;
84 
87  return hr;
88 
89  return S_OK;
90 }
#define TRUE
Definition: types.h:120
HRESULT DllRegisterServer(BOOL bRegTypeLib=TRUE)
Definition: atlbase.h:940
#define IDR_NETSHELL
Definition: resource.h:127
HRESULT hr
Definition: shlfolder.c:183
smooth NULL
Definition: ftsmooth.c:416
HRESULT WINAPI UpdateRegistryFromResource(LPCTSTR lpszRes, BOOL bRegister, struct _ATL_REGMAP_ENTRY *pMapEntries=NULL)
Definition: atlbase.h:439
LONG HRESULT
Definition: typedefs.h:77
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
#define S_OK
Definition: intsafe.h:59
CNetshellModule gModule
Definition: netshell.cpp:26

◆ DllUnregisterServer()

STDAPI DllUnregisterServer ( void  )

Definition at line 93 of file netshell.cpp.

94 {
95  HRESULT hr;
96 
99  return hr;
100 
102  if (FAILED_UNEXPECTEDLY(hr))
103  return hr;
104 
105  return S_OK;
106 }
#define IDR_NETSHELL
Definition: resource.h:127
HRESULT hr
Definition: shlfolder.c:183
smooth NULL
Definition: ftsmooth.c:416
HRESULT WINAPI UpdateRegistryFromResource(LPCTSTR lpszRes, BOOL bRegister, struct _ATL_REGMAP_ENTRY *pMapEntries=NULL)
Definition: atlbase.h:439
LONG HRESULT
Definition: typedefs.h:77
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
#define S_OK
Definition: intsafe.h:59
HRESULT DllUnregisterServer(BOOL bUnRegTypeLib=TRUE)
Definition: atlbase.h:945
CNetshellModule gModule
Definition: netshell.cpp:26

◆ InitializePropertySheetPage()

HPROPSHEETPAGE InitializePropertySheetPage ( LPWSTR  resname,
DLGPROC  dlgproc,
LPARAM  lParam,
LPWSTR  szTitle 
)

Definition at line 29 of file netshell.cpp.

30 {
31  PROPSHEETPAGEW ppage;
32 
33  memset(&ppage, 0x0, sizeof(PROPSHEETPAGEW));
34  ppage.dwSize = sizeof(PROPSHEETPAGEW);
35  ppage.dwFlags = PSP_DEFAULT;
36  ppage.pszTemplate = resname;
37  ppage.pfnDlgProc = dlgproc;
38  ppage.lParam = lParam;
40  if (szTitle)
41  {
42  ppage.dwFlags |= PSP_USETITLE;
43  ppage.pszTitle = szTitle;
44  }
45  return CreatePropertySheetPageW(&ppage);
46 }
LPCWSTR pszTemplate
Definition: prsht.h:209
GLint x0
Definition: linetemp.h:95
HINSTANCE netshell_hInstance
Definition: netshell.cpp:12
DWORD dwSize
Definition: prsht.h:205
DLGPROC pfnDlgProc
Definition: prsht.h:217
struct _PROPSHEETPAGEW PROPSHEETPAGEW
LPCWSTR pszTitle
Definition: prsht.h:216
HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW lpPropSheetPage)
Definition: propsheet.c:3072
#define PSP_DEFAULT
Definition: prsht.h:22
TCHAR szTitle[MAX_LOADSTRING]
Definition: magnifier.c:35
LPARAM lParam
Definition: prsht.h:218
HINSTANCE hInstance
Definition: prsht.h:207
#define PSP_USETITLE
Definition: prsht.h:26
#define memset(x, y, z)
Definition: compat.h:39
LPARAM lParam
Definition: combotst.c:139
DWORD dwFlags
Definition: prsht.h:206

Referenced by CNetConnectionPropertyUi::AddPages(), and ShowStatusPropertyDialog().

◆ NcFreeNetconProperties()

◆ NcIsValidConnectionName()

BOOL WINAPI NcIsValidConnectionName ( _In_ PCWSTR  pszwName)

Definition at line 128 of file netshell.cpp.

129 {
130  if (!pszwName)
131  return FALSE;
132 
133  BOOL nonSpace = FALSE;
134  while (*pszwName)
135  {
136  switch(*(pszwName++))
137  {
138  case L'\\':
139  case L'/':
140  case L':':
141  case L'*':
142  case L'\t':
143  case L'?':
144  case L'<':
145  case L'>':
146  case L'|':
147  case L'\"':
148  return FALSE;
149  case L' ':
150  break;
151  default:
152  nonSpace = TRUE;
153  break;
154  }
155  }
156  return nonSpace;
157 }
#define TRUE
Definition: types.h:120
unsigned int BOOL
Definition: ntddk_ex.h:94
static const WCHAR L[]
Definition: oid.c:1250

Variable Documentation

◆ g_hModule

HMODULE g_hModule = NULL

Definition at line 10 of file netshell.cpp.

◆ gModule

CNetshellModule gModule

Definition at line 26 of file netshell.cpp.

Referenced by DllGetClassObject(), DllMain(), DllRegisterServer(), and DllUnregisterServer().

◆ netshell_hInstance