Skip to content

TryEnterCriticalSection prototype does not match Windows docs #70504

Closed
@RalfJung

Description

@RalfJung

According to this documentation, the return type of TryEnterCriticalSection is BOOL (an alias for i32), but in Rust we use BOOLEAN (an alias for u8):

pub fn TryEnterCriticalSection(CriticalSection: *mut CRITICAL_SECTION) -> BOOLEAN;

Which one is right?

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.O-windowsOperating system: WindowsT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions