> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Uso de ABBYY FineReader Engine en C (Objective-C)

> Use ABBYY FineReader Engine con C y Objective-C en Windows: incluya FREngine.h, defina __RPC__deref_out y cargue y descargue el motor.

<Note>
  Este tema es válido para FRE para Windows.
</Note>

En esta sección se describe cómo cargar y descargar ABBYY FineReader Engine en C (Objective-C).

1. Incluya este código al importar el archivo de encabezado FREngine.h:

```csharp theme={null}
/* C */
#define __RPC__deref_out
#define COBJMACROS
#include <FREngine.h>
/* Objective-C */
#define interface _COM_interface
#define __RPC__deref_out
#define COBJMACROS
#import <FREngine.h>
#undef interface
```

2. Utilice el siguiente código para cargar y descargar FREngine.dll:

```csharp theme={null}
typedef HRESULT (*initializeEngine_ptr) (BSTR, BSTR, BSTR, BSTR, BSTR, VARIANT_BOOL, IEngine **);
typedef HRESULT (*DeinitializeEngine_ptr) (void);
static IEngine* FREngine;
static HMODULE FREngineDll;
int main(int argc, char *argv[]) {
 initializeEngine InitializeEngine=NULL;
 DeinitializeEngine_ptr DeinitializeEngine=NULL;
 // proporcione aquí su Customer Project ID y, si corresponde, la información de la licencia en línea
 wchar_t *customerProjectId = L"";
 wchar_t *licensePath = L"";
 wchar_t *licensePassword = L"";
 FREngineDll = LoadLibraryEx("<path to FREngine.dll>", 0, LOAD_WITH_ALTERED_SEARCH_PATH);
 if(FREngineDll) {
  InitializeEngine = (InitializeEngine_ptr) GetProcAddress(FREngineDll,"InitializeEngine");
  if(InitializeEngine)
   InitializeEngine(customerProjectId, licensePath, licensePassword, "", "", FALSE, &FREngine);
 }
 ProcessImage();
 IEngine_Release( FREngine );
 DeinitializeEngine = (DeinitializeEngine_ptr) GetProcAddress(FREngineDll,"DeinitializeEngine");
 DeinitializeEngine();
}
```

3. Todas las demás llamadas a ABBYY FineReader Engine pueden utilizar las macros de C definidas en el archivo de encabezado FREngine.h.

```csharp theme={null}
void ProcessImage()
{
 IFRDocument* frDocument = NULL;
 IEngine_CreateFRDocument( FREngine, &frDocument );
 IFRDocument_AddImageFile( frDocument, L"<path to a source image>", NULL, NULL );
 IFRDocument_Process( frDocument, NULL, NULL, NULL );
 IFRDocument_Export( frDocument, L"<path to an output file>", FEF_PDF, NULL );
 IFRDocument_Release( frDocument );
}
```

<div id="see-also">
  ## Consulte también
</div>

[Aspectos de programación](/es/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects)
