Split advapi32 into separate files (part 2) & more impls for ee-gcc/cygwin

This commit is contained in:
2025-10-02 09:05:27 -06:00
parent 79e1dbf523
commit 3249ebf4bf
24 changed files with 1500 additions and 581 deletions

View File

@@ -1,5 +1,6 @@
#include "handleapi.h"
#include "dll/advapi32/internal.h"
#include "errors.h"
#include "files.h"
#include "handles.h"
@@ -9,10 +10,6 @@
#include <pthread.h>
#include <unistd.h>
namespace advapi32 {
void releaseToken(void *tokenPtr);
}
namespace kernel32 {
BOOL WIN_FUNC DuplicateHandle(HANDLE hSourceProcessHandle, HANDLE hSourceHandle, HANDLE hTargetProcessHandle,
@@ -151,12 +148,7 @@ BOOL WIN_FUNC CloseHandle(HANDLE hObject) {
success = false;
}
} else if (data.type == handles::TYPE_PROCESS) {
auto *proc = reinterpret_cast<processes::Process *>(data.ptr);
if (proc) {
delete proc;
} else {
success = false;
}
delete reinterpret_cast<processes::Process *>(data.ptr);
} else if (data.type == handles::TYPE_TOKEN) {
advapi32::releaseToken(data.ptr);
} else if (data.type == handles::TYPE_MUTEX) {