ReactOS 0.4.16-dev-329-g9223134
ncpa.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Network Control Panel
3 * FILE: dll/cpl/ncpa/ncpa.c
4 * PURPOSE: ReactOS Network Control Panel
5 * PROGRAMMER: Gero Kuehn (reactos.filter@gkware.com)
6 * UPDATE HISTORY:
7 * 07-18-2004 Created
8 */
9
10#define WIN32_NO_STATUS
11#include <stdarg.h>
12#include <windef.h>
13#include <winbase.h>
14#include <winuser.h>
15#include <shellapi.h>
16#include <cpl.h>
17
20{
21 WCHAR szParameters[] = L"/n,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{7007ACC7-3202-11D1-AAD2-00805FC1270E}";
22
23 /* NOTE: If Explorer shell is not available, use ReactOS's alternative file browser instead */
24 return (INT_PTR) ShellExecuteW(NULL, L"open",
25 GetShellWindow() ? L"explorer.exe" : L"filebrowser.exe",
26 szParameters, NULL, SW_SHOWDEFAULT) > 32;
27}
28
29/* Control Panel Callback */
31CPlApplet(HWND hwndCPl, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
32{
34 switch (uMsg)
35 {
36
37 case CPL_INIT:
38 {
39 return TRUE;
40 }
41
42 case CPL_GETCOUNT:
43 {
44 return 1;
45 }
46 case CPL_DBLCLK:
47 {
49 break;
50 }
51 }
52
53 return FALSE;
54}
55
56
58{
60
61 switch(dwReason)
62 {
65 break;
66 }
67
68 return TRUE;
69}
DWORD dwReason
Definition: misc.cpp:141
#define CPL_DBLCLK
Definition: cpl.h:16
#define CPL_INIT
Definition: cpl.h:12
#define CPL_GETCOUNT
Definition: cpl.h:13
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define CALLBACK
Definition: compat.h:35
#define DLL_THREAD_ATTACH
Definition: compat.h:132
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
static IN DWORD IN LPVOID lpvReserved
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
Definition: ncpa.c:57
LONG CALLBACK DisplayApplet(VOID)
Definition: ncpa.c:19
unsigned int UINT
Definition: ndis.h:50
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:325
#define L(x)
Definition: ntvdm.h:50
long LONG
Definition: pedump.c:60
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
Definition: shlexec.cpp:2492
int32_t INT_PTR
Definition: typedefs.h:64
HWND WINAPI GetShellWindow(VOID)
Definition: desktop.c:651
LONG_PTR LPARAM
Definition: windef.h:208
#define WINAPI
Definition: msvc.h:6
#define SW_SHOWDEFAULT
Definition: winuser.h:783
__wchar_t WCHAR
Definition: xmlstorage.h:180