* Sync up to trunk head (r65394).
[reactos.git] / dll / win32 / msports / serial.c
1 /*
2 * PROJECT: Ports installer library
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: dll\win32\msports\serial.c
5 * PURPOSE: Serial Port property functions
6 * COPYRIGHT: Copyright 2011 Eric Kohl
7 */
8
9 #include "precomp.h"
10
11 static
12 BOOL
13 OnInitDialog(HWND hwnd,
14 WPARAM wParam,
15 LPARAM lParam)
16 {
17 FIXME("Port_OnInit()\n");
18 return TRUE;
19 }
20
21
22 static
23 INT_PTR
24 CALLBACK
25 SerialSettingsDlgProc(HWND hwnd,
26 UINT uMsg,
27 WPARAM wParam,
28 LPARAM lParam)
29 {
30 FIXME("SerialSettingsDlgProc()\n");
31
32 switch (uMsg)
33 {
34 case WM_INITDIALOG:
35 return OnInitDialog(hwnd, wParam, lParam);
36 }
37
38 return FALSE;
39 }
40
41
42 BOOL
43 WINAPI
44 SerialPortPropPageProvider(PSP_PROPSHEETPAGE_REQUEST lpPropSheetPageRequest,
45 LPFNADDPROPSHEETPAGE lpfnAddPropSheetPageProc,
46 LPARAM lParam)
47 {
48 PROPSHEETPAGEW PropSheetPage;
49 HPROPSHEETPAGE hPropSheetPage;
50
51 FIXME("SerialPortPropPageProvider(%p %p %lx)\n",
52 lpPropSheetPageRequest, lpfnAddPropSheetPageProc, lParam);
53
54 if (lpPropSheetPageRequest->PageRequested == SPPSR_ENUM_ADV_DEVICE_PROPERTIES)
55 {
56 FIXME("SPPSR_ENUM_ADV_DEVICE_PROPERTIES\n");
57
58 PropSheetPage.dwSize = sizeof(PROPSHEETPAGEW);
59 PropSheetPage.dwFlags = 0;
60 PropSheetPage.hInstance = hInstance;
61 PropSheetPage.pszTemplate = MAKEINTRESOURCE(IDD_SERIALSETTINGS);
62 PropSheetPage.pfnDlgProc = SerialSettingsDlgProc;
63 PropSheetPage.lParam = 0;
64 PropSheetPage.pfnCallback = NULL;
65
66 hPropSheetPage = CreatePropertySheetPageW(&PropSheetPage);
67 if (hPropSheetPage == NULL)
68 {
69 FIXME("CreatePropertySheetPageW() failed!\n");
70 return FALSE;
71 }
72
73 if (!(*lpfnAddPropSheetPageProc)(hPropSheetPage, lParam))
74 {
75 FIXME("lpfnAddPropSheetPageProc() failed!\n");
76 DestroyPropertySheetPage(hPropSheetPage);
77 return FALSE;
78 }
79 }
80
81 FIXME("Done!\n");
82
83 return TRUE;
84 }
85
86 /* EOF */