PSS ID Number: 130807
Article Last Modified on 11/3/1999
C The code for the DLL
C Compile options needed: /LD
C
COMMON /TheBlock[DLLEXPORT]/ CommonBlockIntegerArray(3)
INTEGER*4 CommonBlockIntegerArray
CommonBlockIntegerArray(1) = 1
CommonBlockIntegerArray(2) = 2
CommonBlockIntegerArray(3) = 3
END
C
C The code for the EXE.
C Compile options needed: none
C Linker options needed: include the import library for the DLL
C
C Define the common block for sharing.
C
COMMON /TheBlock[DLLIMPORT]/ CommonBlockIntegerArray(3)
INTEGER*4 CommonBlockIntegerArray
C
C Some local variables.
C
INTEGER*4 intTemp
CHARACTER*3 someText
C
C The main program.
C
someText = '11'
intTemp = 1
C
C If the subscript is an integer variable, there is no problem.
C
READ (someText, '(A3)') CommonBlockIntegerArray(intTemp)
C
C The array subscript is a numeric literal, an access violation occurs.
C
READ (someText, '(A3)') CommonBlockIntegerArray(1)
END
112010 BUG: Access Violation on READ of Exported COMMON Array
Additional query words: 1.00 Dr. Watson imported
Keywords: KB130807
Technology: kbAudDeveloper kbFORTRANPower32100NT kbFortranSearch kbZNotKeyword2