www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1988] New: more unicode

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1988

           Summary: more unicode
           Product: D
           Version: 2.012
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: terranium yandex.ru


I've encountered two issues:
1. windows applications with wWinMain don't link
2. MessageBoxW declaration is missing in std.c.windows.windows


-- 
Apr 12 2008
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1988


Dimitar Kolev <DimitarRosenovKolev hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |DimitarRosenovKolev hotmail
                   |                            |.com





00:03:27 PDT ---
Hello I am new to D so hope this is not wrong.

Go to dmd2\src\druntime\import\core\sys\windows.d

In that file you can search for 
MessageBoxA(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType);

Add this line beneath it:

MessageBoxW(HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType);

And beneath
MessageBoxExA(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType, WORD
wLanguageId);

Add this line:

MessageBoxExW(HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType, WORD
wLanguageId);

As far as I know adding UNICODE support in WINDOWS is just a matter of adding
LPCWSTR instead of LPCSTR.

Tested it and it worked with one winsamp.d (D sample).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 10 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1988






03:22:25 PDT ---
Created an attachment (id=419)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=419)
more unicode in windows.d

Added some unicode windows api functions. It compiles with the new 2.031
compiler.
Did not test if all are working but I just added them as they are from
Microsoft msdn.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 10 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1988






03:25:36 PDT ---
This is what I added inside the windows.d

added:   DWORD  GetModuleFileNameW
added:   int MessageBoxW
added:   int MessageBoxExW
added:   export LONG RegDeleteKeyW
added:   export LONG RegDeleteValueW
added:   export LONG RegEnumKeyExW
added:     export LONG RegEnumValueW(
added:   export LONG RegOpenKeyW
added:     export LONG RegOpenKeyExW
added:   export LONG RegQueryInfoKeyW
added:     export LONG RegQueryValueW
added:     export LONG RegCreateKeyExW
added:   export LONG RegSetValueExW
added:     export DWORD ExpandEnvironmentStringsW(

More to be added:
Those need some enums.
GetModuleFileNameExA
GetModuleFileNameExW
LoadLibraryExA
LoadLibraryExW
RegDeleteKeyExA
RegDeleteKeyExW
RegCreateKeyExA
RegCreateKeyExW

Do not know if those two exist:
GetProcAddressA
GetProcAddressW

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 10 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1988






PDT ---
GetProcAddress allows only ASCII strings.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 10 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1988






05:41:06 PDT ---
Thanks for the info.
Feel free to review the file.

When I have time I will put also the enums for the other messages.

Tell me if there is no need for this.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 10 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1988






PDT ---
you should contact with druntime team: create new bugreport product:d,
component:druntime, keywords:patch and attach your modified file or better
create a patch with the diff tool against the trunk version of windows.h

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 13 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1988






12:00:18 PDT ---
Thanks for the info.

Because I already added the other functions I have specified that I will add
and I was going to add more but I did not know if that is necessary.

I will contact the team and see what will happen.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 13 2009
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1988


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |andrej.mitrovich gmail.com
         Resolution|                            |DUPLICATE



11:06:42 PST ---
*** This issue has been marked as a duplicate of issue 317 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 23 2012