![]() |
Problem mit nonVCL und Turbo Delphi
Hallo,
ich benutze seit neustem den "Tubo Delphi Explorer 2005". Nun wollte ich ein nonVCL Project verwirklichen. Unter "Borland Delphi 7 Personal" lässt sich dieses Problemlos compilieren und ausführen. Unter Turbo Delphi jedoch wird mir jedoch angezigt, dass das Projekt ohne Fehler compiliert wurdem wenn ich es jedoch starte bricht es mit folgender Fehlermeldung ab: "Runtime error 216 at 0040188B". Im Ereignisprotokoll steht folgendes:
Code:
Quellcode:
Thread-Start: Thread-ID: 3436. Prozess test1.exe (3228)
Prozessstart: D:\Eigene Dateien\Borland Studio-Projekte\nonVCL\Test1\test1.exe. Basisadresse: $00400000. Prozess test1.exe (3228) Modul laden: test1.exe. Enthält Debug-Infos. Basisadresse: $00400000. Prozess test1.exe (3228) Modul laden: ntdll.dll. Ohne Debug-Infos. Basisadresse: $7C910000. Prozess test1.exe (3228) Modul laden: KERNEL32.dll. Ohne Debug-Infos. Basisadresse: $7C800000. Prozess test1.exe (3228) Modul laden: ADVAPI32.dll. Ohne Debug-Infos. Basisadresse: $77DA0000. Prozess test1.exe (3228) Modul laden: RPCRT4.dll. Ohne Debug-Infos. Basisadresse: $77E50000. Prozess test1.exe (3228) Modul laden: Secur32.dll. Ohne Debug-Infos. Basisadresse: $77FC0000. Prozess test1.exe (3228) Modul laden: USER32.dll. Ohne Debug-Infos. Basisadresse: $7E360000. Prozess test1.exe (3228) Modul laden: GDI32.dll. Ohne Debug-Infos. Basisadresse: $77EF0000. Prozess test1.exe (3228) Modul laden: IMM32.dll. Ohne Debug-Infos. Basisadresse: $76330000. Prozess test1.exe (3228) Modul laden: UNKNOWN_MODULE_8. Ohne Debug-Infos. Basisadresse: $10000000. Prozess test1.exe (3228) Modul laden: ole32.dll. Ohne Debug-Infos. Basisadresse: $774B0000. Prozess test1.exe (3228) Modul laden: msvcrt.dll. Ohne Debug-Infos. Basisadresse: $77BE0000. Prozess test1.exe (3228) Modul laden: FLTLIB.DLL. Ohne Debug-Infos. Basisadresse: $5E160000. Prozess test1.exe (3228) Modul laden: WINSTA.dll. Ohne Debug-Infos. Basisadresse: $76300000. Prozess test1.exe (3228) Modul laden: NETAPI32.dll. Ohne Debug-Infos. Basisadresse: $597D0000. Prozess test1.exe (3228) Modul laden: UxTheme.dll. Ohne Debug-Infos. Basisadresse: $5B0F0000. Prozess test1.exe (3228) Modul laden: MSCTF.dll. Ohne Debug-Infos. Basisadresse: $746A0000. Prozess test1.exe (3228) Modul laden: lgscroll.dll. Ohne Debug-Infos. Basisadresse: $10100000. Prozess test1.exe (3228) Modul laden: MSVCR80.dll. Ohne Debug-Infos. Basisadresse: $78130000. Prozess test1.exe (3228) Modul laden: MSVCP80.dll. Ohne Debug-Infos. Basisadresse: $7C420000. Prozess test1.exe (3228) Modul laden: NTMARTA.dll. Ohne Debug-Infos. Basisadresse: $77660000. Prozess test1.exe (3228) Modul laden: SAMLIB.dll. Ohne Debug-Infos. Basisadresse: $71B70000. Prozess test1.exe (3228) Modul laden: WLDAP32.dll. Ohne Debug-Infos. Basisadresse: $76F20000. Prozess test1.exe (3228) Modul laden: VERSION.dll. Ohne Debug-Infos. Basisadresse: $77BD0000. Prozess test1.exe (3228) Modul entladen: VERSION.dll. Prozess test1.exe (3228) Modul laden: msctfime.ime. Ohne Debug-Infos. Basisadresse: $75250000. Prozess test1.exe (3228) Modul laden: OLEAUT32.dll. Ohne Debug-Infos. Basisadresse: $770F0000. Prozess test1.exe (3228) Modul laden: CLBCatQ.DLL. Ohne Debug-Infos. Basisadresse: $76F90000. Prozess test1.exe (3228) Modul laden: COMRes.dll. Ohne Debug-Infos. Basisadresse: $77010000. Prozess test1.exe (3228) Modul laden: VERSION.dll. Ohne Debug-Infos. Basisadresse: $77BD0000. Prozess test1.exe (3228)
Delphi-Quellcode:
Ich kann mir diese Fehlermeldung nicht erklären. Falls jemand diesen Fehler auch schon mal hatte oder weiß woran dies liegen könnte: Bitte helft mir.
program test1;
uses Messages, Windows; const WindowWidth: Longint = 400; WindowHeight: Longint = 300; MainWndClassName: PWideChar = 'AWndClassEx'; IDC_EDIT1 = 1; IDC_BUTTON1 = 2; var hWndEdit1: Longword; hWndButton1: Longword; hWndFont1: HFONT; function WndProc(hWnd: HWND; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall; var ncm: TNonClientMetricsW; begin Result := 0; case uMsg of // Fenster wird erzeugt WM_CREATE: begin {Fenster zentrieren} MoveWindow(hWnd, (GetSystemMetrics(SM_CXSCREEN) div 2) - (WindowWidth div 2), (GetSystemMetrics(SM_CYSCREEN) div 2) - (WindowHeight div 2), WindowWidth, WindowHeight, TRUE ); {} FreeMemory(@ncm); ncm.cbSize := SizeOf(TNonClientMetricsW); SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, sizeof(ncm), @ncm, 0); hwndEdit1 := CreateWindowExW(WS_EX_CLIENTEDGE, 'EDIT', 'Please enter something', WS_VISIBLE or WS_CHILD or ES_NOHIDESEL or ES_AUTOHSCROLL, ncm.iBorderWidth + 8, ncm.iBorderWidth + 8, WindowWidth - (2 * ncm.iBorderWidth) - ncm.iScrollWidth - 8, 21, hWnd, IDC_EDIT1, hInstance, nil ); hWndFont1 := CreateFontW(10,0, 0, 0, 0, 0, 0, 0, ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH, 'MS Sans Serif'); SendMessageW(hwndEdit1, WM_SETFONT, Integer(hwndFont1), Integer(true)); hWndButton1 := CreateWindowExW(0, 'BUTTON', 'Beenden', WS_VISIBLE or WS_CHILD, ncm.iBorderWidth + 190, ncm.iBorderWidth + 40, 128, 22, hWnd, IDC_BUTTON1, hInstance, nil ); SendMessageW(hwndButton1, WM_SETFONT, Integer(hwndFont1), Integer(true)); end; // Fenster wird freigegeben WM_DESTROY: begin PostQuitMessage(0); end; WM_COMMAND: begin if hiword(wParam) = BN_CLICKED then begin case loword(wParam) of IDC_BUTTON1: SendMessageW(hwnd, WM_DESTROY, 0, 0); end; end; end; else Result := DefWindowProcW(hWnd, uMsg, wParam, lParam); end; end; var wc: TWndClassExW; msg: TMsg; begin with wc do begin cbSize := SizeOf(TWndClassEx); style := CS_HREDRAW or CS_VREDRAW; lpfnWndProc := @WndProc; cbClsExtra := 0; cbWndExtra := 0; hInstance := hInstance; hIcon := 0; //LoadImageW(hInstance, MakeIntResourceW(100), IMAGE_ICON, 0, 0, LR_LOADMAP3DCOLORS); hCursor := 0; //LoadCursorW(0, IDC_ARROW); hbrBackground := GetSysColorBrush(COLOR_3DFACE); lpszMenuName := nil; lpszClassName := MainWndClassName; hIconSm := 0; end; { Registrieren der Fensterklasse } RegisterClassExW(wc); { Erzeugen der Fensterklasse } CreateWindowExW(WS_EX_WINDOWEDGE OR WS_EX_CONTROLPARENT OR WS_EX_APPWINDOW, MainWndClassName, 'Fenstertitel', WS_OVERLAPPEDWINDOW or WS_OVERLAPPED OR WS_VISIBLE, integer(CW_USEDEFAULT), // WindowLeft integer(CW_USEDEFAULT), // WindowTop WindowWidth, // WindowWidth WindowHeight, // WindowHeight 0, 0, hInstance, nil ); { Nachrichten übersetzen und an die Fensterprozedur weiterleiten } while(GetMessage(msg,0,0,0)) do begin TranslateMessage(msg); DispatchMessage(msg); end; end. |
Re: Problem mit nonVCL und Turbo Delphi
Hi,
ich habe keine Ahnung von nonVCL, aber das freememory(@ncm) erscheint mir suspekt. |
Alle Zeitangaben in WEZ +1. Es ist jetzt 02:43 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz