Using Win32 functions in Visual FoxPro Image Gallery
Data Decompression Library
..msdn
RtlCompressBuffer
RtlDecompressBuffer
RtlGetCompressionWorkSpaceSize
Code examples:
Compressing and decompressing files with Windows API Runtime Library routines
RtlGetCompressionWorkSpaceSize
..msdn    Add comment     W32 Constants      Translate this page
This function is used to determine the correct size of the WorkSpace buffer for the RtlCompressBuffer and RtlDecompressFragment functions.
Code examples:
Compressing and decompressing files with Windows API Runtime Library routines
Declaration:
NTSTATUS RtlGetCompressionWorkSpaceSize(
  __in   USHORT CompressionFormatAndEngine,
  __out  PULONG CompressBufferWorkSpaceSize,
  __out  PULONG CompressFragmentWorkSpaceSize
);
FoxPro declaration:
DECLARE INTEGER RtlGetCompressionWorkSpaceSize IN ntdll;
    SHORT CompressionFormatAndEngine,;
    LONG @CompressBufferWorkSpaceSize,;
    LONG @CompressFragmentWorkSpaceSize
Parameters:
CompressionFormatAndEngine [in]
Bitmask specifying the compression format and engine type.

CompressBufferWorkSpaceSize [out]
A pointer to a caller-allocated buffer receiving the size, in bytes, required to compress a buffer.

CompressFragmentWorkSpaceSize [out]
A pointer to a caller-allocated buffer receiving the size, in bytes, required to decompress a compressed buffer to a fragment.
Return value:
Returns STATUS_SUCCESS (0) or an appropriate error code.
Usage:
#DEFINE COMPRESSION_FORMAT_LZNT1 2
#DEFINE COMPRESSION_ENGINE_STANDARD 0
#DEFINE COMPRESSION_ENGINE_MAXIMUM 0x0100

nFlag = BITOR( COMPRESSION_FORMAT_LZNT1,;
    COMPRESSION_ENGINE_STANDARD )

STORE 0 TO nWorkSpaceCompress,;
    nWorkSpaceDecompress

RETURN RtlGetCompressionWorkSpaceSize( m.nFlag,;
    @nWorkSpaceCompress,;
    @nWorkSpaceDecompress ) = STATUS_SUCCESS
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2010-08-12 18:29:44
Modified: 2010-08-12 18:36:35
Visited in last 7 days: 13
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2014 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.1.68), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Google
Advertise here!