Re: CDArchive - Improved support for ring based protections
Posted: Wed Mar 26, 2025 2:54 pm
Disc Preservation Community
https://forum.redump.info/
Thanks. I implemented it but error occurs.reentrant wrote:32bit DLL in attachment.
Code: Select all
Could not find platform independent libraries <prefix>
Need to reread sector: 13164LBA: 13164, C2 error count; 0
Need to reread sector: 13201Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 13201, C2 error count; 0
Need to reread sector: 13211Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 13211, C2 error count; 0
Need to reread sector: 13248LBA: 13248, C2 error count; 0
Need to reread sector: 13257Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 13257, C2 error count; 0
Need to reread sector: 13266Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 13266, C2 error count; 0
Need to reread sector: 13267LBA: 13267, C2 error count; 0
Need to reread sector: 13285Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 13285, C2 error count; 0
Need to reread sector: 13294Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 13294, C2 error count; 0
Need to reread sector: 13295Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 13295, C2 error count; 0
Need to reread sector: 13322LBA: 13322, C2 error count; 0
Need to reread sector: 99879Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 99879, C2 error count; 0
Need to reread sector: 99880Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 99880, C2 error count; 0
Need to reread sector: 99892LBA: 99892, C2 error count; 0
Need to reread sector: 99893Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 99893, C2 error count; 0
Need to reread sector: 100108Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 100108, C2 error count; 0
Need to reread sector: 100162LBA: 100162, C2 error count; 0
Need to reread sector: 100163Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 100163, C2 error count; 0
Need to reread sector: 100175Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 100175, C2 error count; 0
Need to reread sector: 100176LBA: 100176, C2 error count; 0
Need to reread sector: 100189Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 100189, C2 error count; 0
Need to reread sector: 100215Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 100215, C2 error count; 0
Need to reread sector: 100216LBA: 100216, C2 error count; 0Code: Select all
C2_CORRECTOR_INIT c2InitBlock = {};
DWORD retVal = pDisc->C2.InitC2(&c2InitBlock);
if (!retVal) {
C2_CORRECTOR_HANDLE c2HandleBlock = {};
c2HandleBlock.pythonEccP = c2InitBlock.pythonEccP;
c2HandleBlock.pythonEccQ = c2InitBlock.pythonEccQ;
c2HandleBlock.sectorData = pDiscPerSector->data.current;
c2HandleBlock.c2Pointers = pDiscPerSector->data.next + CD_RAW_READ_C2_294_SIZE;
c2HandleBlock.c2Repaired = c2Repaired;
for (UINT h = 0; h < pExtArg->uiMaxRereadNum; h++) {
nErrCnt = 0;
retVal = pDisc->C2.HandleC2(&c2HandleBlock);
for (INT i = 0; i < CD_RAW_READ_C2_294_SIZE; i++) {
if (c2HandleBlock.c2Repaired[i] != 0) {
INT nBit = 0x80;
for (INT n = 0; n < CHAR_BIT; n++) {
if (c2HandleBlock.c2Repaired[i] & nBit) {
nErrCnt++;
}
nBit >>= 1;
}
}
}
OutputLog(standardError | fileC2Error, "LBA: %d, C2 error count; %d\n", nLBA, nErrCnt);
if (!nErrCnt) {
break;
}
}
}I set it.reentrant wrote:did you adjust the path in C2Corrector.ini?
Code: Select all
PYTHONHOME = C:\Users\xxx\AppData\Local\Programs\Python\Python312-32Code: Select all
"c:\Program Files (x86)\Python312-32\python.exe" c2.pyCode: Select all
PYTHONHOME: C:\Users\xxx\AppData\Local\Programs\Python\Python312-32
Could not find platform independent libraries <prefix>
Need to reread sector: 13183LBA: 13183, C2 error count; 0
Need to reread sector: 13201Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 13201, C2 error count; 0
Need to reread sector: 13211Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 13211, C2 error count; 0
Need to reread sector: 13220LBA: 13220, C2 error count; 0
Need to reread sector: 13229Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 13229, C2 error count; 0
Need to reread sector: 13257Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 13257, C2 error count; 0
Need to reread sector: 13266LBA: 13266, C2 error count; 0
Need to reread sector: 13267Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 13267, C2 error count; 0
Need to reread sector: 13276Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 13276, C2 error count; 0
Need to reread sector: 13285Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 13285, C2 error count; 0
Need to reread sector: 13294LBA: 13294, C2 error count; 0
Need to reread sector: 13295Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 13295, C2 error count; 0
Need to reread sector: 13313Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 13313, C2 error count; 0
Need to reread sector: 99785LBA: 99785, C2 error count; 0
Need to reread sector: 99786Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 99786, C2 error count; 0
Need to reread sector: 99880Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 99880, C2 error count; 0
Need to reread sector: 99892LBA: 99892, C2 error count; 0
Need to reread sector: 99893Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 99893, C2 error count; 0
Need to reread sector: 99933Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 99933, C2 error count; 0
Need to reread sector: 100108LBA: 100108, C2 error count; 0
Need to reread sector: 100162Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 100162, C2 error count; 0
Need to reread sector: 100163Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 100163, C2 error count; 0
Need to reread sector: 100175LBA: 100175, C2 error count; 0
Need to reread sector: 100176Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 100176, C2 error count; 0
Need to reread sector: 100189Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 100189, C2 error count; 0
Need to reread sector: 100203LBA: 100203, C2 error count; 0
Need to reread sector: 100215Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 100215, C2 error count; 0
Need to reread sector: 100216Exception ignored in garbage collection:
Traceback (most recent call last):
File "E:\source\repos\DiscImageCreator\Release_ANSI\Plugins\C2Corrector\reedsolo.py", line 984, in decode
total_chunks = int(math.ceil(float(len(data)) / float(chunk_size))) # need to convert to floats first to get an accurate floating division, or else we assume implicit conversion and it will cause an error on Python 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'int'> returned a result with an exception set
LBA: 100216, C2 error count; 0Here.reentrant wrote:I have also added testing script which invokes functions from reedsolo.py directly.
Code: Select all
E:\MyDownloadedApp\RippingTools\redump.org\reentrant>C:\Users\xxx\AppData\Local\Programs\Python\Python312-32\python.exe c2.py
P
0
[2, 0, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 167, 233]
bytearray(b'\x00\x00N\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
bytearray(b'\x00\x00N\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa7\xe9')
bytearray(b'\x00')
Q
0
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137, 239, 8, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 184, 152]
bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x89\xef\x08N\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x89\xef\x08N\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x98')
bytearray(b'')I confirmed that PYTHONHOME is set correctly using ProcessExplorer and HandleC2 func throws the exception in the "boost::python::error_already_set".reentrant wrote:1) After InitC2 function is called pause the app under debugger. Use tool like ProcessExplorer and view process environment variables. Check how PYTHONHOME looks like.
If "C:\Users\xxx\AppData\Local\Programs\Python\Python312-32" is set using SetEnvironmentVariable, HandleC2 func throws the exception in the "boost::python::error_already_set".reentrant wrote:2) In the attachment I put a DLL without a call to SetEnvironmentVariableW. Try to call SetEnvironmentVariableW / SetEnvironmentVariableA with path to your Python install directory (C:\Users\xxx\AppData\Local\Programs\Python\Python312-32) before InitC2 function
Thanks, but I'll try to do it myself a little more.reentrant wrote:Hmmm. Maybe commit the codes to github branch and I'll debug it locally? Something is not right...