The MASM Forum

General => The Campus => Topic started by: bsdsource on October 05, 2015, 01:08:23 PM

Title: vkdebug - maximum characters in debug window issue
Post by: bsdsource on October 05, 2015, 01:08:23 PM
When using vkdebug PrintString to print out my buffer the debug window doesn't show the entire string. There appears to be a character size limitation of around 30,000 bytes in the editbox that the debug window shows. Is this a limitation of an editbox or a limitation of vkdebug's editbox? If it's a vkdebug limitation does anyone know how I can increase the maximum size of characters permitted? Seems i would need to adjust allocated memory in vkdebug source code as well as rebuilding the vkdebug library.
Title: Re: vkdebug - maximum characters in debug window issue
Post by: jj2007 on October 05, 2015, 06:22:27 PM
Simple edit controls are indeed limited to 32767 bytes afaik.

Redesign your program; for example, if you want to find something inside these >32k bytes, use InString of find$() to isolate it, and display only the part you are interested in.

Besides, deb (http://www.webalice.it/jj2006/MasmBasicQuickReference.htm#Mb1019) is often a better choice, as you can see your stuff in the console.
Title: Re: vkdebug - maximum characters in debug window issue
Post by: GoneFishing on October 05, 2015, 07:33:56 PM
Here (http://masm32.com/board/index.php?topic=1745.msg17715#msg17715) I wrote about this limitation though I didn't bother to check if it's possible to change the upper limit.
Today I made quick search'n'read and found something interesting and hopefully helpful for you :
How do I put more than 32,000 characters into a rich text control? (http://blogs.msdn.com/b/oldnewthing/archive/2007/01/11/1450795.aspx) - a small note in The Old New Thing by Raymond Chen
EM_EXLIMITTEXT message (https://msdn.microsoft.com/ru-ru/library/windows/desktop/bb788003%28v=vs.85%29.aspx) :
Quote
Sets an upper limit to the amount of text the user can type or paste into a rich edit control.
Parameters

wParam

    This parameter is not used; it must be zero.
lParam

   Specifies the maximum amount of text that can be entered. If this parameter is zero, the default maximum is used, which is 64K characters. A COM object counts as a single character.

Return value

This message does not return a value.
Remarks

The text limit set by the EM_EXLIMITTEXT message does not limit the amount of text that you can stream into a rich edit control using the EM_STREAMIN message with lParam set to SF_TEXT. However, it does limit the amount of text that you can stream into a rich edit control using the EM_STREAMIN message with lParam set to SF_RTF.

Before EM_EXLIMITTEXT is called, the default limit to the amount of text a user can enter is 32,767 characters.

EDIT: All info above is for richedit control and Minimum supported client = Windows Vista [desktop apps only] ! 
Title: Re: vkdebug - maximum characters in debug window issue
Post by: jj2007 on October 05, 2015, 09:03:11 PM
Quote from: GoneFishing on October 05, 2015, 07:33:56 PMEDIT: All info above is for richedit control and Minimum supported client = Windows Vista [desktop apps only] !

M$ speak for "did XP ever exist?". Of course it works with Win XP, too, and probably for earlier versions.
In RichMasm, SendMessage hRE, EM_EXLIMITTEXT, 0, -1 never gave any problems.
Title: Re: vkdebug - maximum characters in debug window issue
Post by: bsdsource on October 15, 2015, 01:20:22 AM
Thanks. I guess a simple google search would have answered my question.