Sylvain,
I'm pretty sure that VFP uses windows GUI features to in those functions, and since GUI is not possible in a DLL the functions do not behave as you want them to. Have you searched MSDN there is likely an API call that you can make, I don't know the API off the top of my head though.
>I have a function where I use TXTWIDTH () to get the width of a text. It work well when calling it directly (not in a COM), but when it is called inside a COM it return an incorrect result (16777219.2 instead of 5.333).
>
>Is it supported in a COM? If not, what is my alternatives?