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 18 LONG CALLBACK 19 DisplayApplet(VOID) 20 { 21 WCHAR szParameters[] = L"/n,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{7007ACC7-3202-11D1-AAD2-00805FC1270E}"; 22 23 return (INT_PTR) ShellExecuteW(NULL, L"open", L"explorer.exe", szParameters, NULL, SW_SHOWDEFAULT) > 32; 24 } 25 26 /* Control Panel Callback */ 27 LONG CALLBACK 28 CPlApplet(HWND hwndCPl, UINT uMsg, LPARAM lParam1, LPARAM lParam2) 29 { 30 UNREFERENCED_PARAMETER(hwndCPl); 31 switch (uMsg) 32 { 33 34 case CPL_INIT: 35 { 36 return TRUE; 37 } 38 39 case CPL_GETCOUNT: 40 { 41 return 1; 42 } 43 case CPL_DBLCLK: 44 { 45 DisplayApplet(); 46 break; 47 } 48 } 49 50 return FALSE; 51 } 52 53 54 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved) 55 { 56 UNREFERENCED_PARAMETER(lpvReserved); 57 58 switch(dwReason) 59 { 60 case DLL_PROCESS_ATTACH: 61 case DLL_THREAD_ATTACH: 62 break; 63 } 64 65 return TRUE; 66 } 67