My Environment: PB 2019 Build 2170.
I have a small app that reads a file into a blob, compresses the blob using zlib and then sends it to a web service.
I am having all sorts of problems when the file is very large.
The smaller file I am testing with is 80,665,088 bytes.
I was using ReadFileEx to read it into a blob in one call. It gave me a 'object reference' error. I've never seen that with a system function.
I changed the code to use Windows API functions to read the file. Now it is able to read in and compress the file.
The larger file is 167,749,120 bytes.
PowerBuilder just disappears in the read function. This is how I allocate the read buffer:
Blob lblb_filedata
Byte lby_buffer[]
ULong lul_length
lul_length = FileLength(as_filename)
lby_buffer[lul_length] = 0
lblb_filedata = Blob(lby_buffer)
SetNull(lby_buffer)
Does anyone have any ideas on a different approach?