Author: pschweitzer
Date: Sun Feb 20 19:23:46 2011
New Revision: 50835
URL:
http://svn.reactos.org/svn/reactos?rev=50835&view=rev
Log:
[WIN32CSR]
Add a new API GetTempFile() that returns an identifier to be used for creating temporary
files.
This API should be in basesrv.dll
Added:
trunk/reactos/subsystems/win32/csrss/win32csr/file.c (with props)
trunk/reactos/subsystems/win32/csrss/win32csr/file.h (with props)
Modified:
trunk/reactos/include/reactos/subsys/csrss/csrss.h
trunk/reactos/subsystems/win32/csrss/win32csr/dllmain.c
trunk/reactos/subsystems/win32/csrss/win32csr/w32csr.h
trunk/reactos/subsystems/win32/csrss/win32csr/win32csr.rbuild
Modified: trunk/reactos/include/reactos/subsys/csrss/csrss.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/subsys/csr…
==============================================================================
--- trunk/reactos/include/reactos/subsys/csrss/csrss.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/subsys/csrss/csrss.h [iso-8859-1] Sun Feb 20 19:23:46
2011
@@ -511,7 +511,12 @@
DWORD NumberOfHistoryBuffers;
DWORD dwFlags;
} CSRSS_GET_HISTORY_INFO, *PCSRSS_GET_HISTORY_INFO,
- CSRSS_SET_HISTORY_INFO, *PCSRSS_SET_HISTORY_INFO;
+ CSRSS_SET_HISTORY_INFO, *PCSRSS_SET_HISTORY_INFO;;
+
+typedef struct
+{
+ UINT UniqueID;
+} CSRSS_GET_TEMP_FILE, *PCSRSS_GET_TEMP_FILE;
#define CSR_API_MESSAGE_HEADER_SIZE(Type) (FIELD_OFFSET(CSR_API_MESSAGE, Data) +
sizeof(Type))
#define CSRSS_MAX_WRITE_CONSOLE (LPC_MAX_DATA_LENGTH -
CSR_API_MESSAGE_HEADER_SIZE(CSRSS_WRITE_CONSOLE))
@@ -592,6 +597,7 @@
#define SET_HISTORY_NUMBER_COMMANDS (0x45)
#define GET_HISTORY_INFO (0x46)
#define SET_HISTORY_INFO (0x47)
+#define GET_TEMP_FILE (0x48)
/* Keep in sync with definition below. */
#define CSRSS_HEADER_SIZE (sizeof(PORT_MESSAGE) + sizeof(ULONG) + sizeof(NTSTATUS))
@@ -673,6 +679,7 @@
CSRSS_SET_HISTORY_NUMBER_COMMANDS SetHistoryNumberCommands;
CSRSS_GET_HISTORY_INFO GetHistoryInfo;
CSRSS_SET_HISTORY_INFO SetHistoryInfo;
+ CSRSS_GET_TEMP_FILE GetTempFile;
} Data;
} CSR_API_MESSAGE, *PCSR_API_MESSAGE;
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/dllmain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/dllmain.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/dllmain.c [iso-8859-1] Sun Feb 20
19:23:46 2011
@@ -87,6 +87,7 @@
CSRSS_DEFINE_API(SET_HISTORY_NUMBER_COMMANDS, CsrSetHistoryNumberCommands),
CSRSS_DEFINE_API(GET_HISTORY_INFO, CsrGetHistoryInfo),
CSRSS_DEFINE_API(SET_HISTORY_INFO, CsrSetHistoryInfo),
+ CSRSS_DEFINE_API(GET_TEMP_FILE, CsrGetTempFile),
{ 0, 0, NULL }
};
Added: trunk/reactos/subsystems/win32/csrss/win32csr/file.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/file.c (added)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/file.c [iso-8859-1] Sun Feb 20 19:23:46
2011
@@ -1,0 +1,33 @@
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS system libraries
+ * FILE: subsys/csrss/win32csr/file.c
+ * PURPOSE: File handling
+ * PROGRAMMERS: Pierre Schweitzer (pierre.schweitzer(a)reactos.org)
+ * NOTE: Belongs to basesrv.dll
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <w32csr.h>
+
+#define NDEBUG
+#include <debug.h>
+
+/* GLOBALS *******************************************************************/
+
+UINT CsrGetTempFileUnique;
+
+/* FUNCTIONS *****************************************************************/
+
+CSR_API(CsrGetTempFile)
+{
+ DPRINT1("CsrGetTempFile entered\n");
+
+ /* Return 16-bits ID */
+ Request->Data.GetTempFile.UniqueID = (++CsrGetTempFileUnique & 0xFFFF);
+
+ DPRINT1("Returning: %u\n", Request->Data.GetTempFile.UniqueID);
+
+ return STATUS_SUCCESS;
+}
Propchange: trunk/reactos/subsystems/win32/csrss/win32csr/file.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/subsystems/win32/csrss/win32csr/file.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/file.h (added)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/file.h [iso-8859-1] Sun Feb 20 19:23:46
2011
@@ -1,0 +1,17 @@
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS system libraries
+ * FILE: subsystem/win32/csrss/win32csr/file.h
+ * PURPOSE: File handling
+ * PROGRAMMERS: Pierre Schweitzer (pierre.schweitzer(a)reactos.org)
+ * NOTE: Belongs to basesrv.dll
+ */
+
+#pragma once
+
+#include "api.h"
+
+/* Api functions */
+CSR_API(CsrGetTempFile);
+
+/* EOF */
Propchange: trunk/reactos/subsystems/win32/csrss/win32csr/file.h
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/w32csr.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/w32csr.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/w32csr.h [iso-8859-1] Sun Feb 20
19:23:46 2011
@@ -18,6 +18,7 @@
#include <conio.h>
#include <csrplugin.h>
#include <desktopbg.h>
+#include "file.h"
#include "guiconsole.h"
#include "tuiconsole.h"
#include <win32csr.h>
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/win32csr.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/win32csr.rbuild [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/win32csr.rbuild [iso-8859-1] Sun Feb 20
19:23:46 2011
@@ -24,6 +24,7 @@
<file>desktopbg.c</file>
<file>dllmain.c</file>
<file>exitros.c</file>
+ <file>file.c</file>
<file>guiconsole.c</file>
<file>handle.c</file>
<file>harderror.c</file>