2007-11-09 14:56:33 +00:00
|
|
|
/*
|
|
|
|
*
|
2009-01-25 11:45:47 +00:00
|
|
|
* PROJECT: ReactOS Software Control Panel
|
|
|
|
* FILE: dll/cpl/telephon/telephon.c
|
|
|
|
* PURPOSE: ReactOS Software Control Panel
|
|
|
|
* PROGRAMMER: Dmitry Chapyshev (dmitry@reactos.org)
|
2007-11-09 14:56:33 +00:00
|
|
|
* UPDATE HISTORY:
|
2009-01-25 11:45:47 +00:00
|
|
|
* 10-19-2007 Created
|
2007-11-09 14:56:33 +00:00
|
|
|
*/
|
|
|
|
|
2013-01-24 23:00:42 +00:00
|
|
|
#define WIN32_NO_STATUS
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <windef.h>
|
|
|
|
#include <winbase.h>
|
2009-01-25 11:45:47 +00:00
|
|
|
#include <cpl.h>
|
2008-07-03 16:46:39 +00:00
|
|
|
|
2009-01-25 11:45:47 +00:00
|
|
|
#include "resource.h"
|
2008-07-03 16:46:39 +00:00
|
|
|
|
2009-01-25 18:02:24 +00:00
|
|
|
typedef LONG (CALLBACK* LPINTERNALCONFIG)(HWND, UINT, LPARAM, LPARAM);
|
2007-11-09 14:56:33 +00:00
|
|
|
|
|
|
|
/* Control Panel Callback */
|
|
|
|
LONG CALLBACK
|
|
|
|
CPlApplet(HWND hwndCPl, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
|
|
|
|
{
|
2009-01-25 11:45:47 +00:00
|
|
|
LPINTERNALCONFIG lpInternalConfig;
|
|
|
|
HINSTANCE hTapi32;
|
2007-11-09 14:56:33 +00:00
|
|
|
CPLINFO *CPlInfo;
|
|
|
|
|
|
|
|
switch (uMsg)
|
|
|
|
{
|
|
|
|
case CPL_INIT:
|
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
case CPL_GETCOUNT:
|
2009-01-25 11:45:47 +00:00
|
|
|
return 1;
|
2007-11-09 14:56:33 +00:00
|
|
|
|
|
|
|
case CPL_INQUIRE:
|
|
|
|
CPlInfo = (CPLINFO*)lParam2;
|
|
|
|
CPlInfo->lData = 0;
|
2009-01-25 11:45:47 +00:00
|
|
|
CPlInfo->idIcon = IDI_CPLSYSTEM;
|
|
|
|
CPlInfo->idName = IDS_CPLSYSTEMNAME;
|
|
|
|
CPlInfo->idInfo = IDS_CPLSYSTEMDESCRIPTION;
|
2007-11-09 14:56:33 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case CPL_DBLCLK:
|
2009-01-25 11:45:47 +00:00
|
|
|
{
|
|
|
|
hTapi32 = LoadLibraryW(L"tapi32.dll");
|
|
|
|
if (!hTapi32) return FALSE;
|
|
|
|
|
|
|
|
lpInternalConfig = (LPINTERNALCONFIG) GetProcAddress(hTapi32, "internalConfig");
|
2009-01-25 18:02:24 +00:00
|
|
|
if (!lpInternalConfig)
|
|
|
|
{
|
|
|
|
FreeLibrary(hTapi32);
|
|
|
|
return FALSE;
|
|
|
|
}
|
2009-01-25 11:45:47 +00:00
|
|
|
|
|
|
|
lpInternalConfig(hwndCPl, 0, 0, 0);
|
2009-01-25 11:55:02 +00:00
|
|
|
FreeLibrary(hTapi32);
|
2009-01-25 11:45:47 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
2007-11-09 14:56:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
BOOL WINAPI
|
|
|
|
DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
|
|
|
|
{
|
|
|
|
return TRUE;
|
|
|
|
}
|