Bug 4793 – Runtime.loadLibrary cannot load dll using MBS paths.

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
druntime
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2010-09-03T02:39:00Z
Last change time
2013-02-05T13:34:05Z
Assigned to
sean
Creator
zan77137

Attachments

IDFilenameSummaryContent-TypeSize
744loadLibrary.patchLet rt_loadLibrary convert codepage UTF-8 to ANSI.text/plain1419

Comments

Comment #0 by zan77137 — 2010-09-03T02:39:21Z
Created attachment 744 Let rt_loadLibrary convert codepage UTF-8 to ANSI. Runtime.loadLibrary should be able to load dll using MBS paths. LoadLibraryA takes LPCSTR (ANSI string, e.g. Shift_JIS), but rt_loadLibrary sets char[] (UTF-8 string) now. Charset must be converted. I wrote patch. The patch let rt_loadLibrary convert charset UTF-8 to ANSI by using WideCharToMultiByte and MultiByteToWideChar.
Comment #1 by github-bugzilla — 2012-09-02T08:19:19Z
Commits pushed to master at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/1490b7f294cdb1f20bd538f7f491ec633302dc85 Issue 4793 - Runtime.loadLibrary cannot load dll using MBS paths. http://d.puremagic.com/issues/show_bug.cgi?id=4793 https://github.com/D-Programming-Language/druntime/commit/0f452c4c2d1a1fee5b1ccec46a8970a05224985e Merge pull request #96 from shoo/fix4793 Issue 4793 - Runtime.loadLibrary cannot load dll using MBS paths.