.NET DLL Registration

SoumyadipSoumyadip Member Posts: 209
Hi All,

I have created a .NET DLL via Class Library Project in C# using .NET FrameWork 2.0. I intend to send some info from NAVas parameter to one of it's function and as a return type want to receive a TRUE/FALSE bolean value from the function to NAV.

When I am trying to register that DLL from NAV (Tool->Custom Controls->Controls->Browse) , it is giving me an error "Could Not Register the OLE Control".

Please help.

Thanks in Advance
Soumya

Comments

  • andhildaandhilda Member Posts: 26
    If you want to see your component as an automasion then you have to reg. your .dll like this:

    regasm c:\<path>\Filnavn.dll /tlb:filnavn.dll.tlb /codebase

    /Andhilda
  • SoumyadipSoumyadip Member Posts: 209
    Thanks Andhilda...

    It is registered now and I can see it in Automation Server but i can't see any class under it.

    I think its a prob with the .NET code....

    can you suggest some tips..

    Thanks
    Soumya
  • SoumyadipSoumyadip Member Posts: 209
    Can anybody help?
  • GregorDGregorD Member Posts: 26
    Hi,
    as far as I know, you need a COM-Class for Automation Server Controls in NAV. .NET classes don't work!

    Maybe this helps you...
  • clemboclembo Member Posts: 122
    I'm using your fantastic control but when i use it in my form there is a problem.
    The subform shows an subarea and 123 numers in ...
    Why?
    What I do to remove it?
  • stomdahlstomdahl Member, Microsoft Employee Posts: 12
    You need to create an interface, in order to make com object visible for nav:
    [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
    public interface INavAutomation
    {
    string NavMethod();
    }

    [ClassInterface(ClassInterfaceType.None)]
    public class NavAutomationClass : INavAutomation
    {
    public string NavMethod()
    {
    return "Hello Dynamics Nav";
    }
    }
Sign In or Register to comment.