ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

telephon.c
Go to the documentation of this file.
00001 /*
00002  *
00003  * PROJECT:         ReactOS Software Control Panel
00004  * FILE:            dll/cpl/telephon/telephon.c
00005  * PURPOSE:         ReactOS Software Control Panel
00006  * PROGRAMMER:      Dmitry Chapyshev (dmitry@reactos.org)
00007  * UPDATE HISTORY:
00008  *    10-19-2007  Created
00009  */
00010 
00011 #include <windows.h>
00012 #include <cpl.h>
00013 
00014 #include "resource.h"
00015 
00016 typedef LONG (CALLBACK* LPINTERNALCONFIG)(HWND, UINT, LPARAM, LPARAM);
00017 
00018 /* Control Panel Callback */
00019 LONG CALLBACK
00020 CPlApplet(HWND hwndCPl, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
00021 {
00022     LPINTERNALCONFIG lpInternalConfig;
00023     HINSTANCE hTapi32;
00024     CPLINFO *CPlInfo;
00025 
00026     switch (uMsg)
00027     {
00028         case CPL_INIT:
00029             return TRUE;
00030 
00031         case CPL_GETCOUNT:
00032             return 1;
00033 
00034         case CPL_INQUIRE:
00035             CPlInfo = (CPLINFO*)lParam2;
00036             CPlInfo->lData = 0;
00037             CPlInfo->idIcon = IDI_CPLSYSTEM;
00038             CPlInfo->idName = IDS_CPLSYSTEMNAME;
00039             CPlInfo->idInfo = IDS_CPLSYSTEMDESCRIPTION;
00040             break;
00041 
00042         case CPL_DBLCLK:
00043         {
00044             hTapi32 = LoadLibraryW(L"tapi32.dll");
00045             if (!hTapi32) return FALSE;
00046 
00047             lpInternalConfig = (LPINTERNALCONFIG) GetProcAddress(hTapi32, "internalConfig");
00048             if (!lpInternalConfig)
00049             {
00050                 FreeLibrary(hTapi32);
00051                 return FALSE;
00052             }
00053 
00054             lpInternalConfig(hwndCPl, 0, 0, 0);
00055             FreeLibrary(hTapi32);
00056             return TRUE;
00057         }
00058     }
00059 
00060     return FALSE;
00061 }
00062 
00063 BOOL WINAPI
00064 DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
00065 {
00066     return TRUE;
00067 }

Generated on Sun May 27 2012 04:21:01 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.