Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2007-07

DLL WIN64: Entry point not found

25 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Luc Vigato, Sita Software

Hello,

I have compiled a DLL under Win64. It's a UDF-library for Firbird 2.1. Under Linux 64bit all things are working, only in WIN64 not.

The problem is that Firebird says that he cannot find the Entry Point of each of my functions.
It's not a Firebird problem, i have made a test application who calls the function from the DLL and i have the same error "entry point not found".

Calling convention is: cdecl

Can someone help me please ?

These is my command line to compile the library.

fpc -S2 -Sh -dFREE_IT -Fu../Units SitaUdfLib.dpr

Output of fpc
-------------
Free Pascal Compiler version 2.1.5 [2007/05/31] for x86_64 Copyright (c) 1993-2007 by Florian Klaempfl
Target OS: Win64 for x64
Compiling SitaUdfLib.dpr
Compiling UnitFonctionUdfString.pas
Linking SitaUdfLib.dll
977 lines compiled, 0.5 sec, 635888 bytes code, 312064 bytes data 1 note(s) issued

Reply by email

Mark - WBIsoft.COM
to Luc Vigato, Sita Software

I think the calling convention be STDCALL ?

Mark

Earlier message 55 lines
----- Original Message ----- From: "Luc Vigato, Sita Software" To: Sent: Wednesday, July 18, 2007 10:43 AM Subject: [fpc-devel] DLL WIN64: Entry point not found > Hello, > > I have compiled a DLL under Win64. It's a UDF-library for Firbird 2.1. > Under Linux 64bit all things are working, only in WIN64 not. > > The problem is that Firebird says that he cannot find the Entry Point of > each of my functions. > It's not a Firebird problem, i have made a test application who calls the > function from the DLL and i have the same error "entry point not found". > > Calling convention is: cdecl > > Can someone help me please ? > > These is my command line to compile the library. > > fpc -S2 -Sh -dFREE_IT -Fu../Units SitaUdfLib.dpr > > > Output of fpc > ------------- > Free Pascal Compiler version 2.1.5 [2007/05/31] for x86_64 > Copyright (c) 1993-2007 by Florian Klaempfl > Target OS: Win64 for x64 > Compiling SitaUdfLib.dpr > Compiling UnitFonctionUdfString.pas > Linking SitaUdfLib.dll > 977 lines compiled, 0.5 sec, 635888 bytes code, 312064 bytes data > 1 note(s) issued > > > _______________________________________________ > fpc-pascal maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > > > _______________________________________________ > fpc-devel maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-devel > > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.476 / Virus Database: 269.10.8/906 - Release Date: 17/07/2007 > 18:30 > >

Reply by email

Luc Vigato, Sita Software
to Mark - WBIsoft.COM

I have tried at the moment the DLL only with PE Explorer PE Explorer gives an error . I don't know about other dependancy checker. When you give me an other depandancy checker I try it.

When loading DLL with PE Explorer
18.07.2007 13:47:09 : Open File: D:\Fichiers echange\DeRaoul\SitaUdfLib.dll 18.07.2007 13:47:10 : File size: 957760 bytes.
18.07.2007 13:47:10 : Using the Plug-in subsystem... 18.07.2007 13:47:10 : Upack Unpacker Plug-in: Executing... 18.07.2007 13:47:10 : Upack Unpacker Plug-in: <Upack> The file is not Upacked.
18.07.2007 13:47:10 : Upack Unpacker Plug-in: not accomplished. 18.07.2007 13:47:10 : UPX Unpacker Plug-in: Executing... 18.07.2007 13:47:10 : UPX Unpacker Plug-in: <UPX> The file is not UPXed. 18.07.2007 13:47:10 : UPX Unpacker Plug-in: not accomplished. 18.07.2007 13:47:10 : The Plug-in subsystem finished. 18.07.2007 13:47:10 : MS-DOS Header Size: 0040h
18.07.2007 13:47:10 : MS-DOS Header: OK
18.07.2007 13:47:10 : Next Header OFFSET: 0080h
18.07.2007 13:47:10 : PE Signature: OK
18.07.2007 13:47:10 : Calculating Checksum: SUCCESS (Header's Checksum: 00000000h / Real Checksum: 000F264Bh)
18.07.2007 13:47:10 : EOF Position: 000E9D40h (957760) 18.07.2007 13:47:10 : Warning! Section <.data> (1) extends beyond the raw file offset of section <.bss> (2).
18.07.2007 13:47:10 : Error! (Step: Examining Resources) 18.07.2007 13:47:10 : Errors detected! Opening file in SAFE MODE... 18.07.2007 13:47:10 : Done.

PE Explorer - Dependancy scanner - Result
// Generated by PE Explorer 1.99 (www.heaventools.com)
// File name: D:\Fichiers echange\DeRaoul\SitaUdfLib.dll
// Created  : 18.07.2007 13:48
// Type     : Dependencies
Version Info not available.
Earlier message 11 lines
-----Original Message----- From: On Behalf Of Mark - WBIsoft.COM Sent: mercredi 18 juillet 2007 12:37 To: FPC developers' list Subject: Re: [fpc-devel] DLL WIN64: Entry point not found Wasn't aware CDECL on Win64 was the same as STDCALL, if so then is the export table correct - have you checked with a dependancy checker ?

Reply by email

Luc Vigato, Sita Software
to Mark - WBIsoft.COM

The export table seems to be OK, but from where comes the error "Entry point not found"? I don't have any idea. I'm open for all suggestions.

Result of MiTeC EXE explorer.

Dump of file \\pc-luc\DeRaoul\SitaUdfLib.dll
Created by EXE Explorer 1.0.0.0 - Copyright C 2006 Michal Mutl

DOS HEADER
Magic number: 0x5A4D
Bytes on last page of file: 0x0090
Pages in file: 0x0003
Relocations: 0x0000
Size of header in paragraphs: 0x0004
Minimum extra paragraphs needed: 0x0000
Maximum extra paragraphs needed: 0xFFFF
Initial (relative) SS value: 0x0000
Initial SP value: 0x00B8
Checksum: 0x0000
Initial IP value: 0x0000
Initial (relative) CS value: 0x0000
File address of relocation table: 0x0040
Overlay number: 0x0000
Reserved[0]: 0x0000
Reserved[1]: 0x0000
Reserved[2]: 0x0000
Reserved[3]: 0x0000
OEM identifier: 0x0000
OEM information: 0x0000
Reserved[0]: 0x0000
Reserved[1]: 0x0000
Reserved[2]: 0x0000
Reserved[3]: 0x0000
Reserved[4]: 0x0000
Reserved[5]: 0x0000
Reserved[6]: 0x0000
Reserved[7]: 0x0000
Reserved[8]: 0x0000
Reserved[9]: 0x0000
File address of new exe header: 0x00000080

FILE HEADER
Signature: 0x00004550 (Portable Executable) Machine: 64-bit AMD
Number of sections: 5
Timestamp: 1/1/1970
Pointer to symbol table: 0x000E9D40
Number of symbols: 11975
Size of optional header: 240
Characteristics: 0x220F

OPTIONAL HEADER
Magic: 0x020B (PE32+ (64bit)) Linker version: 2.15
Size of code: 635888
Size of initialized data: 312064
Size of uninitialized: 11184
Address of entry point: 0x00021160
Base of code: 0x00001000
Image base: 0x0000000010000000
Section alignment: 4096
File alignment: 512
Operating system version: 4.0
Image version: 1.0
Subsystem version: 4.0
Win32 version value: 0
Size of image: 983040 B
Size of headers: 1024
Checksum: 0
Subsystem: Console
DLL characteristics: 0x0000
Size of stack reserve: 262144
Size of stack commit: 4096
Size of heap reserve: 1048576
Size of heap commit: 4096
Loader flags: 0x00000000
Number of RVA: 16

CHECKSUMS
CRC32: B095FA5E
MD4: CD59C3109BE02443514A9280F081430D
MD5: 0897202B5DE9BD803E6B3A1AB98659B3
SHA1: 1E1C9EFB3F9399EF63F5029516C2D601A6C58126

SECTIONS
.text
Virtual address: 0x00001000
Virtual size: 635888
Raw data offset: 0x00000400
Raw data size: 635888
Characteristics: 0x60500020
Relocations: 0
Line numbers: 0
.data
Virtual address: 0x0009D000
Virtual size: 312064
Raw data offset: 0x0009B800
Raw data size: 312064
Characteristics: 0xC0500040
Relocations: 0
Line numbers: 0
.bss
Virtual address: 0x000EA000
Virtual size: 11184
Raw data offset: 0x00000000
Raw data size: 0
Characteristics: 0xC0500080
Relocations: 0
Line numbers: 0
.idata
Virtual address: 0x000ED000
Virtual size: 6240
Raw data offset: 0x000E7C00
Raw data size: 6240
Characteristics: 0xC0400040
Relocations: 0
Line numbers: 0
.edata
Virtual address: 0x000EF000
Virtual size: 1856
Raw data offset: 0x000E9600
Raw data size: 1856
Characteristics: 0x40400040
Relocations: 0
Line numbers: 0

DIRECTORIES
Exports
Section: .edata
RVA: 0x000EF000
Size: 1856
Imports
Section: .idata
RVA: 0x000ED000
Size: 6240

EXPORTS
AddMonth
Ordinal: 0x0001
Address: 0x0002A850
AddYear
Ordinal: 0x0002
Address: 0x0002A710
Age
Ordinal: 0x0003
Address: 0x0002A5D0
AgeDebutAnnee
Ordinal: 0x0004
Address: 0x0002AA10
AgeFinAnnee
Ordinal: 0x0005
Address: 0x0002A9D0
Annee
Ordinal: 0x0006
Address: 0x0002A990
BlobContainsString
Ordinal: 0x0007
Address: 0x00024A10
BlobContainsStringBefore
Ordinal: 0x0008
Address: 0x00027E80
BlobMaxSegmentLength
Ordinal: 0x0009
Address: 0x00027B00
BlobSegmentCount
Ordinal: 0x000A
Address: 0x00025EE0
BlobSize
Ordinal: 0x000B
Address: 0x00033E40
Chiffre
Ordinal: 0x000C
Address: 0x00033BE0
CodeSemaine
Ordinal: 0x000D
Address: 0x00033460
ConversionChiffreLettre
Ordinal: 0x000E
Address: 0x00032C50
CopyDebut
Ordinal: 0x000F
Address: 0x00032520
CopyDernier
Ordinal: 0x0010
Address: 0x000249E0
CopyFin
Ordinal: 0x0011
Address: 0x00024990
DateTimeToStr
Ordinal: 0x0012
Address: 0x00024570
DateToInteger
Ordinal: 0x0013
Address: 0x00024270
DayOfMonth
Ordinal: 0x0014
Address: 0x00023A00
DayOfWeek
Ordinal: 0x0015
Address: 0x00023CF0
DayOfYear
Ordinal: 0x0016
Address: 0x00024140
DebutAnnee
Ordinal: 0x0017
Address: 0x00024010
DebutMois
Ordinal: 0x0018
Address: 0x00026AE0
DebutStr
Ordinal: 0x0019
Address: 0x000269A0
DiffDate
Ordinal: 0x001A
Address: 0x00027150
DoubleAbs
Ordinal: 0x001B
Address: 0x00026EF0
EncodeDynKey
Ordinal: 0x001C
Address: 0x00026CC0
EncodeLikeDynKey
Ordinal: 0x001D
Address: 0x000272F0
Equal
Ordinal: 0x001E
Address: 0x0002A230
EqualOrNullInteger
Ordinal: 0x001F
Address: 0x0002A430
ExtraireCodeTracabilite
Ordinal: 0x0020
Address: 0x0002AEC0
ExtraireTexteVirgule
Ordinal: 0x0021
Address: 0x0002AD00
ExtraireValeurModifie
Ordinal: 0x0022
Address: 0x0002ACC0
ExtraireValeurModifieInt
Ordinal: 0x0023
Address: 0x0002AC90
FinAnnee
Ordinal: 0x0024
Address: 0x0002ABC0
FinMois
Ordinal: 0x0025
Address: 0x0002AA80
FinSemaine
Ordinal: 0x0026
Address: 0x00026940
FinStr
Ordinal: 0x0027
Address: 0x0002A020
FormatDateTimeStr
Ordinal: 0x0028
Address: 0x00029E10
FormatDevise
Ordinal: 0x0029
Address: 0x00028220
FracValue
Ordinal: 0x002A
Address: 0x00025500
GetCurrentProcessIdent
Ordinal: 0x002B
Address: 0x00026750
GetDynKeyFieldValue
Ordinal: 0x002C
Address: 0x00025DA0
GetMaxDate
Ordinal: 0x002D
Address: 0x00025C70
GetMinDate
Ordinal: 0x002E
Address: 0x00025620
HToMin
Ordinal: 0x002F
Address: 0x000252E0
IntValue
Ordinal: 0x0030
Address: 0x00025160
IntegerAbs
Ordinal: 0x0031
Address: 0x00024FE0
IsDebutFinMois
Ordinal: 0x0032
Address: 0x00024E60
KillProcess
Ordinal: 0x0033
Address: 0x00024CE0
Left
Ordinal: 0x0034
Address: 0x00024C70
LignesTexteVirgule
Ordinal: 0x0035
Address: 0x00024C30
Lower
Ordinal: 0x0036
Address: 0x00024A40
MilieuEntre2SubStr
Ordinal: 0x0037
Address: 0x00023720
MinToH
Ordinal: 0x0038
Address: 0x00023520
Month
Ordinal: 0x0039
Address: 0x000234B0
NbMois2Dates
Ordinal: 0x003A
Address: 0x00023440
NombreDeJourDeuxDates
Ordinal: 0x003B
Address: 0x000233E0
PosChar
Ordinal: 0x003C
Address: 0x00023380
ProcessExists
Ordinal: 0x003D
Address: 0x00023300
RemplacerBlob
Ordinal: 0x003E
Address: 0x00023280
SQLEncodeDate
Ordinal: 0x003F
Address: 0x00023220
Simple
Ordinal: 0x0040
Address: 0x000231C0
Solde
Ordinal: 0x0041
Address: 0x00023100
StrBlob
Ordinal: 0x0042
Address: 0x00022F90
StringListCount
Ordinal: 0x0043
Address: 0x00022F50
StringListKey
Ordinal: 0x0044
Address: 0x00022F10
StringListValue
Ordinal: 0x0045
Address: 0x00022ED0
StringReadSection
Ordinal: 0x0046
Address: 0x00022C90
StripDate
Ordinal: 0x0047
Address: 0x00022C10
StripTime
Ordinal: 0x0048
Address: 0x00022BE0
SubStr
Ordinal: 0x0049
Address: 0x00022BB0
Trim
Ordinal: 0x004A
Address: 0x00022B80
TrimLeft
Ordinal: 0x004B
Address: 0x00022B50
TrimRight
Ordinal: 0x004C
Address: 0x00022B20
WeekOf
Ordinal: 0x004D
Address: 0x0002AF90
Year
Ordinal: 0x004E
Address: 0x0002AF50
md5
Ordinal: 0x004F
Address: 0x0002AF10

IMPORTS
kernel32.dll
FindResourceA
Ordinal: 0x0000
Address: 0x02F187E0
LoadResource
Ordinal: 0x0000
Address: 0x02F187F0
SizeofResource
Ordinal: 0x0000
Address: 0x02F18800
LockResource
Ordinal: 0x0000
Address: 0x02F18812
FreeResource
Ordinal: 0x0000
Address: 0x02F18822
GetLastError
Ordinal: 0x0000
Address: 0x02F18832
GetTickCount
Ordinal: 0x0000
Address: 0x02F18842
ExitProcess
Ordinal: 0x0000
Address: 0x02F18852
GetStartupInfoA
Ordinal: 0x0000
Address: 0x02F18860
GetStdHandle
Ordinal: 0x0000
Address: 0x02F18872
GetCommandLineA
Ordinal: 0x0000
Address: 0x02F18882
GetCurrentProcessId
Ordinal: 0x0000
Address: 0x02F18894
GetCurrentThreadId
Ordinal: 0x0000
Address: 0x02F188AA
GetModuleFileNameA
Ordinal: 0x0000
Address: 0x02F188C0
GetModuleHandleA
Ordinal: 0x0000
Address: 0x02F188D6
WriteFile
Ordinal: 0x0000
Address: 0x02F188EA
ReadFile
Ordinal: 0x0000
Address: 0x02F188F6
CloseHandle
Ordinal: 0x0000
Address: 0x02F18902
SetFilePointer
Ordinal: 0x0000
Address: 0x02F18910
SetEndOfFile
Ordinal: 0x0000
Address: 0x02F18922
FreeLibrary
Ordinal: 0x0000
Address: 0x02F18932
LoadLibraryA
Ordinal: 0x0000
Address: 0x02F18940
GetFileType
Ordinal: 0x0000
Address: 0x02F18950
GetFileAttributesA
Ordinal: 0x0000
Address: 0x02F1895E
DeleteFileA
Ordinal: 0x0000
Address: 0x02F18974
MoveFileA
Ordinal: 0x0000
Address: 0x02F18982
CreateFileA
Ordinal: 0x0000
Address: 0x02F1898E
GetProcAddress
Ordinal: 0x0000
Address: 0x02F1899C
CreateDirectoryA
Ordinal: 0x0000
Address: 0x02F189AE
RemoveDirectoryA
Ordinal: 0x0000
Address: 0x02F189C2
SetCurrentDirectoryA
Ordinal: 0x0000
Address: 0x02F189D6
GetCurrentDirectoryA
Ordinal: 0x0000
Address: 0x02F189EE
GetProcessHeap
Ordinal: 0x0000
Address: 0x02F18A06
HeapAlloc
Ordinal: 0x0000
Address: 0x02F18A18
HeapFree
Ordinal: 0x0000
Address: 0x02F18A24
TlsAlloc
Ordinal: 0x0000
Address: 0x02F18A30
TlsGetValue
Ordinal: 0x0000
Address: 0x02F18A3C
TlsSetValue
Ordinal: 0x0000
Address: 0x02F18A4A
CreateThread
Ordinal: 0x0000
Address: 0x02F18A58
ExitThread
Ordinal: 0x0000
Address: 0x02F18A68
LocalAlloc
Ordinal: 0x0000
Address: 0x02F18A76
LocalFree
Ordinal: 0x0000
Address: 0x02F18A84
Sleep
Ordinal: 0x0000
Address: 0x02F18A90
SuspendThread
Ordinal: 0x0000
Address: 0x02F18A98
ResumeThread
Ordinal: 0x0000
Address: 0x02F18AA8
TerminateThread
Ordinal: 0x0000
Address: 0x02F18AB8
WaitForSingleObject
Ordinal: 0x0000
Address: 0x02F18ACA
SetThreadPriority
Ordinal: 0x0000
Address: 0x02F18AE0
GetThreadPriority
Ordinal: 0x0000
Address: 0x02F18AF4
CreateEventA
Ordinal: 0x0000
Address: 0x02F18B08
ResetEvent
Ordinal: 0x0000
Address: 0x02F18B18
SetEvent
Ordinal: 0x0000
Address: 0x02F18B26
InitializeCriticalSection
Ordinal: 0x0000
Address: 0x02F18B32
DeleteCriticalSection
Ordinal: 0x0000
Address: 0x02F18B4E
EnterCriticalSection
Ordinal: 0x0000
Address: 0x02F18B66
LeaveCriticalSection
Ordinal: 0x0000
Address: 0x02F18B7E
GetCurrentProcess
Ordinal: 0x0000
Address: 0x02F18B96
ReadProcessMemory
Ordinal: 0x0000
Address: 0x02F18BAA
AddVectoredExceptionHandler
Ordinal: 0x0000
Address: 0x02F18BBE
MultiByteToWideChar
Ordinal: 0x0000
Address: 0x02F18BDC
WideCharToMultiByte
Ordinal: 0x0000
Address: 0x02F18BF2
GetEnvironmentStringsA
Ordinal: 0x0000
Address: 0x02F18C08
FreeEnvironmentStringsA
Ordinal: 0x0000
Address: 0x02F18C22
FormatMessageA
Ordinal: 0x0000
Address: 0x02F18C3C
GetTempPathA
Ordinal: 0x0000
Address: 0x02F18C4E
GetTempFileNameA
Ordinal: 0x0000
Address: 0x02F18C5E
GetWindowsDirectoryA
Ordinal: 0x0000
Address: 0x02F18C72
GetDiskFreeSpaceA
Ordinal: 0x0000
Address: 0x02F18C8A
SetFileAttributesA
Ordinal: 0x0000
Address: 0x02F18C9E
CreateProcessA
Ordinal: 0x0000
Address: 0x02F18CB4
FindFirstFileA
Ordinal: 0x0000
Address: 0x02F18CC6
FindNextFileA
Ordinal: 0x0000
Address: 0x02F18CD8
GetVersionExA
Ordinal: 0x0000
Address: 0x02F18CE8
CompareStringA
Ordinal: 0x0000
Address: 0x02F18CF8
GetLocaleInfoA
Ordinal: 0x0000
Address: 0x02F18D0A
CompareStringW
Ordinal: 0x0000
Address: 0x02F18D1C
GlobalAlloc
Ordinal: 0x0000
Address: 0x02F18D2E
GlobalReAlloc
Ordinal: 0x0000
Address: 0x02F18D3C
GlobalLock
Ordinal: 0x0000
Address: 0x02F18D4C
GlobalHandle
Ordinal: 0x0000
Address: 0x02F18D5A
GlobalUnlock
Ordinal: 0x0000
Address: 0x02F18D6A
GlobalFree
Ordinal: 0x0000
Address: 0x02F18D7A
LocalReAlloc
Ordinal: 0x0000
Address: 0x02F18D88
GetExitCodeProcess
Ordinal: 0x0000
Address: 0x02F18D98
GetExitCodeThread
Ordinal: 0x0000
Address: 0x02F18DAE
SetLastError
Ordinal: 0x0000
Address: 0x02F18DC2
SetErrorMode
Ordinal: 0x0000
Address: 0x02F18DD2
FindClose
Ordinal: 0x0000
Address: 0x02F18DE2
GetFileTime
Ordinal: 0x0000
Address: 0x02F18DEE
SetFileTime
Ordinal: 0x0000
Address: 0x02F18DFC
GetLocalTime
Ordinal: 0x0000
Address: 0x02F18E0A
FileTimeToLocalFileTime
Ordinal: 0x0000
Address: 0x02F18E1A
LocalFileTimeToFileTime
Ordinal: 0x0000
Address: 0x02F18E34
FileTimeToDosDateTime
Ordinal: 0x0000
Address: 0x02F18E4E
DosDateTimeToFileTime
Ordinal: 0x0000
Address: 0x02F18E66
GetThreadLocale
Ordinal: 0x0000
Address: 0x02F18E7E
GetLargestConsoleWindowSize
Ordinal: 0x0000
Address: 0x02F18E90
oleaut32.dll
SysAllocStringLen
Ordinal: 0x0000
Address: 0x02F18EAE
SysFreeString
Ordinal: 0x0000
Address: 0x02F18EC2
VariantChangeTypeEx
Ordinal: 0x0000
Address: 0x02F18ED2
VariantClear
Ordinal: 0x0000
Address: 0x02F18EE8
VariantCopy
Ordinal: 0x0000
Address: 0x02F18EF8
VariantCopyInd
Ordinal: 0x0000
Address: 0x02F18F06
VariantInit
Ordinal: 0x0000
Address: 0x02F18F18
SafeArrayAccessData
Ordinal: 0x0000
Address: 0x02F18F26
SafeArrayAllocData
Ordinal: 0x0000
Address: 0x02F18F3C
SafeArrayAllocDescriptor
Ordinal: 0x0000
Address: 0x02F18F52
SafeArrayCopy
Ordinal: 0x0000
Address: 0x02F18F6E
SafeArrayCopyData
Ordinal: 0x0000
Address: 0x02F18F7E
SafeArrayCreate
Ordinal: 0x0000
Address: 0x02F18F92
SafeArrayDestroy
Ordinal: 0x0000
Address: 0x02F18FA4
SafeArrayDestroyData
Ordinal: 0x0000
Address: 0x02F18FB8
SafeArrayDestroyDescriptor
Ordinal: 0x0000
Address: 0x02F18FD0
SafeArrayGetDim
Ordinal: 0x0000
Address: 0x02F18FEE
SafeArrayGetElemsize
Ordinal: 0x0000
Address: 0x02F19000
SafeArrayGetElement
Ordinal: 0x0000
Address: 0x02F19018
SafeArrayGetLBound
Ordinal: 0x0000
Address: 0x02F1902E
SafeArrayGetUBound
Ordinal: 0x0000
Address: 0x02F19044
SafeArrayLock
Ordinal: 0x0000
Address: 0x02F1905A
SafeArrayPtrOfIndex
Ordinal: 0x0000
Address: 0x02F1906A
SafeArrayPutElement
Ordinal: 0x0000
Address: 0x02F19080
SafeArrayRedim
Ordinal: 0x0000
Address: 0x02F19096
SafeArrayUnaccessData
Ordinal: 0x0000
Address: 0x02F190A8
SafeArrayUnlock
Ordinal: 0x0000
Address: 0x02F190C0
user32.dll
CharUpperBuffW
Ordinal: 0x0000
Address: 0x02F190D2
CharLowerBuffW
Ordinal: 0x0000
Address: 0x02F190E4
MessageBoxA
Ordinal: 0x0000
Address: 0x02F190F6
PeekMessageA
Ordinal: 0x0000
Address: 0x02F19104
SendMessageA
Ordinal: 0x0000
Address: 0x02F19114
PostMessageA
Ordinal: 0x0000
Address: 0x02F19124
DefWindowProcA
Ordinal: 0x0000
Address: 0x02F19134
RegisterClassA
Ordinal: 0x0000
Address: 0x02F19146
UnregisterClassA
Ordinal: 0x0000
Address: 0x02F19158
GetClassInfoA
Ordinal: 0x0000
Address: 0x02F1916C
CreateWindowExA
Ordinal: 0x0000
Address: 0x02F1917C
CreateDialogParamA
Ordinal: 0x0000
Address: 0x02F1918E
CreateDialogIndirectParamA
Ordinal: 0x0000
Address: 0x02F191A4
DialogBoxParamA
Ordinal: 0x0000
Address: 0x02F191C2
DialogBoxIndirectParamA
Ordinal: 0x0000
Address: 0x02F191D4
CharUpperA
Ordinal: 0x0000
Address: 0x02F191EE
CharUpperBuffA
Ordinal: 0x0000
Address: 0x02F191FC
CharLowerA
Ordinal: 0x0000
Address: 0x02F1920E
CharLowerBuffA
Ordinal: 0x0000
Address: 0x02F1921C
SetWindowLongA
Ordinal: 0x0000
Address: 0x02F1922E
CreateWindowExW
Ordinal: 0x0000
Address: 0x02F19240
CreateDialogParamW
Ordinal: 0x0000
Address: 0x02F19252
CreateDialogIndirectParamW
Ordinal: 0x0000
Address: 0x02F19268
DialogBoxParamW
Ordinal: 0x0000
Address: 0x02F19286
DialogBoxIndirectParamW
Ordinal: 0x0000
Address: 0x02F19298
DestroyWindow
Ordinal: 0x0000
Address: 0x02F192B2
GetDlgCtrlID
Ordinal: 0x0000
Address: 0x02F192C2
MsgWaitForMultipleObjects
Ordinal: 0x0000
Address: 0x02F192D2
GetSystemMetrics
Ordinal: 0x0000
Address: 0x02F192EE
MessageBeep
Ordinal: 0x0000
Address: 0x02F19302
GetTopWindow
Ordinal: 0x0000
Address: 0x02F19310
GetWindow
Ordinal: 0x0000
Address: 0x02F19320
msvcrt.dll
malloc
Ordinal: 0x0000
Address: 0x02F1932C
free
Ordinal: 0x0000
Address: 0x02F19336
realloc
Ordinal: 0x0000
Address: 0x02F1933E
calloc
Ordinal: 0x0000
Address: 0x02F19348
gds32.dll
isc_decode_date
Ordinal: 0x0000
Address: 0x02F19352
isc_encode_date
Ordinal: 0x0000
Address: 0x02F19364
comctl32.dll
ImageList_ReplaceIcon
Ordinal: 0x0000
Address: 0x02F19376
version.dll
GetFileVersionInfoSizeA
Ordinal: 0x0000
Address: 0x02F1938E
GetFileVersionInfoA
Ordinal: 0x0000
Address: 0x02F193A8
VerQueryValueA
Ordinal: 0x0000
Address: 0x02F193BE
mpr.dll
WNetGetUniversalNameA
Ordinal: 0x0000
Address: 0x02F193D0
ole32.dll
CoCreateGuid
Ordinal: 0x0000
Address: 0x02F193E8

Earlier message 12 lines
-----Original Message----- From: On Behalf Of Mark - WBIsoft.COM Sent: mercredi 18 juillet 2007 16:17 To: FPC developers' list Subject: Re: [fpc-devel] DLL WIN64: Entry point not found Ok, try the MiTeC EXE explorer from http://www.mitec.cz I use it for my 64bit windows dll's

Reply by email

Felipe Monteiro de Carvalho
to Luc Vigato, Sita Software
Sita Software wrote
The export table seems to be OK, but from where comes the error "Entry point not found"? I don't have any idea. I'm open for all suggestions.

Try to reproduce with a small DLL (the smaller the better). And then post the source code here.

Felipe Monteiro de Carvalho

Reply by email

Luc Vigato, Sita Software
to Felipe Monteiro de Carvalho

Here an little test DLL (SitaUdfLib.pas). It also don't work with firebird 2.1 64bit version.

Earlier message 18 lines
-----Original Message----- From: On Behalf Of Felipe Monteiro de Carvalho Sent: mercredi 18 juillet 2007 16:48 To: FPC developers' list Subject: Re: [fpc-devel] DLL WIN64: Entry point not found On 7/18/07, Luc Vigato, Sita Software wrote: > The export table seems to be OK, but from where comes the error "Entry point > not found"? I don't have any idea. I'm open for all suggestions. Try to reproduce with a small DLL (the smaller the better). And then post the source code here. -- Felipe Monteiro de Carvalho

Reply by email

Dimitrios Chr. Ioannidis
to Vincent Snijders: IIRC, that is the same on win64. Vincent

O/H Vincent Snijders έγραψε:

Show quoted text 6 lines
Mark - WBIsoft.COM schreef: > I think the calling convention be STDCALL ? > > IIRC, that is the same on win64.

Are you sure about this ?

AFAIK, they have opposite order of arguments in stack. In cdecl caller will clean up stack after the call (raise ESP) while in stdcall this is job of called function. I see no reason to change this because of 32\64\128 bit architecture of CPU.

Anyway, the calling convention for a Firebird UDF is still cdecl either for x86_64 or x86_32.

PS: Don't forget to use ib_util_malloc() from ib_util.dll to allocate memory for the UDF result string declared as FREE_IT.

regards,

Dimitrios Chr. Ioannidis Firebird Project http://www.firebirdsql.org

Reply by email

Luc Vigato, Sita Software
to Vincent Snijders: How can I test this, without installing firebird? Do you have another host application?…

A host application compiled with fpc don't have this problem.

Earlier message 17 lines
-----Original Message----- From: On Behalf Of Vincent Snijders Sent: mercredi 18 juillet 2007 18:41 To: FPC developers' list Subject: Re: [fpc-devel] DLL WIN64: Entry point not found Luc Vigato, Sita Software schreef: > Here an little test DLL (SitaUdfLib.pas). It also don't work with firebird > 2.1 64bit version. How can I test this, without installing firebird? Do you have another host application? Vincent

Reply by email

Luc Vigato, Sita Software
to Dimitrios Chr. Ioannidis: O/H Vincent Snijders έγραψε: Are you sure about this ? AFAIK, they have opposite…

That's my sql with the error code from firebird.

SELECT simple('tes t !') FROM rdb$database

ISC ERROR CODE:335544343

ISC ERROR MESSAGE:
invalid request BLR at offset 79
function SIMPLE is not defined
module name or entrypoint could not be found

UDF declation is
DECLARE EXTERNAL FUNCTION SIMPLE
CSTRING (254)
RETURNS CSTRING (254)
ENTRY_POINT 'Simple' MODULE_NAME 'SitaUdfLib.dll'

Earlier message 36 lines
-----Original Message----- From: On Behalf Of Dimitrios Chr. Ioannidis Sent: mercredi 18 juillet 2007 19:06 To: FPC developers' list Subject: Re: [fpc-devel] DLL WIN64: Entry point not found O/H Vincent Snijders ������: > Mark - WBIsoft.COM schreef: >> I think the calling convention be STDCALL ? >> >> > > IIRC, that is the same on win64. Are you sure about this ? AFAIK, they have opposite order of arguments in stack. In cdecl caller will clean up stack after the call (raise ESP) while in stdcall this is job of called function. I see no reason to change this because of 32\64\128 bit architecture of CPU. Anyway, the calling convention for a Firebird UDF is still cdecl either for x86_64 or x86_32. PS: Don't forget to use ib_util_malloc() from ib_util.dll to allocate memory for the UDF result string declared as FREE_IT. regards, -- Dimitrios Chr. Ioannidis Firebird Project http://www.firebirdsql.org

Reply by email

Yury Sidorov
to Luc Vigato, Sita Software: I have compiled a DLL under Win64. It's a UDF-library for Firbird 2.1. Under Linux 64bit…

From: "Luc Vigato, Sita Software"

Show quoted text 33 lines
Hello, I have compiled a DLL under Win64. It's a UDF-library for Firbird 2.1. Under Linux 64bit all things are working, only in WIN64 not. The problem is that Firebird says that he cannot find the Entry Point of each of my functions. It's not a Firebird problem, i have made a test application who calls the function from the DLL and i have the same error "entry point not found". Calling convention is: cdecl Can someone help me please ? These is my command line to compile the library. fpc -S2 -Sh -dFREE_IT -Fu../Units SitaUdfLib.dpr Output of fpc ------------- Free Pascal Compiler version 2.1.5 [2007/05/31] for x86_64 Copyright (c) 1993-2007 by Florian Klaempfl Target OS: Win64 for x64 Compiling SitaUdfLib.dpr Compiling UnitFonctionUdfString.pas Linking SitaUdfLib.dll 977 lines compiled, 0.5 sec, 635888 bytes code, 312064 bytes data 1 note(s) issued

You need to upgrade to the latest svn version (or download snapshot) of FPC 2.1.5.
DLL bugs were fixed after 2007/05/31.

Yury Sidorov.

Reply by email

Mark - WBIsoft.COM
to Luc Vigato, Sita Software: A host application compiled with fpc don't have this problem. -----Original Message-----…

I had the same behaviour with a WIN64 DLL being loaded by WINLOGON.EXE, it fails to work - GetProcAddress calls fail, however, the same DLL loaded by an FPC app worked fine !!! I'm trying to build a simple demo DLL but with Gina replacement it's not that simple !!!

I think there is some issue with the DLL image generated by FPC, just not sure what it is yet !?

HTH

Mark

Earlier message 9 lines
----- Original Message ----- From: "Luc Vigato, Sita Software" To: "'FPC developers' list'" Sent: Thursday, July 19, 2007 7:14 AM Subject: RE: [fpc-devel] DLL WIN64: Entry point not found >A host application compiled with fpc don't have this problem. >

Reply by email

Luc Vigato, Sita Software
to Yury Sidorov: From: "Luc Vigato, Sita Software" You need to upgrade to the latest svn version (or…

I have downloaded the latest snapshot. The error is thill there.

With the test dll which I have send yesterday it's work fine now, but the finall DLL wich contains over 20 exported function I have an error.

Earlier message 47 lines
-----Original Message----- From: On Behalf Of Yury Sidorov Sent: jeudi 19 juillet 2007 09:39 To: FPC-Pascal users discussions; FPC developers' list Subject: Re: [fpc-devel] DLL WIN64: Entry point not found From: "Luc Vigato, Sita Software" > Hello, > > I have compiled a DLL under Win64. It's a UDF-library for Firbird > 2.1. > Under Linux 64bit all things are working, only in WIN64 not. > > The problem is that Firebird says that he cannot find the Entry > Point of > each of my functions. > It's not a Firebird problem, i have made a test application who > calls the > function from the DLL and i have the same error "entry point not > found". > > Calling convention is: cdecl > > Can someone help me please ? > > These is my command line to compile the library. > > fpc -S2 -Sh -dFREE_IT -Fu../Units SitaUdfLib.dpr > > > Output of fpc > ------------- > Free Pascal Compiler version 2.1.5 [2007/05/31] for x86_64 > Copyright (c) 1993-2007 by Florian Klaempfl > Target OS: Win64 for x64 > Compiling SitaUdfLib.dpr > Compiling UnitFonctionUdfString.pas > Linking SitaUdfLib.dll > 977 lines compiled, 0.5 sec, 635888 bytes code, 312064 bytes data > 1 note(s) issued You need to upgrade to the latest svn version (or download snapshot) of FPC 2.1.5. DLL bugs were fixed after 2007/05/31. Yury Sidorov.

Reply by email

Yury Sidorov
to Mark - WBIsoft.COM: I had the same behaviour with a WIN64 DLL being loaded by WINLOGON.EXE, it fails to work…

From: "Mark - WBIsoft.COM"

Show quoted text 8 lines
I had the same behaviour with a WIN64 DLL being loaded by WINLOGON.EXE, it fails to work - GetProcAddress calls fail, however, the same DLL loaded by an FPC app worked fine !!! I'm trying to build a simple demo DLL but with Gina replacement it's not that simple !!! I think there is some issue with the DLL image generated by FPC, just not sure what it is yet !?

You need to upgrade to the latest svn version (or download snapshot) of FPC 2.1.5.
DLL bugs were fixed after 2007/05/31.

Yury Sidorov.

Reply by email

Mark - WBIsoft.COM
to Yury Sidorov

I am running that version ! I will try to construct a simple DLL to be tested.

Mark

Earlier message 31 lines
----- Original Message ----- From: "Yury Sidorov" To: "FPC developers' list" Sent: Thursday, July 19, 2007 1:51 PM Subject: Re: [fpc-devel] DLL WIN64: Entry point not found > From: "Mark - WBIsoft.COM" >>I had the same behaviour with a WIN64 DLL being loaded by WINLOGON.EXE, it >>fails to work - GetProcAddress calls fail, however, the same DLL loaded >>by an FPC app worked fine !!! I'm trying to build a simple demo DLL but >>with Gina replacement it's not that simple !!! >> >> I think there is some issue with the DLL image generated by FPC, just not >> sure what it is yet !? > > You need to upgrade to the latest svn version (or download snapshot) > of FPC 2.1.5. > DLL bugs were fixed after 2007/05/31. > > Yury Sidorov. _______________________________________________ > fpc-devel maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-devel > > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. Version: 7.5.476 / Virus Database: > 269.10.9/907 - Release Date: 18/07/2007 15:30 > >

Reply by email

Yury Sidorov
to Luc Vigato, Sita Software: I have downloaded the latest snapshot. The error is thill there. With the test dll which…

From: "Luc Vigato, Sita Software"

Show quoted text 5 lines
I have downloaded the latest snapshot. The error is thill there. With the test dll which I have send yesterday it's work fine now, but the finall DLL wich contains over 20 exported function I have an error.

Try to create sample dll which reproduces the problem and submit bug report.

Yury.

Reply by email

Mark - WBIsoft.COM
to Yury Sidorov

I am, the only problem is the sample needs to be a complete gina - as it's the loading by WINLOGON.EXE that causes it to break !!

Earlier message 27 lines
----- Original Message ----- From: "Yury Sidorov" To: "FPC developers' list" Sent: Thursday, July 19, 2007 2:46 PM Subject: Re: [fpc-devel] DLL WIN64: Entry point not found > From: "Luc Vigato, Sita Software" >>I have downloaded the latest snapshot. The error is thill there. >> >> With the test dll which I have send yesterday it's work fine now, but the >> finall DLL wich contains over 20 exported function I have an error. > > Try to create sample dll which reproduces the problem and submit bug > report. > > Yury. _______________________________________________ > fpc-devel maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-devel > > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. Version: 7.5.476 / Virus Database: > 269.10.9/907 - Release Date: 18/07/2007 15:30 > >

Reply by email

Yury Sidorov
to Mark - WBIsoft.COM

The problem can be caused by relocation.
Try to force a dll to relocate in all cases by using -WB0 command line switch.
Then create sample host application using fpc and try to reproduce the problem.

Yury.

Earlier message 43 lines
----- Original Message ----- From: "Mark - WBIsoft.COM" To: "FPC developers' list" Sent: Thursday, July 19, 2007 4:58 PM Subject: Re: [fpc-devel] DLL WIN64: Entry point not found >I am, the only problem is the sample needs to be a complete gina - as >it's the loading by WINLOGON.EXE that causes it to break !! > > ----- Original Message ----- > From: "Yury Sidorov" > To: "FPC developers' list" > Sent: Thursday, July 19, 2007 2:46 PM > Subject: Re: [fpc-devel] DLL WIN64: Entry point not found > > >> From: "Luc Vigato, Sita Software" >>>I have downloaded the latest snapshot. The error is thill there. >>> >>> With the test dll which I have send yesterday it's work fine now, >>> but the >>> finall DLL wich contains over 20 exported function I have an >>> error. >> >> Try to create sample dll which reproduces the problem and submit >> bug report. >> >> Yury. _______________________________________________ >> fpc-devel maillist - >> http://lists.freepascal.org/mailman/listinfo/fpc-devel >> >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. Version: 7.5.476 / Virus Database: >> 269.10.9/907 - Release Date: 18/07/2007 15:30 >> >> > > _______________________________________________ > fpc-devel maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Mark - WBIsoft.COM
to Yury Sidorov

Yury,

just out of curiosity while I'm working on this DLL - with Delphi I can change the default image load adress from the DLL from $4000000 to anything I want, is this possible with FPC ?

Mark

Earlier message 68 lines
----- Original Message ----- From: "Yury Sidorov" To: "FPC developers' list" Sent: Thursday, July 19, 2007 3:10 PM Subject: Re: [fpc-devel] DLL WIN64: Entry point not found > The problem can be caused by relocation. > Try to force a dll to relocate in all cases by using -WB0 command line > switch. > Then create sample host application using fpc and try to reproduce the > problem. > > Yury. > > ----- Original Message ----- > From: "Mark - WBIsoft.COM" > To: "FPC developers' list" > Sent: Thursday, July 19, 2007 4:58 PM > Subject: Re: [fpc-devel] DLL WIN64: Entry point not found > > >>I am, the only problem is the sample needs to be a complete gina - as it's >>the loading by WINLOGON.EXE that causes it to break !! >> >> ----- Original Message ----- >> From: "Yury Sidorov" >> To: "FPC developers' list" >> Sent: Thursday, July 19, 2007 2:46 PM >> Subject: Re: [fpc-devel] DLL WIN64: Entry point not found >> >> >>> From: "Luc Vigato, Sita Software" >>>>I have downloaded the latest snapshot. The error is thill there. >>>> >>>> With the test dll which I have send yesterday it's work fine now, but >>>> the >>>> finall DLL wich contains over 20 exported function I have an error. >>> >>> Try to create sample dll which reproduces the problem and submit bug >>> report. >>> >>> Yury. _______________________________________________ >>> fpc-devel maillist - >>> http://lists.freepascal.org/mailman/listinfo/fpc-devel >>> >>> >>> -- >>> No virus found in this incoming message. >>> Checked by AVG Free Edition. Version: 7.5.476 / Virus Database: >>> 269.10.9/907 - Release Date: 18/07/2007 15:30 >>> >>> >> >> _______________________________________________ >> fpc-devel maillist - >> http://lists.freepascal.org/mailman/listinfo/fpc-devel > _______________________________________________ > fpc-devel maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-devel > > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. Version: 7.5.476 / Virus Database: > 269.10.9/907 - Release Date: 18/07/2007 15:30 > >

Reply by email

Yury Sidorov
to Mark - WBIsoft.COM

From: "Mark - WBIsoft.COM"

Show quoted text 5 lines
Yury, just out of curiosity while I'm working on this DLL - with Delphi I can change the default image load adress from the DLL from $4000000 to anything I want, is this possible with FPC ?

It is -WB option. I recommend to use -WB0 to change base address to 0 to force relocation in all cases.

Yury.

Reply by email

Luc Vigato, Sita Software
to Yury Sidorov: From: "Luc Vigato, Sita Software" Try to create sample dll which reproduces the problem…

I can't create an host application with fpc to reproduce the error.

An Host application compiled fpc can call dll functions without problems. Firebird cannot call the same functions.

The switch -WB0 doesn't change anything for me.

Best regards,
Luc

Earlier message 18 lines
-----Original Message----- From: On Behalf Of Yury Sidorov Sent: jeudi 19 juillet 2007 15:46 To: FPC developers' list Subject: Re: [fpc-devel] DLL WIN64: Entry point not found From: "Luc Vigato, Sita Software" >I have downloaded the latest snapshot. The error is thill there. > > With the test dll which I have send yesterday it's work fine now, > but the > finall DLL wich contains over 20 exported function I have an error. Try to create sample dll which reproduces the problem and submit bug report. Yury.

Reply by email

Dimitrios Chr. Ioannidis
to Luc Vigato, Sita Software

Hi,

Show quoted text 6 lines
I can't create an host application with fpc to reproduce the error. An Host application compiled fpc can call dll functions without problems. Firebird cannot call the same functions. The switch -WB0 doesn't change anything for me.

Unfortunately i can't help you, i don't have a x86_64 box available.

Could you plz post it to firebird devel list (
) ?

If you can't, i can post it for you.

regards,

Dimitrios Chr. Ioannidis Firebird Project http://www.firebirdsql.org

Reply by email