Wednesday, April 14, 2010

How to use COM Wrapper dll in AX

Here, I am telling you about how to register a COM wrapper dll and then extract & use it in AX.

(i) Install the COM Wrapper DLL Files, into the bin directory of the AOS.

(ii) Register it with the following Command,%WINDIR%\Microsoft.NET\Framework\v2.0.50727\regasm.exe Test.Wrapper.DLL /tlb:Test.Wrapper.tlb

(iii) Now, After Successful Registration, Follow the below path and click on COM Class Wrapper Wizard.i.e., Tools->Development tools->Wizards->COM Class Wrapper Wizard

(iv) On the first Page of the Wizard, Click Next Button

(v) Select the installed Wrapper and then click Next Button.

(vi) Then give some string as an element mask and then click finish.

Now, you can see that all the classes created in the wrapper dll will be present in the AOT.

Just directly use those class/classes in your code.

Things to remember while you call this class :
As the Wrapper DLL has been registered in the AOS, So the methods in the extracted classes have to be called from the methods of classes whose run on property is server.

1 comment:

Anonymous said...

hi giridharraj,
I am abbas. I am the new comer of this AX platform. could you tell me what is the use of COM wrapper dll.