[erledigt] DLL - Memory Acess Violation
Übersicht

![]() |
Wild-StormBetreff: [erledigt] DLL - Memory Acess Violation |
![]() Antworten mit Zitat ![]() |
---|---|---|
hi, ich hab ma ne DLL geschrieben die ne MessageBox aufruft, funzt auch ganz toll, aber wenn die function ausgeführt wurde, kommt das berühmt berüchtigte memory acess violation ![]() hier der c++ code: Code: [AUSKLAPPEN] #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <string.h> #define BBDECL extern "C" _declspec(dllexport) #define BBCALL _stdcall BBDECL const char * BBCALL Error(const char *str) { int WINAPI WinMain(HINSTANCE hinstance, HINSTANCE hprevinstance, LPSTR lpcmdline, int ncmdshow); MessageBox(0, str, "Error", MB_OK | MB_ICONEXCLAMATION); return 0; } hier die decls: Code: [AUSKLAPPEN] .lib "error.dll" Error$( str$):"_Error@4" woran liegt des? an return 0? HÄLP!! ![]() |
||
Visit http://www.next-dimension.org
------------------------------------------------- Freeware Modelle, Texturen & Sounds: http://www.blitzforum.de/forum...hp?t=12875 |
- Zuletzt bearbeitet von Wild-Storm am Do, Mai 27, 2004 18:32, insgesamt einmal bearbeitet
Edlothiol |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Kann gut sein, dass es am return 0 liegt. Warum gibst du auch 0 zurück, wenn du als Rückgabewert char* angegeben hast? | ||
![]() |
Wild-Storm |
![]() Antworten mit Zitat ![]() |
---|---|---|
ah ok, es funtzt^^ | ||
Visit http://www.next-dimension.org
------------------------------------------------- Freeware Modelle, Texturen & Sounds: http://www.blitzforum.de/forum...hp?t=12875 |
![]() |
Markus2 |
![]() Antworten mit Zitat ![]() |
---|---|---|
Irgendwie gehört WinMain extra ... ist das nicht die Initialisierungs
Funktion der DLL ??? |
||
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group