how to get param value in ufunction?

Hi ! I want to get param value in ufunction,but i cant find the valueptr(get adderss in ram),What can be done to solve the problem?Thanks!


        for (TFieldIterator<UProperty>ParamIt(Function); ParamIt && (ParamIt->PropertyFlags & ( CPF_Parm)); ++ParamIt)
        {
            if (ParamIt->HasAnyPropertyFlags(CPF_OutParm))
            {
                 auto MyOutputParam = *ParamIt;
                UE_LOG(LogTemp, Log, TEXT("Retuen Found: %s();"), *MyOutputParam->GetName());


            }
            else
            {
                auto MyInputParam = *ParamIt;
                UE_LOG(LogTemp, Log, TEXT("Parameter Found: %s();"), *MyInputParam->GetName());
            }

            //GetParamTypeAndValue(ParamIt);
            if ( Cast<UStrProperty>(*ParamIt) != nullptr)
            {

                UStrProperty *strproperty = Cast<UStrProperty>(*ParamIt);

                void* ValuePtr = strproperty->GetPropertyValuePtr_InContainer(&Function); //get valueptr

                FString value =strproperty->GetPropertyValue(ValuePtr);   //this line erorr




                    UE_LOG(LogTemp, Log, TEXT("type is string ,value is :%s()"),*value );


            }
        }