Both work, and both seem to return a value, which is more correct:
PHP Code:
//First version -- as you see with one line commented out
//Second version -- include the memory allocation line

//--------------------
//Get text from edit box
//--------------------
charGetTextFromEdit(HWND hwndDWORD ID)
{
    
charText;

    
int len GetWindowTextLengthGetDlgItem(hwndID) );
    if(
len 0)
    {
        
//Text = (char*)GlobalAlloc(GPTR, len + 1);
        
GetDlgItemText(hwndIDTextlen 1);
    }

    return 
Text;

Problem with the second version, is the function returns the text I need, I do not get a chance to unallocate it...Which is a problem, but it seems without allocating the memory, it works fine when returning to a char*