equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
45 { |
45 { |
46 OVERLAPPED ov; |
46 OVERLAPPED ov; |
47 DWORD nread; |
47 DWORD nread; |
48 BOOL result; |
48 BOOL result; |
49 |
49 |
50 jlong handle = (*env)->GetLongField(env, fdo, handle_fdID); |
50 HANDLE handle = (HANDLE)(*env)->GetLongField(env, fdo, handle_fdID); |
51 void *buf = (void *)jlong_to_ptr(address); |
51 void *buf = (void *)jlong_to_ptr(address); |
52 |
52 |
53 ZeroMemory(&ov, sizeof(ov)); |
53 ZeroMemory(&ov, sizeof(ov)); |
54 ov.Offset = (DWORD)offset; |
54 ov.Offset = (DWORD)offset; |
55 ov.OffsetHigh = (DWORD)(offset >> 32); |
55 ov.OffsetHigh = (DWORD)(offset >> 32); |