how can i calculate the size of value ... the structure of my program is in a way that i can not use array and it should be pointer.
There is no built-in function for this scenario.
The only possibility to calculate the string length is if either:
the string is double null-terminated, eg: Hello\0Hello\0\0
if you know in advance how many intermediate null characters exist in the string before the final null terminator.
In either case, you can then enumerate the string, counting the chars and skipping the intermediate nulls, until you reach the final null terminator.
If neither of those cases is true in your situation, then you are out of luck unless you have an out-of-band way to know the string's length.