FIX: Access Violation on READ of Exported COMMON ArrayLast reviewed: September 18, 1997Article ID: Q112010 |
1.00
WINDOWS NT
kbtool kbfixlist kberrmsg
The information in this article applies to:
SYMPTOMSAttempting to READ an array element that is exported from a COMMON block in a dynamic-link library (DLL) may generate an access violation message box under Windows NT.
CAUSEThis run-time error occurs when the data is read from an external file. This error does not occur with WRITE statements or when reading COMMON variables.
RESOLUTIONREAD exported COMMON data into local allocatable arrays, and then assign these arrays to the arrays in the exported COMMON block.
STATUSMicrosoft has confirmed this to be a problem in FORTRAN PowerStation for Windows NT, version 1.0. Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONThe sample below illustrates the problem:
Sample Codec MAIN Source Code c Compile options required: none c Linker options required: include the import library for the DLL. c interface to subroutine bar[dllimport]() end common /bridge[dllimport]/ i integer*4 i(4) open(3,file='main.inp') read(3,*) i(1) close(3) call bar endc DLL Source Code c Compile options required: /LD c subroutine bar[dllexport]() common /bridge[dllexport]/ i integer*4 i(4) write(*,*) 'In DLL:' return endContents of main.inp: 1
|
Additional reference words: 1.00 Dr. Watson imported buglist1.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |