/* efw-dump-memptr.p: Store the contents of a memptr variable to disk. History: -------- 09/02/03: PJG Initial coding. Function: --------- Generically saves the contents of a memptr to disk. This function is used by (at least) httphtmlpost.p to save the response from communicating with web servers. This routine does not do any validating at this time. */ define input parameter pvm-memptr as memptr no-undo. define input parameter pvi-bytes-to-save as integer no-undo. define input parameter pvc-file-name as character no-undo. MAIN-BLOCK: do: define variable vi-counter as integer no-undo. define variable vc-temp-char as character no-undo. output to value(pvc-file-name). do vi-counter = 1 to pvi-bytes-to-save / 30000 + 1: vc-temp-char = get-string(pvm-memptr,( (vi-counter - 1) * 30000 + 1), 30000). put unformatted vc-temp-char. end. /* do vi-counter .. */ output close. end. /* MAIN BLOCK */