Solved Lift cstruct 64K limit

Missing or incomplete OpenText Gupta product features? Discuss it here!
Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 3447
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Lift cstruct 64K limit

Post by Dave Rabelink » 10 Mar 2014, 13:50

I knew about the 64k limitation of cstruct functions CStructCopyToFarMem and CStructCopyFromFarMem, but I forgot ;)

So to my surprise I discovered TD62 still has this ridiculous limitation.

See test application has two testcases:

- Create a string buffer which exceeds 64k, copy it to farmem and copy back to a new buffer
- Load a bitmap file which exceeds 64k, copy it to farmem and copy back and display in a picture object
64k-limit.png
Clearly the cstruct way will result in a cutoff buffer, limit of 64K.
(the string buffer reports a wrong text length, the testcase using the bitmap will show a truncated image).

The test application also shows the possible workaround, using memcpy/RtlMoveMemory WinApi functions.
(uncheck the cstruct checkboxes to use the workaround).
Both ANSI and UNICODE versions are available.

Please lift this old limitation to support "unlimited" buffer sizes using cstruct.
CStruct_64k-limit.zip
You do not have the required permissions to view the files attached to this post.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

User avatar
markus.essmayr
Austria
Posts: 892
Joined: 06 Mar 2017, 06:07
Location: Austria

Re: Lift cstruct 64K limit

Post by markus.essmayr » 11 Mar 2014, 07:47

:shock:

+1000
Markus Eßmayr
teamdeveloper@t-mx.com

User avatar
H3PO4
Germany
Posts: 241
Joined: 10 Mar 2017, 07:53
Location: Rohlstorf, Germany

Re: Lift cstruct 64K limit

Post by H3PO4 » 11 Mar 2014, 08:13

+ 1

Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 1462
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

Re: Lift cstruct 64K limit

Post by Igor Ivanovic » 12 Mar 2014, 10:44

lrcuess wrote:+1000
(What he said) * 100
Igor Ivanovic
Image

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 3447
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: Lift cstruct 64K limit

Post by Dave Rabelink » 24 Oct 2016, 08:04

I just want to inform that the 64k limitation is lifted in TD 7.0 (x86 and x64).
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Return to “Enhancement suggestions”

Who is online

Users browsing this forum: [Ccbot] and 0 guests