- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am converting code that is working properly in IVF 9.0 32-bit to Em64T. I have a call to
PCGSDLLP = LOADLIBRARY( "PCGLSS.DLL"C)
I have PCGSDLLP declared as an int*8 pointer. The problem is I am getting a zero for the return of the function when the file pcglss.dll is present. Am I calling this correctly for em64t? I am using DFWIN complete code is:
PCGSDLLP = LOADLIBRARY( "PCGLSS.DLL"C)
I have PCGSDLLP declared as an int*8 pointer. The problem is I am getting a zero for the return of the function when the file pcglss.dll is present. Am I calling this correctly for em64t? I am using DFWIN complete code is:
C
USE DFWIN
C
IMPLICIT NONE
C
INTEGER*8 I
C
INTEGER*4 ERRORSTATUS
C
CHARACTER DLLBASEFILENAME*8
C
COMMON /STRINGN/ DLLBASEFILENAME
COMMON /PCGLSSP/ PCGSDLLP
C
POINTER (PCGSDLLP, I)
C
ERRORSTATUS = 0
C
DLLBASEFILENAME = 'PCGLSS'
C
PCGSDLLP = LOADLIBRARY( "PCGLSS.DLL"C)
PRINT*,'PCGSDLLP'
PRINT*, PCGSDLLP
PRINT*, PCGSDLLP
IF ( PCGSDLLP .EQ. 0 ) ERRORSTATUS = -1
C
LOADPCGL = ERRORSTATUS
C
RETURN
END
USE DFWIN
C
IMPLICIT NONE
C
INTEGER*8 I
C
INTEGER*4 ERRORSTATUS
C
CHARACTER DLLBASEFILENAME*8
C
COMMON /STRINGN/ DLLBASEFILENAME
COMMON /PCGLSSP/ PCGSDLLP
C
POINTER (PCGSDLLP, I)
C
ERRORSTATUS = 0
C
DLLBASEFILENAME = 'PCGLSS'
C
PCGSDLLP = LOADLIBRARY( "PCGLSS.DLL"C)
PRINT*,'PCGSDLLP'
PRINT*, PCGSDLLP
PRINT*, PCGSDLLP
IF ( PCGSDLLP .EQ. 0 ) ERRORSTATUS = -1
C
LOADPCGL = ERRORSTATUS
C
RETURN
END
This all works in 32-bit with the only change that the pointer is an int*4.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
PCGSDLLP should be of type INTEGER(HANDLE), not a pointer.
But that is not your essential problem a pointer should work as well. What does GetLastError() return after LoadLibrary fails?
But that is not your essential problem a pointer should work as well. What does GetLastError() return after LoadLibrary fails?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I need to try this and get back to you with the error code. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Problem solved. The DLL was not a valid EM64T.
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