What (or where) is LSTATUS ?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

What (or where) is LSTATUS ?

John Emmas-2
Commit #f523c25c12 (3rd Dec 2018) introduced this code at line 499 of
'pango/pangowin32-fontmap.c'

     LSTATUS status;

I'm trying to build with MSVC which is giving me this error:-

     error C2065: 'LSTATUS' : undeclared identifier

I'm guessing this is a missing #include although I couldn't find out
from MSDN where exactly LSTATUS is defined (and #including windows.h
didn't seem to help either).  Anyone know what I need to do to get LSTATUS ?

I assume it's defined as LONG somewhere...

John
_______________________________________________
gtk-i18n-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-i18n-list
Reply | Threaded
Open this post in threaded view
|

Re: What (or where) is LSTATUS ?

Gtk+ - Internationalization mailing list
Hi John,

With mingw headers I get:
>> cd /usr/i686-w64-mingw32/include/
>> grep -r LSTATUS
winreg.h:  typedef LONG LSTATUS;


Il giorno ven 14 dic 2018 alle ore 17:11 John Emmas <[hidden email]> ha scritto:
Commit #f523c25c12 (3rd Dec 2018) introduced this code at line 499 of
'pango/pangowin32-fontmap.c'

     LSTATUS status;

I'm trying to build with MSVC which is giving me this error:-

     error C2065: 'LSTATUS' : undeclared identifier

I'm guessing this is a missing #include although I couldn't find out
from MSDN where exactly LSTATUS is defined (and #including windows.h
didn't seem to help either).  Anyone know what I need to do to get LSTATUS ?

I assume it's defined as LONG somewhere...

John
_______________________________________________
gtk-i18n-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-i18n-list

_______________________________________________
gtk-i18n-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-i18n-list
Reply | Threaded
Open this post in threaded view
|

Re: What (or where) is LSTATUS ?

John Emmas-2
On 14/12/2018 16:20, Luca Bacci wrote:
Hi John,

With mingw headers I get:
>> cd /usr/i686-w64-mingw32/include/
>> grep -r LSTATUS
winreg.h:  typedef LONG LSTATUS;



Thanks for the prompt reply Luca but #including 'winreg.h' just gave me a lot more errors... :-(

I've a feeling that LSTATUS might be possibly an obsolete type (on checking other libraries, everything that assigns the return value from RegOpenKeyEx() seems to expect a return type of LONG)

And if I change line 499 to this, everything compiles:-

    LONG status;

(I guess you could also use LRESULT, rather than LONG)

John

_______________________________________________
gtk-i18n-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-i18n-list
Reply | Threaded
Open this post in threaded view
|

Re: What (or where) is LSTATUS ?

John Emmas-2
On 14/12/2018 16:59, John Emmas wrote:

I've a feeling that LSTATUS might be possibly an obsolete type (on checking other libraries, everything that assigns the return value from RegOpenKeyEx() seems to expect a return type of LONG)

[...]

I guess you could also use LRESULT


FWIW I just came across this list of Windows Data Types on MSDN:-

https://docs.microsoft.com/en-us/windows/desktop/WinProg/windows-data-types

Note that LONG and LRESULT are both listed (although LRESULT is apparently intended for pointer types).  However, there's no type any more called LSTATUS.  Also, the last copies of WinReg.h (i.e. the last ones which list LSTATUS) seem to be from either mingw or VC6.  The more recent ones all use LONG now - i.e.

    WINADVAPI
    LONG
    APIENTRY
    RegOpenKeyExA (
        __in HKEY hKey,
        __in_opt LPCSTR lpSubKey,
        __reserved DWORD ulOptions,
        __in REGSAM samDesired,
        __out PHKEY phkResult
        );

Hope that helps, John

_______________________________________________
gtk-i18n-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-i18n-list
Reply | Threaded
Open this post in threaded view
|

Re: What (or where) is LSTATUS ?

Gtk+ - Internationalization mailing list
Great! I think we should change LSTATUS to LONG then. Would you mind creating a MR for that in Pango? That would be really useful! Thanks for researching.

Luca

Il giorno dom 16 dic 2018, 12:29 John Emmas <[hidden email]> ha scritto:
On 14/12/2018 16:59, John Emmas wrote:

I've a feeling that LSTATUS might be possibly an obsolete type (on checking other libraries, everything that assigns the return value from RegOpenKeyEx() seems to expect a return type of LONG)

[...]

I guess you could also use LRESULT


FWIW I just came across this list of Windows Data Types on MSDN:-

https://docs.microsoft.com/en-us/windows/desktop/WinProg/windows-data-types

Note that LONG and LRESULT are both listed (although LRESULT is apparently intended for pointer types).  However, there's no type any more called LSTATUS.  Also, the last copies of WinReg.h (i.e. the last ones which list LSTATUS) seem to be from either mingw or VC6.  The more recent ones all use LONG now - i.e.

    WINADVAPI
    LONG
    APIENTRY
    RegOpenKeyExA (
        __in HKEY hKey,
        __in_opt LPCSTR lpSubKey,
        __reserved DWORD ulOptions,
        __in REGSAM samDesired,
        __out PHKEY phkResult
        );

Hope that helps, John
_______________________________________________
gtk-i18n-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-i18n-list

_______________________________________________
gtk-i18n-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-i18n-list
Reply | Threaded
Open this post in threaded view
|

Re: What (or where) is LSTATUS ?

John Emmas-2
On 16/12/2018 13:47, Luca Bacci wrote:
> Great! I think we should change LSTATUS to LONG then. Would you mind
> creating a MR for that in Pango? That would be really useful! Thanks
> for researching.
>

Hmmm... it seems a lot of trouble to go to - just to change a single
word in one source file !

If it's absolutely essential, just let me know what an 'MR' is and where
I'll need to create it (I'm just an ordinary user BTW - not one of the
developers).  Many thanks,

John
_______________________________________________
gtk-i18n-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-i18n-list