From 9827e5d24e113c19457dc7ed0d540b5f802996f7 Mon Sep 17 00:00:00 2001 From: Detlef Riekenberg Date: Wed, 7 Mar 2007 00:20:25 +0100 Subject: [PATCH] localspl: Implement DeletePort for XcvDataPort. --- dlls/localspl/localmon.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dlls/localspl/localmon.c b/dlls/localspl/localmon.c index c195c17cd83..c98611d2758 100644 --- a/dlls/localspl/localmon.c +++ b/dlls/localspl/localmon.c @@ -65,6 +65,7 @@ static struct list xcv_handles = LIST_INIT( xcv_handles ); /* ############################### */ +static const WCHAR cmd_DeletePortW[] = {'D','e','l','e','t','e','P','o','r','t',0}; static const WCHAR cmd_ConfigureLPTPortCommandOKW[] = {'C','o','n','f','i','g','u','r','e', 'L','P','T','P','o','r','t', 'C','o','m','m','a','n','d','O','K',0}; @@ -468,6 +469,18 @@ DWORD WINAPI localmon_XcvDataPort(HANDLE hXcv, LPCWSTR pszDataName, PBYTE pInput return res; } + if (!lstrcmpW(pszDataName, cmd_DeletePortW)) { + TRACE("InputData (%d): %s\n", cbInputData, debugstr_w( (LPWSTR) pInputData)); + res = RegOpenKeyW(HKEY_LOCAL_MACHINE, WinNT_CV_PortsW, &hroot); + if (res == ERROR_SUCCESS) { + res = RegDeleteValueW(hroot, (LPWSTR) pInputData); + RegCloseKey(hroot); + TRACE("=> %u with %u\n", res, GetLastError() ); + return res; + } + return ERROR_FILE_NOT_FOUND; + } + if (!lstrcmpW(pszDataName, cmd_GetDefaultCommConfigW)) { TRACE("InputData (%d): %s\n", cbInputData, debugstr_w( (LPWSTR) pInputData)); *pcbOutputNeeded = cbOutputData;