Thread overview
[Issue 1988] New: more unicode
Apr 12, 2008
d-bugmail
Jul 10, 2009
Dimitar Kolev
Jul 10, 2009
Dimitar Kolev
Jul 10, 2009
Dimitar Kolev
Jul 10, 2009
Sobirari Muhomori
Jul 10, 2009
Dimitar Kolev
Jul 13, 2009
Sobirari Muhomori
Jul 13, 2009
Dimitar Kolev
Dec 23, 2012
Andrej Mitrovic
April 12, 2008
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


-- 

July 10, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=1988


Dimitar Kolev <DimitarRosenovKolev@hotmail.com> changed:

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




--- Comment #1 from Dimitar Kolev <DimitarRosenovKolev@hotmail.com>  2009-07-10 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: -------
July 10, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=1988





--- Comment #2 from Dimitar Kolev <DimitarRosenovKolev@hotmail.com>  2009-07-10 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: -------
July 10, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=1988





--- Comment #3 from Dimitar Kolev <DimitarRosenovKolev@hotmail.com>  2009-07-10 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: -------
July 10, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=1988





--- Comment #4 from Sobirari Muhomori <maxmo@pochta.ru>  2009-07-10 03:51:07 PDT ---
GetProcAddress allows only ASCII strings.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
July 10, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=1988





--- Comment #5 from Dimitar Kolev <DimitarRosenovKolev@hotmail.com>  2009-07-10 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: -------
July 13, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=1988





--- Comment #6 from Sobirari Muhomori <maxmo@pochta.ru>  2009-07-13 02:07:17 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: -------
July 13, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=1988





--- Comment #7 from Dimitar Kolev <DimitarRosenovKolev@hotmail.com>  2009-07-13 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: -------
December 23, 2012
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


--- Comment #8 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2012-12-23 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: -------