Closed kntroh closed 9 years ago
I'm not sure I understand why this is necessary.
I wrote this initially (Shell.d):
void createToolTipHandle () {
toolTipHandle_ = OS.CreateWindowEx (
0,
OS.TOOLTIPS_CLASS.ptr,
null,
And, When I build and ran the Snippet41. Then I received this error:
$ .\bin\SwtSnippet41.exe
org.eclipse.swt.SWTError.SWTError@java\lang\exceptions.d(22): No more handles
----------------
0x00007FF7B9449077 in org.eclipse.swt.SWT.SWT.error at
E:\apps\dmdlib\dwt64\org.eclipse.swt.win32.win32.x86\src\org\eclipse\swt\SWT.d(3871)
:
CreateWindowEx() calling is failed. Error code is 998 (ERROR_NOACCESS).
I don't know the cause of error. But I suspect CreateWindowEx is mistaken a lpWindowName argument and a class atom maybe (See also: CreateWindowEx).
When I create a dynamic variable using .dup
, It ran successfully.
Fixes for dmd 2.068.0.
Because an error occurs when passing a pointer of const string to the CreateWindowEx function on Win64 (Because the function is mistaking an address of const value and a class atom of Windows maybe), I wrote
<const string>.dup.ptr
.Fixes for linux isn't required.