2005-11-27 20:59:09 +00:00
|
|
|
/*
|
2004-07-18 22:37:08 +00:00
|
|
|
* PROJECT: ReactOS Network Control Panel
|
2011-11-29 14:55:58 +00:00
|
|
|
* FILE: dll/cpl/ncpa/ncpa.c
|
2004-07-18 22:37:08 +00:00
|
|
|
* PURPOSE: ReactOS Network Control Panel
|
|
|
|
* PROGRAMMER: Gero Kuehn (reactos.filter@gkware.com)
|
|
|
|
* UPDATE HISTORY:
|
|
|
|
* 07-18-2004 Created
|
|
|
|
*/
|
|
|
|
|
2013-01-24 23:00:42 +00:00
|
|
|
#define WIN32_NO_STATUS
|
2004-07-18 22:37:08 +00:00
|
|
|
#include <stdarg.h>
|
2013-01-24 23:00:42 +00:00
|
|
|
#include <windef.h>
|
|
|
|
#include <winbase.h>
|
|
|
|
#include <winuser.h>
|
2008-10-17 13:19:04 +00:00
|
|
|
#include <shellapi.h>
|
2004-07-18 22:37:08 +00:00
|
|
|
#include <cpl.h>
|
2005-11-27 20:59:09 +00:00
|
|
|
|
2008-10-17 13:19:04 +00:00
|
|
|
LONG CALLBACK
|
2005-11-10 14:12:53 +00:00
|
|
|
DisplayApplet(VOID)
|
2004-07-18 22:37:08 +00:00
|
|
|
{
|
2015-04-19 15:01:54 +00:00
|
|
|
WCHAR szParameters[] = L"/n,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{7007ACC7-3202-11D1-AAD2-00805FC1270E}";
|
2004-07-18 22:37:08 +00:00
|
|
|
|
2024-06-08 15:09:36 +00:00
|
|
|
/* NOTE: If Explorer shell is not available, use ReactOS's alternative file browser instead */
|
|
|
|
return (INT_PTR) ShellExecuteW(NULL, L"open",
|
|
|
|
GetShellWindow() ? L"explorer.exe" : L"filebrowser.exe",
|
|
|
|
szParameters, NULL, SW_SHOWDEFAULT) > 32;
|
2004-07-18 22:37:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Control Panel Callback */
|
2005-11-10 14:12:53 +00:00
|
|
|
LONG CALLBACK
|
|
|
|
CPlApplet(HWND hwndCPl, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
|
2004-07-18 22:37:08 +00:00
|
|
|
{
|
2006-07-09 21:10:40 +00:00
|
|
|
UNREFERENCED_PARAMETER(hwndCPl);
|
2004-10-31 11:54:58 +00:00
|
|
|
switch (uMsg)
|
2004-07-18 22:37:08 +00:00
|
|
|
{
|
2008-10-17 13:19:04 +00:00
|
|
|
|
2004-10-31 11:54:58 +00:00
|
|
|
case CPL_INIT:
|
2004-07-18 22:37:08 +00:00
|
|
|
{
|
|
|
|
return TRUE;
|
|
|
|
}
|
2004-10-31 11:54:58 +00:00
|
|
|
|
|
|
|
case CPL_GETCOUNT:
|
2004-07-18 22:37:08 +00:00
|
|
|
{
|
2008-10-17 13:19:04 +00:00
|
|
|
return 1;
|
2004-07-18 22:37:08 +00:00
|
|
|
}
|
2004-10-31 11:54:58 +00:00
|
|
|
case CPL_DBLCLK:
|
2004-07-18 22:37:08 +00:00
|
|
|
{
|
2008-10-17 13:19:04 +00:00
|
|
|
DisplayApplet();
|
2004-07-18 22:37:08 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2004-10-31 11:54:58 +00:00
|
|
|
|
2004-07-18 22:37:08 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
|
|
|
|
{
|
2006-07-09 21:10:40 +00:00
|
|
|
UNREFERENCED_PARAMETER(lpvReserved);
|
|
|
|
|
2004-07-18 22:37:08 +00:00
|
|
|
switch(dwReason)
|
|
|
|
{
|
2004-10-31 11:54:58 +00:00
|
|
|
case DLL_PROCESS_ATTACH:
|
|
|
|
case DLL_THREAD_ATTACH:
|
2004-07-18 22:37:08 +00:00
|
|
|
break;
|
|
|
|
}
|
2004-10-31 11:54:58 +00:00
|
|
|
|
2004-07-18 22:37:08 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|