hi !!
i'm a newbie :)
is it possible to use MFC classes (i'm mainly concerend with CString) in asm ??
if possible, could u show me a small example ?
thanks :grin:
Posted on 2003-12-17 06:02:45 by muskad202
NaN has written a CString class in asm, see the OOP section.
This board has a nice SEARCH facility, try using it before you post :)
Posted on 2003-12-17 06:56:46 by Homer
Yes it is possible but its a SIN :grin:

One can handle null terminated string quite easy in ASM
And with the help of some macro's you might even imagine you are programming in C :tongue:
Posted on 2003-12-17 08:06:35 by BogdanOntanu
but CString has a convenient feature that i don't need to pre-allocate space for it, the allocation is done whenever required .. (i don't know the maximum length of the string, it will be a user input)
Posted on 2003-12-17 08:09:10 by muskad202
Look up SysAllocString and SysFreeString from the win API....

Posted on 2003-12-17 22:15:29 by NaN
I haven't looked yet but sounds awesome! I have been using GlobalAlloc. Can you lock memory with these functions. Well I'll find out. Nan, you never cease to amaze me. Please don't let me flatter you but you do have a wide scope of understanding and I am empressed. "Dis must be the place"
Posted on 2003-12-17 23:34:00 by mrgone
These are the standard for string memory allocation when using COM... those who play with COM all know about these API... (little plug for COM ;) )

BTW: if you download the CString class from the OOP section.. there is a method in there that uses the SysAllocString API.... I may help you. You probably dont need it in Wide Char strings (used in OLE) but the API doesnt care if your using it for BYTE or WORD strings, if i remember correctly.
Posted on 2003-12-18 16:58:26 by NaN