I'm trying to activate the compression feature in AVIFIL32.DLL using monoceres' My problem is that the return value of the call $aRet = DllCall($Avi32_Dll, "int", "AVIMakeCompressedStream", "ptr*", 0, "ptr", $pstream, "ptr", DllStructGetPtr($aco), "ptr*", 0)is always 0x80040154 which is an error. You can check out at MSDN how the AVI functions have to be called. Further I tried understand the VB5 code how the code is activating the compression. Here the modified AVIWriter code which will