Author: aandrejevic
Date: Mon Feb 10 14:24:36 2014
New Revision: 62098
URL:
http://svn.reactos.org/svn/reactos?rev=62098&view=rev
Log:
[KERNEL32]
Implement SetVDMCurrentDirectories.
Modified:
branches/ntvdm/dll/win32/kernel32/client/vdm.c
Modified: branches/ntvdm/dll/win32/kernel32/client/vdm.c
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/dll/win32/kernel32/client…
==============================================================================
--- branches/ntvdm/dll/win32/kernel32/client/vdm.c [iso-8859-1] (original)
+++ branches/ntvdm/dll/win32/kernel32/client/vdm.c [iso-8859-1] Mon Feb 10 14:24:36 2014
@@ -1239,17 +1239,44 @@
/*
- * @unimplemented
+ * @implemented
*/
BOOL
WINAPI
-SetVDMCurrentDirectories (
- DWORD Unknown0,
- DWORD Unknown1
- )
-{
- STUB;
- return FALSE;
+SetVDMCurrentDirectories(DWORD cchCurDirs, PCHAR lpszzCurDirs)
+{
+ BASE_API_MESSAGE ApiMessage;
+ PBASE_GETSET_VDM_CURDIRS VDMCurrentDirsRequest =
&ApiMessage.Data.VDMCurrentDirsRequest;
+ PCSR_CAPTURE_BUFFER CaptureBuffer;
+
+ /* Allocate the capture buffer */
+ CaptureBuffer = CsrAllocateCaptureBuffer(1, cchCurDirs);
+ if (CaptureBuffer == NULL)
+ {
+ BaseSetLastNTError(STATUS_NO_MEMORY);
+ return FALSE;
+ }
+
+ /* Setup the input parameters */
+ VDMCurrentDirsRequest->cchCurDirs = cchCurDirs;
+ CsrCaptureMessageBuffer(CaptureBuffer,
+ lpszzCurDirs,
+ cchCurDirs,
+ (PVOID*)&VDMCurrentDirsRequest->lpszzCurDirs);
+
+ /* Call CSRSS */
+ CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
+ CaptureBuffer,
+ CSR_CREATE_API_NUMBER(BASESRV_SERVERDLL_INDEX,
BasepGetVDMCurDirs),
+ sizeof(BASE_GETSET_VDM_CURDIRS));
+
+ /* Free the capture buffer */
+ CsrFreeCaptureBuffer(CaptureBuffer);
+
+ /* Set the last error */
+ BaseSetLastNTError(ApiMessage.Status);
+
+ return NT_SUCCESS(ApiMessage.Status) ? TRUE : FALSE;
}
/*