"The Parameter is Incorrect."

Started by
2 comments, last by GreenMarine 23 years, 10 months ago
This is a pretty cool site. I just happened on it accidentally while messing around online. So here, I have a question, lets see if there are any Win32 gurus around here. I''m working with a UNICODE application on Win98 and I want to get the metrics of a TrueType font. The problem is that Windows 98 does not implement the wide char version of GetOutlineTextMetrics(), which is the metrics query for TrueTypes. Calling it returns Win32 errorcode 120 or "The function may only be used in Win32 mode." Which is what Windows 98 tells you when you call a NT only function. So, when I call the GetOutlineTextMetricsA version directly (which is all I need to use), the call returns the error code "The Parameter Is Incorrect" which is an equally generic error code many functions return when there is some unspecified internal error. SO. Has anyone here every successfully acquired the metrics of a TrueType font with __UNICODE defined under Win98?
Brandon ReinhartProgrammer3D Realms, Inc.Team Duke Nukem Forever
Advertisement
By the way, I would normally post a question like this to a Win32 newsgroup or something. I''ve already done a websearch and searched several Win32 books for information, none were useful. I never ask a question until I''ve exhausted my own search capability. Anyway, I thought I''d try out this forum.
Brandon ReinhartProgrammer3D Realms, Inc.Team Duke Nukem Forever
You will have to show me your code before I can tell which "Parameter Is Incorrect". It could be something as simple as a wrong number or fairly complicated, I just can''t tell until you show me what variables you are trying to plug into the function.
Hi!

I always thought that Win98 DOES NOT support unicode, so "working with a UNICODE application on Win98" might not be the best idea . Nonetheless, your call probably fails, because the structure you are passing to the ASCII version (when compiled in UNICODE mode) has a different size than it expects.

As the second parameter of GetOutlineTextMetrics you pass the size of the metric data array. Check if this stays constant for ASCII and UNICODE. If it doesn''t, then you''ll have your mistake. The ASCII version checks the size of the struct it''s being passed and if it doesn''t match, then ... BOOM.

I think that might be the mistake. Then again, I''m no Win32 API expert.

Take care,

MK42

This topic is closed to new replies.

Advertisement