import methods from an unmanaged Bematech DLL c #

1

I need to use a dll provided by Bematech with features of a non-fiscal printer. The example that you provided brings the following code:

[DllImport("MP2032.dll")]
public static extern int ConfiguraModeloImpressora(int model);

The program generates the following exception:

  

Additional information: An attempt was made to load a   program in an incorrect format. (Exception from HRESULT: 0x8007000B)

Believing the problem could be in the dll I created a new project to generate an exportable dll. Returned the same error. I've read several post's and articles and I do not understand why my code does not work.

    
asked by anonymous 05.07.2016 / 16:51

0 answers