OS: Windows vista ultimate
IDE: Turbo Delphi explorer
API: Direct3d 9
-----------------------------------------------------

Hi guys

I'm having trouble with this terrible bug. When i start running my program i get:

Runtime Error 216 at *blablabla*

and then:

The application failed to initialize properly (*adress*). Click OK to terminate the application.

and then:

---------------------------
Debugger Fault Notification
---------------------------
Project *project EXE path* faulted with message: 'system exception (code 0xc0000142) at 0x77918fc7'. Process Stopped. Use Step or Run to continue.
---------------------------
OK
---------------------------

This error occures before any code is executed. Even when i set a breakpoint at the very beginning of my DPR, the error will still occur, and the app will be terminated.

This is my log:
Thread Start: Thread ID: 2104. Process Project1.exe (3780)
Process Start: E:\Delphi\Nasha DX9\v0.12.2 (shader driven engine)\Project1.exe. Base Address: $00400000. Process Project1.exe (3780)
Module Load: Project1.exe. Has Debug Info. Base Address: $00400000. Process Project1.exe (3780)
Module Load: ntdll.dll. No Debug Info. Base Address: $77910000. Process Project1.exe (3780)
Module Load: KERNEL32.dll. No Debug Info. Base Address: $77480000. Process Project1.exe (3780)
Module Load: OLEAUT32.dll. No Debug Info. Base Address: $77240000. Process Project1.exe (3780)
Module Load: ole32.dll. No Debug Info. Base Address: $772D0000. Process Project1.exe (3780)
Module Load: msvcrt.dll. No Debug Info. Base Address: $77630000. Process Project1.exe (3780)
Module Load: GDI32.dll. No Debug Info. Base Address: $76410000. Process Project1.exe (3780)
Module Load: USER32.dll. No Debug Info. Base Address: $77870000. Process Project1.exe (3780)
Module Load: ADVAPI32.dll. No Debug Info. Base Address: $776E0000. Process Project1.exe (3780)
Module Load: RPCRT4.dll. No Debug Info. Base Address: $77560000. Process Project1.exe (3780)
Module Load: VERSION.dll. No Debug Info. Base Address: $75960000. Process Project1.exe (3780)
Module Load: COMCTL32.dll. No Debug Info. Base Address: $73F70000. Process Project1.exe (3780)
Module Load: Nasha3D.dll. Has Debug Info. Base Address: $002B0000. Process Project1.exe (3780)
Module Load: d3d9.dll. No Debug Info. Base Address: $704C0000. Process Project1.exe (3780)
Module Load: d3d8thk.dll. No Debug Info. Base Address: $75230000. Process Project1.exe (3780)
Module Load: dwmapi.dll. No Debug Info. Base Address: $73B70000. Process Project1.exe (3780)
Module Load: d3dx9d_33.dll. No Debug Info. Base Address: $69E40000. Process Project1.exe (3780)
Module Load: IMM32.dll. No Debug Info. Base Address: $77B30000. Process Project1.exe (3780)
Module Load: MSCTF.dll. No Debug Info. Base Address: $777A0000. Process Project1.exe (3780)
Module Load: LPK.dll. No Debug Info. Base Address: $763C0000. Process Project1.exe (3780)
Module Load: USP10.dll. No Debug Info. Base Address: $77AB0000. Process Project1.exe (3780)
Module Load: UxTheme.dll. No Debug Info. Base Address: $75280000. Process Project1.exe (3780)
Module Load: DXerr9ab.DLL. No Debug Info. Base Address: $10000000. Process Project1.exe (3780)
Module Unload: DXerr9ab.DLL. Process Project1.exe (3780)
I think it has something to do with both DXErr9ab.dll and ntdll.dll. In the drop-down menu in "local variabeles" i see an adress with ntdll.dll next to it. DXErr9ab.dll is suddenly unloaded, wich could be a response to an error.
I already tried rebooting and compiling it using Delphi 7 but i still get the same results.
Could this have something to do with exported functions/parameters in a unit wich do not match with the names/declaration in their source DLL's?

Can anyone give me some tips to debug this?