This COM automation server implements one method CopyTo(OutStream,InStream,noOfBytes) which works similar to the standard NAV function COPYSTREAM, except that you can specify the number of bytes to copy as a third parameter. If noOfBytes = 0 then the copy is done till the end of InStream. The method returns the number of bytes that have been copied.
In the ZIP file you can find a demo codeunit to test the method. You need .NET Framework 2.0 (or higher) and you have to register the dll with the following command before you can use in within NAV:regasm.exe /codebase /tlb myISTREAM.dll (registration with regsvr32 is not possible!!)regasm.exe is part of .NET Framework and can be found in the folder C:\Windows\Microsoft.NET\Framework\v2.0.50727 (or similar)
With this tool you can copy large InStreams (should work up to 2 GB) into one or more OutStreams with succesive calls to the CopyTo method. The demo is for testing purposes only and is restricted in the way that if 1 kb of stream data or more has been copied, the method CopyTo cannot be called any more. You may CLEAR and reCREATE the automation server before each call to CopyTo, but be aware that there is an initial time delay of about 2 sec in the creation routine of this test version (Nevertheless you can call CopyTo for example 3 times with 300 Bytes to copy and a 4th time with 1000000 bytes to copy).
If you want to use this tool for commercial purposes, please contact me.