* PROJECT: ReactOS kernel
* FILE: dll/ntdll/csr/capture.c
* PURPOSE: Routines for probing and capturing CSR API Messages
- * PROGRAMMER: Alex Ionescu (alex@relsoft.net)
+ * PROGRAMMERS: Alex Ionescu (alex@relsoft.net)
+ * Hermes Belusca-Maito (hermes.belusca@sfr.fr)
*/
/* INCLUDES *******************************************************************/
/* Align it to a 4-byte boundary */
BufferSize = (BufferSize + 3) & ~3;
+ /* Add the size of the alignment padding for each argument */
+ BufferSize += ArgumentCount * 3;
+
/* Allocate memory from the port heap */
CaptureBuffer = RtlAllocateHeap(CsrPortHeap, HEAP_ZERO_MEMORY, BufferSize);
if (CaptureBuffer == NULL) return NULL;
if (Milliseconds == -1) return NULL;
/* Convert to relative ticks */
- Timeout->QuadPart = Int32x32To64(Milliseconds, -10000);
+ Timeout->QuadPart = Milliseconds * -10000LL;
return Timeout;
}