- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
FUNCTION ReadFile( & hFile, & lpBuffer, & nNumberOfBytesToRead, & lpNumberOfBytesRead, & lpOverlapped) import integer(BOOL) :: ReadFile ! BOOL !DEC$ ATTRIBUTES DEFAULT, STDCALL, DECORATE, ALIAS:'ReadFile' :: ReadFile integer(HANDLE) hFile ! HANDLE hFile integer(LPVOID) lpBuffer ! LPVOID lpBuffer integer(DWORD) nNumberOfBytesToRead ! DWORD nNumberOfBytesToRead integer(DWORD) lpNumberOfBytesRead ! LPDWORD lpNumberOfBytesRead !DEC$ ATTRIBUTES REFERENCE, IGNORE_LOC, ALLOW_NULL :: lpOverlapped TYPE (T_OVERLAPPED) lpOverlapped ! LPOVERLAPPED lpOverlapped END FUNCTION
Since number of bytes read is a returned value it needs to be a pointer and should be declaed with INTEGER(LPDWORD) as it was in your previous kernal32.f90
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
writeFile has the same issue.
The new interfaces are causing crashes for me. I substitued the old interface and all is OK now.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page