Subject: Re: bug#8562: Emacs 23.1 and later don't work in windows 98

From: Eli Zaretskii <[email-masked]>
Date: Wed, 01 Jun 2011 00:02:21 +0300

> Date: Tue, 31 May 2011 20:16:00 +0200
> From: oslsachem <[email-masked]>
> Cc: [email-masked]
> 
> >  Could you try loading that DLL in
> > Emacs, by adding just the single line as the one above to some
> > function that is run early during the startup, e.g. in globals_of_w32?
> > (There's no need to go to extra lengths such as calling
> > GetOutlineTextMetricsW and GetTextMetricsW through function pointers.)
> > Then recompile Emacs and see if that solves the problem.
> 
> I see the same error (120)
> 
> http://www.speedyshare.com/files/28740565/Emacs-23.3GDBglobals.txt

OK, so let's call GetOutlineTextMetricsW and GetTextMetricsW in Emacs
through function pointers, like the sample program did.  Let's see if
that works.  You will need to declare hm_unicows `extern' in w32font.c
and give it global scope in w32.c.  Then copy the code from the sample
program that calls these function through function pointers, viz.

  len = s_pfn_Get_Outline_Text_Metrics_W (dc, 0, NULL);

(and similarly for the other calls) into w32font_open_internal, and
see if it starts working.

Thanks.