Options

Interoperability C # and NAV 2016

ivanrlgivanrlg Member Posts: 1

I'm around trying to create an interoperable dll written in C # for use in Microsoft NAV 2016, for the development of a fiscal printer driver. In my C # project I called to other functions dll (delivered by the company Bematech, in 32-bit and unmanaged).

Calls to the functions of the dll unmanaged (and tested from an .EXE) I make as follows:

[DllImport ( "BemaFi32.dll")]
public static extern int Bematech_FI_ProgramaAlicuota (Aliquot string, int ICMS_ISS);
When I try to run it from the NAV2016 I get the following error: .A call to "MyAssembly" failed with this message: You are trying to load a program with an incorrect format. Expection from HRESULT: 0x8007000B

I guess the error because the dll is not managed or 32-bit version (if that's the problem becomes more difficult because apparently there is no 64-bit version). Not how to solve the problem. I hope you can help me. Thank you.

Answers

  • Options
    AquirAquir Member Posts: 23
    Hi,

    I can answer the same what I've did on stackoverflow (link)

    NAV cannot work with unmanaged code. The only way is to write a wrapper dll which can be called from NAV. Microsoft is doing the same with the Office SDK for example...

    Cheers!
  • Options
    krikikriki Member, Moderator Posts: 9,090
    [Topic moved from 'NAV/Navision Classic Client' forum to 'NAV Three Tier' forum]

    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.