texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texmacs-dev] Deprecate FullName.exe


From: TeXmacs
Subject: Re: [Texmacs-dev] Deprecate FullName.exe
Date: Sat, 27 Nov 2021 15:02:36 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Hi Darcy,

Could you please revert these changes?

Please send us a patch for this kind of changes,
so that we can evaluate your patch first before applying it.

This kind of thing is likely to introduce instabilities that
we prefer to avoid, at least currently.

Best wishes, --Joris



On Sat, Nov 27, 2021 at 12:23:05PM +0800, Darcy Shen via Texmacs-dev wrote:
> Hi, Denis,
> 
> 
> 
> I need your help to verify it on Windows.
> 
> 
> 
> I've made it work with CMake, for autotools, we need to add this link flag 
> `-lsecur32`.
> 
> 
> 
> And once we've verified its correctness, we could remove
> 
> packages/windows/FullName.cpp
> 
> 
> 
> 
> ---- On Sat, 2021-11-27 12:07:01 Darcy Shen via Texmacs-dev 
> <texmacs-dev@gnu.org> wrote ----
> 
> 
> Since SVN revision 13808, we do not need FullName.exe to get the full name of 
> the user any more on Windows.
> 
> 
> 
> I tried using GetUserNameEx to get the full name of the login user, but 
> failed.
> 
> 
> 
> https://stackoverflow.com/questions/21766954/how-to-get-windows-users-full-name-in-python
> 
> 
> 
> And finally, I googled about how to get the full name using Python. Verified 
> with the python snippets in the TeXmacs Python session:
> 
> 
> 
> import ctypes
>  
> def get_display_name():
>     GetUserNameEx = ctypes.windll.secur32.GetUserNameExW
>     NameDisplay = 3
>  
>     size = ctypes.pointer(ctypes.c_ulong(0))
>     GetUserNameEx(NameDisplay, None, size)
>  
>     nameBuffer = ctypes.create_unicode_buffer(size.contents.value)
>     GetUserNameEx(NameDisplay, nameBuffer, size)
>     return nameBuffer.value
> 
> 
> 
> It turns out that we need to call GetUserNameEx twice to make the C++ code 
> work!!!
> 
> 
> 
> 
> 
> Python win32 api seems to be a good way to expore Windows API before coding 
> in C++.
> 
> 
> 
> 
> 
> 
> _______________________________________________ 
> Texmacs-dev mailing list 
> Texmacs-dev@gnu.org 
> https://lists.gnu.org/mailman/listinfo/texmacs-dev

> _______________________________________________
> Texmacs-dev mailing list
> Texmacs-dev@gnu.org
> https://lists.gnu.org/mailman/listinfo/texmacs-dev




reply via email to

[Prev in Thread] Current Thread [Next in Thread]