Public Engine As FCEngine.IFCEngine
Private Declare Function InitializeEngine Lib "FCEngine.dll" ( _
ByVal devSN As String, _
ByVal Reserved1 As String, _
ByVal Reserved2 As String, _
EngineObj As FCEngine.IFCEngine) As Long
'devSN : [in] A string containing developer serial number that matches the necessary license.
'Reserved1 : [in] Reserved for future use. The empty string "" or Null pointer must be passed.
'Reserved2 : [in] Reserved for future use. The empty string "" or Null pointer must be passed.
'EngineObj : [out] A pointer to IFCEngine* pointer variable that receives the interface pointer to the resulting FCEngine object.
Public Sub LoadFCEngine()
If Not Engine Is Nothing Then Exit Sub
' Visual Basic may load libraries from the current path only
ChDir "PathTo FCEngine.dll"
' this conversion is needed to pass a Unicode string as a DLL function parameter correctly
Dim devSN As String, devSN_w As String
devSN_w = StrConv(devSN, vbUnicode)
Dim ret As Long
ret = InitializeEngine(devSN_w, "", "", Engine)
If ret <> 0 Then
Err.Raise ret
End If
End Sub
' Open FlexiCapture project
Dim project As FCEngine.IFCProject
Set project = Engine.OpenProject("D:\TestProject\TestProject.fcproj")
nAllocateur est un entier système
lpc_Serialnumber est une chaine = ppc_SerialNumber
fRepEnCours("C:\Program Files\ABBYY FlexiCapture Engine 8.0\Bin")
lpe_Retour = API("FCEngine.dll","InitializeEngine",AnsiVersUnicode(lpc_Serialnumber),"","",&nAllocateur)
SI PAS lpe_Retour = 0 ALORS
Erreur("Erreur")
Retour
FIN
lpo_Objet est un OLE dynamique
//-------------------------------------------------------------------------------
//Comment allouer l'objet avec l'adresse mémoire récupérée ???????
//-------------------------------------------------------------------------------
lpe_Retour = lpo_Objet>>OpenProject("C:\Source\ScriptorV20\ProjetFlexiCapture\SIV\SIV\SIV.fcproj")
SI PAS lpe_Retour = 0 ALORS
Erreur("Erreur")
RETOUR
FIN
Cette contribution était de : http://old.wdforge.org/newbb/viewtopic.php?forum=21&topic_id=6457&post_id=25498