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
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.
Lift cstruct 64K limit
-
- Founder/Site Admin
- Posts: 3447
- Joined: 24 Feb 2017, 09:12
- Location: Gouda, The Netherlands
Lift cstruct 64K limit
You do not have the required permissions to view the files attached to this post.
Regards,
Dave Rabelink
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
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel
-
- Founder/Site Admin
- Posts: 3447
- Joined: 24 Feb 2017, 09:12
- Location: Gouda, The Netherlands
Re: Lift cstruct 64K limit
I just want to inform that the 64k limitation is lifted in TD 7.0 (x86 and x64).
Regards,
Dave Rabelink
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
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel
Who is online
Users browsing this forum: [Ccbot] and 0 guests