Game Development Reference
The following line shows how to install the MyComponent.dll assembly into the
Global Assembly Cache.
gacutil.exe /i MyComponent.dll
An important deployment issue to consider is the system requirements for COM
Interop. Because COM Interop merely provides a wrapper around a .NET com-
ponent, you now have a dependency on the minimum system requirements to
host the .NET framework. The .NET framework must be installed or the exposed
components will not be able to function.
Lastly, there is also a way to support registration-free activation through the use of
component and client manifest files that are linked or deployed with the appro-
priate executables after compiling. Although registration-free activation is not
covered in this chapter, it may be worthwhile for you to look into if you want to
avoid registering your exposed components in the Win32 registry.
This chapter started off by introducing COM Callable Wrappers and how they can
be used to wrap a .NET component so that COM clients can utilize its function-
ality. Afterwards, the appropriate attributes to expose a .NET component were dis-
cussed, and then used in the context of the example on the Companion Web site.
Component registration was then addressed, including a number of ways to per-
form the registration and type library generation. Finally, some deployment con-
siderations were discussed that may not be the most obvious when working with
COM Interop and COM Callable Wrappers offer easy migration from traditional
COM to the .NET platform by allowing individual components to be migrated
one at a time, rather than trying to migrate an entire application or system in one
go. Having such a powerful migration strategy can prove to be extremely advanta-
geous in terms of budget and time constraints, and also makes debugging much
easier by decreasing the volume of new code to test at a single time.