Hi everyone,
We've got an quite old program in VB6 who were using the V10 version of FineReader.
I have to migrate it to use Finereader 12. But I've got a problem instanciation the IEngine.
The old version used GetEngineObject
Private Declare Function GetEngineObject Lib "FREngine.dll" ( _
ByVal devSN As String, _
ByVal Reserved1 As String, _
ByVal Reserved2 As String, _
EngineObj As FREngine.Engine) As Long
Public Engine As FREngine.Engine
and call it simply
Dim devSN_w As String
Dim ret As Long
devSN_w = StrConv(Licence_Abbyy, vbUnicode)
ret = GetEngineObject(devSN_w, "", "", Engine)
and we raised an error if ret was not null.
Now I migrate to InitializeEngine as recommended
Private Declare Function InitializeEngine Lib "FREngine.dll" ( _
CustomerProjectID As String, _
LicensePath As String, _
LicensePassword As String, _
FREngineDataFolder As String, _
FREngineTempFolder As String, _
IsSharedCPUCoresMode As Boolean, _
ByRef Engine As FREngine.IEngine) _
As Integer
Public Engine As FREngine.IEngine
And call it using
ret = InitializeEngine(devProjectID, "", "", "", "", False, Engine)
And I get an error 274, not referenced, and Engine is not created, whatever is the value of devProjectId.
There's probably something I'm doing wrong, but I don't know what.
I'm using VB6 and a Windows 7 machine
I've got a Developer Trial license with apparently no limitation.
If someone has an idea of why my code won't work (the old version work perfectly with FineReader 10)