Thread overview
bug report in D compiler ?
Nov 09, 2002
Lloyd Dupont
Nov 12, 2002
Walter
Nov 12, 2002
Lloyd Dupont
Nov 13, 2002
Walter
November 09, 2002
I have a simple program with 2 files registry.d, regdump.d (see below) and
when I try
to compile it I always get thiw error message:
# ---------------------------
C:\D\dev\lloyd\reg>dmd -o a.exe regdump.d registry.d && a
Assertion failure: '0' on line 232 in file 'module.c'

abnormal program termination
# -------- registry.d --------
module lloyd.registry;

import windows;
import string;

extern (Windows)
{
 export LONG RegOpenKeyExA(HKEY,LPCSTR,DWORD,REGSAM,PHKEY);
 export LONG RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY);
}
LONG RegOpenKeyEx(HKEY hKey, char[] lpSubKey, DWORD ulOptions, REGSAM
samDesired, PHKEY phkResult)
{
    return RegOpenKeyExA(hKey, lpSubKey, ulOptions, samDesired, phkResult);
}
# ------- regdump.d -------
import windows, registry;
import string;
import lloyd.registry;


char[] tostring(char* cstring)
{
    int n = strlen(cstring);
    return cstring[0 .. n];
}

void dump(HKEY root, char[] subkey)
{
 HKEY rKey;

 LONG ret = RegOpenKeyEx(
  root,
  subkey,
  0,
  KEY_READ,
  &rKey);
    assert(ret == ERROR_SUCCESS);

    try {
    }
    finally { RegCloseKey(rKey); }
}

// dmd -o a.exe regdump.d registry.d && a
int main(char[][] args)
{
    dump(HKEY_LOCAL_MACHINE, 'Software\7-ZIP');
    return 0;
}
# ---------------------------


November 12, 2002
Got it, thanks. -Walter


November 12, 2002
Walter wrote:

> Got it, thanks. -Walter

cool......... !!!
when would I be able to download the new compiler ?
:-) ?

November 13, 2002
"Lloyd Dupont" <lloyd@galador.net> wrote in message news:aqrtu1$12nm$2@digitaldaemon.com...
> Walter wrote:
>
> > Got it, thanks. -Walter
>
> cool......... !!!
> when would I be able to download the new compiler ?
> :-) ?

When I fix it !