Trending: Jawaan


Using the COM Class Wrapper in AX 2009


Sorry, your entry can't be deleted right now. Please try again later.

COM Class wrapper is a immensely useful and phenomenally easy to use tool..

Basically it wraps COM objects and make them available to you (a developer) just like a normal x++ class.

You dont necessarily have to use the com wrapper to be able to use com objects.. the old and handy class COM (http://msdn.microsoft.com/en-us/library/aa655160.aspx) is sufficient.. however (with all due respect to the COM class) intellisense does not work with the COM class hence as a developer you either need to know what the com methods are (and their signatures) or you continuously will be flicking though developer documentation on the com interface.

Well COM class wrapper basically put intellisense into COM...... you can say that the COM Wrapper is to COM what References is to .Net

I would like to point out that MS discourages the use of the COM interfaces in AX. Hence, if you have the option, then consider taking the .Net route.

You can find the COM Wrapper under Developer Tools > Wizards > COM Class Wrapper

clip_image002

clip_image004

It does exactly what is says on the tin..

In the next screen one would see a list of all registered com libraries..

clip_image005

Select the one that you are looking for and click next... (the office 12 object library is a bad example.. as I could have done the same thin using References, which is the recommended method).

clip_image007

Specify an element mask.. this makes it easier to find the objects in the AOT. It also resolves the possibility of name conflicts.

clip_image009

So in this example mrOff was the Element Mask.

- Mohammed Rasheed

http://www.dynamic-ax.co.uk/

FavoriteThe trackback URL for this entry is:http://dynamic-ax.spaces.live.com/blog/cns!13619E6948204DE3!386.trakWeblogs that reference this entry


View the original article here

0 Responses to “Using the COM Class Wrapper in AX 2009”

About Me