Source code of Windows XP (NT5)
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
/*++
Copyright (c) 1998 Microsoft Corporation
Module Name:
init.c
Abstract:
This module contains the code to initialize the cab file engine.
Author:
Wesley Witt (wesw) 29-Sept-1998
Revision History:
--*/
#include <ntcabp.h>
#pragma hdrstop
PVOID NtCabInitialize( void ) { ULONG CompressBufferWorkSpaceSize; ULONG CompressFragmentWorkSpaceSize; PCAB_INSTANCE_DATA CabInst;
CabInst = malloc( sizeof(CAB_INSTANCE_DATA) ); ZeroMemory( CabInst, sizeof(CAB_INSTANCE_DATA) );
RtlGetCompressionWorkSpaceSize( COMPRESSION_FLAGS, &CompressBufferWorkSpaceSize, &CompressFragmentWorkSpaceSize );
CabInst->WorkSpace = (LPBYTE) malloc( CompressBufferWorkSpaceSize ); ZeroMemory( CabInst->WorkSpace, CompressBufferWorkSpaceSize );
CabInst->ReadBufSize = 4096*16; CabInst->ReadBuf = (LPBYTE) malloc( CabInst->ReadBufSize );
CabInst->CompressBufSize = CabInst->ReadBufSize*2; CabInst->CompressBuf = (LPBYTE) malloc( CabInst->CompressBufSize );
return CabInst; }
|