Skip to content

Unable to call MapViewOfFile #7

@norrisjeremy

Description

@norrisjeremy

I've stumbled across an issue when attempting to use the MapViewOfFile function.

It seems the code generator isn't correctly generating code to handle this function correctly?

Caused by: java.lang.invoke.WrongMethodTypeException: handle's method type (SegmentAllocator,MemorySegment,MemorySegment,int,int,int,long)MemorySegment but found (MemorySegment,MemorySegment,int,int,int,long)MemorySegment
        at java.base/java.lang.invoke.Invokers.newWrongMethodTypeException(Invokers.java:522)
        at java.base/java.lang.invoke.Invokers.checkExactType(Invokers.java:531)
        at com.jcraft.jsch.windowsapi.windows.win32.system.memory.Apis.MapViewOfFile(Apis.java:119)
        ... 11 more

This seems to indicate that Java is expecting a SegmentAllocator argument to be passed as the first argument to the generated MethodHandle?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions