ReactOS 0.4.15-dev-8339-g4028de8
telephon.c
Go to the documentation of this file.
1/*
2 *
3 * PROJECT: ReactOS Software Control Panel
4 * FILE: dll/cpl/telephon/telephon.c
5 * PURPOSE: ReactOS Software Control Panel
6 * PROGRAMMER: Dmitry Chapyshev (dmitry@reactos.org)
7 * UPDATE HISTORY:
8 * 10-19-2007 Created
9 */
10
11#define WIN32_NO_STATUS
12#include <stdarg.h>
13#include <windef.h>
14#include <winbase.h>
15#include <cpl.h>
16
17#include "resource.h"
18
20
21/* Control Panel Callback */
23CPlApplet(HWND hwndCPl, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
24{
25 LPINTERNALCONFIG lpInternalConfig;
26 HINSTANCE hTapi32;
27 CPLINFO *CPlInfo;
28
29 switch (uMsg)
30 {
31 case CPL_INIT:
32 return TRUE;
33
34 case CPL_GETCOUNT:
35 return 1;
36
37 case CPL_INQUIRE:
38 CPlInfo = (CPLINFO*)lParam2;
39 CPlInfo->lData = 0;
40 CPlInfo->idIcon = IDI_CPLSYSTEM;
41 CPlInfo->idName = IDS_CPLSYSTEMNAME;
43 break;
44
45 case CPL_DBLCLK:
46 {
47 hTapi32 = LoadLibraryW(L"tapi32.dll");
48 if (!hTapi32) return FALSE;
49
50 lpInternalConfig = (LPINTERNALCONFIG) GetProcAddress(hTapi32, "internalConfig");
51 if (!lpInternalConfig)
52 {
53 FreeLibrary(hTapi32);
54 return FALSE;
55 }
56
57 lpInternalConfig(hwndCPl, 0, 0, 0);
58 FreeLibrary(hTapi32);
59 return TRUE;
60 }
61 }
62
63 return FALSE;
64}
65
68{
69 return TRUE;
70}
DWORD dwReason
Definition: misc.cpp:154
#define CPL_INQUIRE
Definition: cpl.h:14
#define CPL_DBLCLK
Definition: cpl.h:16
#define CPL_INIT
Definition: cpl.h:12
#define CPL_GETCOUNT
Definition: cpl.h:13
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define IDS_CPLSYSTEMNAME
Definition: resource.h:23
#define IDS_CPLSYSTEMDESCRIPTION
Definition: resource.h:24
#define IDI_CPLSYSTEM
Definition: resource.h:4
HANDLE HWND
Definition: compat.h:19
#define GetProcAddress(x, y)
Definition: compat.h:753
#define FreeLibrary(x)
Definition: compat.h:748
#define CALLBACK
Definition: compat.h:35
#define LoadLibraryW(x)
Definition: compat.h:747
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
static IN DWORD IN LPVOID lpvReserved
unsigned int UINT
Definition: ndis.h:50
#define L(x)
Definition: ntvdm.h:50
long LONG
Definition: pedump.c:60
Definition: cpl.h:24
LONG_PTR lData
Definition: cpl.h:28
int idName
Definition: cpl.h:26
int idInfo
Definition: cpl.h:27
int idIcon
Definition: cpl.h:25
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
Definition: telephon.c:67
LONG(CALLBACK * LPINTERNALCONFIG)(HWND, UINT, LPARAM, LPARAM)
Definition: telephon.c:19
LONG_PTR LPARAM
Definition: windef.h:208
#define WINAPI
Definition: msvc.h:6