[Bug 53053] Riot Vanguard (Riot Games) 'vgk.sys' can't find 'cng.sys' (copying from system32/drivers to system32 works around)

WineHQ Bugzilla wine-bugs at winehq.org
Mon May 30 15:23:10 CDT 2022


https://bugs.winehq.org/show_bug.cgi?id=53053

--- Comment #10 from Etaash Mathamsetty <etaash.mathamsetty at gmail.com> ---
yes, I did more reading and figured that out, I need to do instruction
emulation with the cmp instruction (with hex code 0x39) to get it working. I
probably did something wrong since it is giving be error c000a004 (invalid
windows version). I also managed to partically implement IoCreateFileEx, which
I will paste below. (along with a KeAreAllApcsDisabled stub)

NTSTATUS WINAPI IoCreateFileEx(
             PHANDLE                   FileHandle,
             ACCESS_MASK               DesiredAccess,
             POBJECT_ATTRIBUTES        ObjectAttributes,
             PIO_STATUS_BLOCK          IoStatusBlock,
             PLARGE_INTEGER            AllocationSize,
             ULONG                     FileAttributes,
             ULONG                     ShareAccess,
             ULONG                     Disposition,
             ULONG                     CreateOptions,
             PVOID                     EaBuffer,
             ULONG                     EaLength,
             CREATE_FILE_TYPE          CreateFileType,
             PVOID                     InternalParameters,
             ULONG                     Options,
             void*                     DriverContext
)
{
    //they use these for log files, so why dont I just implement it a little
    FIXME(": Partially implemented\n");
    SECURITY_ATTRIBUTES attr;
    DWORD error = 0;
    DWORD dispos = 0;
    attr.lpSecurityDescriptor = ObjectAttributes->SecurityDescriptor;
    attr.bInheritHandle = FALSE;
    attr.nLength = sizeof(attr);
    switch(Disposition){
        case FILE_CREATE:
            dispos = CREATE_NEW;
        case FILE_SUPERSEDE:
            dispos = TRUNCATE_EXISTING;
        case FILE_OPEN_IF:
            dispos = OPEN_ALWAYS;
        case FILE_OPEN:
            dispos = OPEN_EXISTING;
        case FILE_OVERWRITE_IF:
            dispos = CREATE_ALWAYS;
        case FILE_OVERWRITE:
            dispos = CREATE_ALWAYS;
        default:
            break;
    }
    *FileHandle = CreateFileW(ObjectAttributes->ObjectName->Buffer,
DesiredAccess, ShareAccess,&attr,dispos,FileAttributes,NULL);
    error = GetLastError();
    if(Disposition == FILE_SUPERSEDE && error == ERROR_FILE_NOT_FOUND){
        *FileHandle = CreateFileW(ObjectAttributes->ObjectName->Buffer,
DesiredAccess, ShareAccess,&attr,CREATE_ALWAYS,FileAttributes,NULL);
        error = GetLastError();
    }
    if(Disposition == FILE_OVERWRITE && error == 0){
        *FileHandle = NULL;
        DeleteFileW(ObjectAttributes->ObjectName->Buffer);
        return STATUS_UNSUCCESSFUL;
    }
    return STATUS_SUCCESS;
}

BOOLEAN WINAPI KeAreAllApcsDisabled()
{
    FIXME(": stub: returning false\n");
    return FALSE;
}

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list