localspl: Implement ConfigurePortW
Detlef Riekenberg
wine.dev at web.de
Tue Nov 14 17:24:10 CST 2006
Changelog:
- localspl: Implement ConfigurePortW
dlg_nothingtoconfig is a seperate Function to
bundle all dialog-related code at the start of
the File.
--
By by ... Detlef
-------------- next part --------------
>From f07adee8fd1ecdb7b1cb5f773306be5c43e9cf4f Mon Sep 17 00:00:00 2001
From: Detlef Riekenberg <wine.dev at web.de>
Date: Wed, 15 Nov 2006 00:18:01 +0100
Subject: [PATCH] localspl: Implement ConfigurePortW
---
dlls/localspl/localmon.c | 53 +++++++++++++++++++++++++++++++++++++-
dlls/localspl/localspl_private.h | 6 ++++
dlls/localspl/spl_De.rc | 3 +-
dlls/localspl/spl_En.rc | 1 +
dlls/localspl/spl_Ko.rc | 1 +
5 files changed, 62 insertions(+), 2 deletions(-)
diff --git a/dlls/localspl/localmon.c b/dlls/localspl/localmon.c
index 30681fe..acb85a5 100644
--- a/dlls/localspl/localmon.c
+++ b/dlls/localspl/localmon.c
@@ -49,6 +49,23 @@ static const WCHAR WinNT_CV_PortsW[] = {
'P','o','r','t','s',0};
/******************************************************************
+ * display the Dialog "Nothing to configure"
+ *
+ */
+
+BOOL dlg_nothingtoconfig(HWND hWnd)
+{
+ WCHAR res_PortW[IDS_LOCALPORT_MAXLEN];
+ WCHAR res_nothingW[IDS_NOTHINGTOCONFIG_MAXLEN];
+ INT reslen_PortW;
+ INT reslen_nothingW;
+
+ reslen_nothingW = LoadStringW(LOCALSPL_hInstance, IDS_NOTHINGTOCONFIG, res_nothingW, IDS_NOTHINGTOCONFIG_MAXLEN);
+ reslen_PortW = LoadStringW(LOCALSPL_hInstance, IDS_LOCALPORT, res_PortW, IDS_LOCALPORT_MAXLEN);
+ return MessageBoxW(hWnd, res_nothingW, res_PortW, MB_OK | MB_ICONINFORMATION);
+}
+
+/******************************************************************
* enumerate the local Ports from the Registry (internal)
*
* See localmon_EnumPortsW.
@@ -155,6 +172,30 @@ getports_cleanup:
}
/*****************************************************
+ * localmon_ConfigurePortW [exported through MONITOREX]
+ *
+ * Display the Configuration-Dialog for a specific Port
+ *
+ * PARAMS
+ * pName [I] Servername or NULL (local Computer)
+ * hWnd [I] Handle to parent Window for the Dialog-Box
+ * pPortName [I] Name of the Port, that should be configured
+ *
+ * RETURNS
+ * Success: TRUE
+ * Failure: FALSE
+ *
+ */
+BOOL WINAPI localmon_ConfigurePortW(LPWSTR pName, HWND hWnd, LPWSTR pPortName)
+{
+ TRACE("(%s, %p, %s)\n", debugstr_w(pName), hWnd, debugstr_w(pPortName));
+ /* ToDo: Dialogs by Portname ("LPTx:", "COMx:") */
+
+ dlg_nothingtoconfig(hWnd);
+ return TRUE;
+}
+
+/*****************************************************
* localmon_EnumPortsW [exported through MONITOREX]
*
* Enumerate all local Ports
@@ -238,7 +279,17 @@ LPMONITOREX WINAPI InitializePrintMonito
{
sizeof(MONITOREX) - sizeof(DWORD),
{
- localmon_EnumPortsW
+ localmon_EnumPortsW,
+ NULL, /* localmon_OpenPortW */
+ NULL, /* localmon_OpenPortExW */
+ NULL, /* localmon_StartDocPortW */
+ NULL, /* localmon_WritePortW */
+ NULL, /* localmon_ReadPortW */
+ NULL, /* localmon_EndDocPortW */
+ NULL, /* localmon_ClosePortW */
+ NULL, /* localmon_AddPortW */
+ NULL, /* localmon_AddPortExW */
+ localmon_ConfigurePortW
}
};
diff --git a/dlls/localspl/localspl_private.h b/dlls/localspl/localspl_private.h
index 00d697a..ad396c2 100644
--- a/dlls/localspl/localspl_private.h
+++ b/dlls/localspl/localspl_private.h
@@ -28,5 +28,11 @@ extern HINSTANCE LOCALSPL_hInstance;
/* ## Resource-ID ## */
#define IDS_LOCALPORT 500
#define IDS_LOCALMONITOR 507
+#define IDS_NOTHINGTOCONFIG 508
+
+/* ## Reserved memorysize for the strings (in WCHAR) ## */
+#define IDS_LOCALMONITOR_MAXLEN 64
+#define IDS_LOCALPORT_MAXLEN 32
+#define IDS_NOTHINGTOCONFIG_MAXLEN 80
#endif /* __WINE_LOCALSPL_PRIVATE__ */
diff --git a/dlls/localspl/spl_De.rc b/dlls/localspl/spl_De.rc
index 0501c4e..acc4776 100644
--- a/dlls/localspl/spl_De.rc
+++ b/dlls/localspl/spl_De.rc
@@ -23,6 +23,7 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
STRINGTABLE DISCARDABLE
{
- IDS_LOCALPORT "Lokaler Anschlu?"
+ IDS_LOCALPORT "Lokaler Anschluss"
IDS_LOCALMONITOR "Lokaler Monitor"
+ IDS_NOTHINGTOCONFIG "Dieser Anschluss hat keine Optionen zum Konfigurieren"
}
diff --git a/dlls/localspl/spl_En.rc b/dlls/localspl/spl_En.rc
index c9d12f4..35584fe 100644
--- a/dlls/localspl/spl_En.rc
+++ b/dlls/localspl/spl_En.rc
@@ -25,4 +25,5 @@ STRINGTABLE DISCARDABLE
{
IDS_LOCALPORT "Local Port"
IDS_LOCALMONITOR "Local Monitor"
+ IDS_NOTHINGTOCONFIG "This Port has no Options to configure"
}
diff --git a/dlls/localspl/spl_Ko.rc b/dlls/localspl/spl_Ko.rc
index b46be3a..7882434 100644
--- a/dlls/localspl/spl_Ko.rc
+++ b/dlls/localspl/spl_Ko.rc
@@ -26,4 +26,5 @@ STRINGTABLE DISCARDABLE
{
IDS_LOCALPORT "???? ????"
IDS_LOCALMONITOR "???? ??????"
+ IDS_NOTHINGTOCONFIG "This Port has no Options to configure"
}
--
1.4.1
More information about the wine-patches
mailing list