| Customize Help

How to create a portable application

You can create a more portable, device-independent, and operating system-independent application if you use the following coding techniques in your application:

  • Limit the amount of MIL system-specific code (for example, MIL system-specific control types and inquire types) in your application.

  • Use the defaults when allocating your system and other MIL objects (for example, your digitizer, buffer, and display). By doing this, you create a more portable application, since these settings are not hard-coded in your application, and are determined when the user installs the MIL software. For more information on using the defaults, see the Using the defaults section earlier in this chapter.

  • Use MIL's custom data types and portability functions, as outlined in the MIL custom data types, void pointers, extensions, and portability functions section earlier in this chapter, instead of their operating system-specific equivalents.

  • Avoid operating system-specific features (for example, using MbufAlloc2d() with M_DIRECTX, which is specific to a Windows-based operating system).