*lpszPropVal = (ElementID->lo_text).pText;
*lpszPropVal = (const char *)(ElementID->lo_text).text;
Bool LAPIElementGetStringProperty( 	MWContext*		FrameID,	LO_Element*		ElementID,	char*			PropertyName,	char**			lpszPropVal){	lo_ProbeState* ps = GetProbe(FrameID);	if (ps == NULL)	{	/* invalid frame id */		LAPI_LastError = LAPI_E_INVALIDFRAME;		return FALSE;	}	switch (ElementID->type)	{	case LO_TEXT:		if (!stricmp(PropertyName, "text") || !stricmp(PropertyName, "name"))		{			*lpszPropVal = (ElementID->lo_text).pText;			return TRUE;		}		if (!stricmp(PropertyName, "href"))		{			LO_AnchorData* pAnchorData = (ElementID->lo_text).anchor_href;			if (pAnchorData && pAnchorData->anchor &&				(*((char*)(pAnchorData->anchor)) != '\0'))			*lpszPropVal = (char*)pAnchorData->anchor;			return TRUE;		}		break;	case LO_HRULE:	break;	case LO_IMAGE:		if (!stricmp(PropertyName, "alt"))		{			*lpszPropVal = (char*)((ElementID->lo_image).alt);			return TRUE;		}		else if (!stricmp(PropertyName, "url"))		{			*lpszPropVal = (char*)((ElementID->lo_image).image_url);			return TRUE;		}		if (!stricmp(PropertyName, "href"))		{			LO_AnchorData* pAnchorData = (ElementID->lo_image).anchor_href;			if (pAnchorData && pAnchorData->anchor &&				(*((char*)(pAnchorData->anchor)) != '\0'))			*lpszPropVal = (char*)pAnchorData->anchor;			return TRUE;		}		break;	case LO_BULLET:	break;	case LO_FORM_ELE:		switch (((ElementID->lo_form).element_data)->type)		{		case FORM_TYPE_TEXT:		case FORM_TYPE_PASSWORD:		case FORM_TYPE_READONLY:			if (!stricmp(PropertyName, "name"))			{				*lpszPropVal = (char*)((((ElementID->lo_form).element_data)->ele_text).name);				return TRUE;			}			else if (!stricmp(PropertyName, "defaulttext"))			{				*lpszPropVal = (char*)((((ElementID->lo_form).element_data)->ele_text).default_text);				return TRUE;			}			else if (!stricmp(PropertyName, "currenttext"))			{				*lpszPropVal = (char*)((((ElementID->lo_form).element_data)->ele_text).current_text);				return TRUE;			}			break;		case FORM_TYPE_SUBMIT:		case FORM_TYPE_RESET:		case FORM_TYPE_BUTTON:			if (!stricmp(PropertyName, "name"))			{				*lpszPropVal = (char*)((((ElementID->lo_form).element_data)->ele_minimal).name);				return TRUE;			}			break;		case FORM_TYPE_RADIO:		case FORM_TYPE_CHECKBOX:			if (!stricmp(PropertyName, "name"))			{				*lpszPropVal = (char*)((((ElementID->lo_form).element_data)->ele_toggle).name);				return TRUE;			}			break;		case FORM_TYPE_SELECT_ONE:		case FORM_TYPE_SELECT_MULT:			if (!stricmp(PropertyName, "name"))			{				*lpszPropVal = (char*)((((ElementID->lo_form).element_data)->ele_select).name);				return TRUE;			}			else if (!stricmp(PropertyName, "options"))			{	/* actually returns a pointer to the option list */				*lpszPropVal = (char*)((((ElementID->lo_form).element_data)->ele_select).options);				return TRUE;			}		case FORM_TYPE_TEXTAREA:			if (!stricmp(PropertyName, "name"))			{				*lpszPropVal = (char*)((((ElementID->lo_form).element_data)->ele_textarea).name);				return TRUE;			}			else if (!stricmp(PropertyName, "defaulttext"))			{				*lpszPropVal = (char*)((((ElementID->lo_form).element_data)->ele_textarea).default_text);				return TRUE;			}			else if (!stricmp(PropertyName, "currenttext"))			{				*lpszPropVal = (char*)((((ElementID->lo_form).element_data)->ele_textarea).current_text);				return TRUE;			}			break;		case FORM_TYPE_IMAGE: /* TODO - what data structure?*/			break;				case FORM_TYPE_HIDDEN:		case FORM_TYPE_JOT:		case FORM_TYPE_ISINDEX:		case FORM_TYPE_KEYGEN:		case FORM_TYPE_OBJECT:			break;		}		break;		case LO_TABLE:	case LO_CELL:	case LO_EMBED:	case LO_JAVA:	case LO_OBJECT:		break;	}	LAPI_LastError = LAPI_E_INVALIDPROP;	return FALSE;}