LlJobOpen() - Speicherzugriffsverletzung/Access Violation

Guten Tag!

Ich habe begonnen für L&L 16 mal etwas unter C++ zu programmieren.
Das war jetzt erstmal ganz auf die schnelle, um die verschiedenen Funktionen zu testen.
Ich habe mit Absicht zum Testen keine OOP genutzt.

#include <iostream>
#include <string>
#include <windows.h>
#include "cmbtLL16.hx"


#undef _LL16_H
#define IMPLEMENTATION
#include "cmbtLL16.hx"
#undef IMPLEMENTATION

using namespace std;

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine,int nCmdShow){

HWND hWnd;
HJOB hJob;

if (LL16xLoad() < 0){
	cout << "LL16xLoad nicht gestartet" << endl;
} else {
    cout << "LL16xLoad wurde gestartet" << endl;
};

hJob = LlJobOpen(CMBTLANG_GERMAN);

if(hJob=LL_ERR_BAD_JOBHANDLE){

cout << "Job nicht gestartet" << endl;

}else{
    cout << "Job gestartet" << endl;
};


Weiterer, nicht relevanter, Code...

}

LL16xLoad wird gestartet, dann folgt die “Access Violation” Meldung und es wird die Meldung ausgegeben, dass der Job nicht gestartet werden kann.

Das sagt u.a der Debugger:

[quote]CMLL16 : 13:27:59.682 000006b0/01 4 [ListLabel.exe] =1 (OK (1))
CMLL16 : 13:27:59.686 000006b0/01 5 WRN: 0X01E78E20 is not an IUnknown object, the pointer points to memory not marked as COMMITted
CMLL16 : 13:27:59.686 000006b0/01 6 WRN: 0X01E78E20 is not an IUnknown object, the pointer points to memory not marked as COMMITted
CMLL16 : 13:27:59.686 000006b0/01 7 WRN: 0X01E78E20 is not an IUnknown object, the pointer points to memory not marked as COMMITted
CMUT16 : 13:27:59.687 000006b0/01 8 clsThreadBase(CMUT16::DebugHelp::clsDBGHelpWrapper)::ThreadStart: Cannot create thread
CMUT16 : 13:27:59.687 000006b0/01 9 problem running thread (usually the GPF happened in an allocator…)
CMUT16 : 13:27:59.687 000006b0/01 0 >clsGPFProtection::GenerateExceptionReport(bCreateMinidumpOnly=0, IsUserInteractionAllowed()=1): DBGHELP is present
CMUT16 : 13:27:59.687 000006b0/01 1 clsThreadBase(CMUT16::GPFInfo::clsMessageBox)::ThreadStart: Cannot create thread
CMUT16 : 13:28:00.896 000006b0/00 2 clsGPFProtection::GenerateExceptionReport(): user actively suppressed GPFInfo
CMUT16 : 13:28:00.896 000006b0/00 3 <clsGPFProtection::GenerateExceptionReport() → no GPF info requested
[/quote]

Nach Abbruch steht folgendes in der Konsole:

Ich nutze Code::Blocks als IDE.

Vielen Dank!

“WINAPI” falsch definiert?

So ein Absturz schon bei der ersten API bedeutet meist, daß da die Calling-Convention falsch ist.

Paulchen