The cstruct 64K limit is lifted

Discussion forum about all things Team Developer 7.x
Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 691
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

The cstruct 64K limit is lifted

Post by Dave Rabelink » 07 Mar 2017, 13:21

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

See issue description in following 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

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

The cstruct 64K limit is lifted

Post by Dave Rabelink » 07 Mar 2017, 13:22

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.
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

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests