Why Storage and Access Matter

Clients that need to pass an array to IDL need to understand the memory layouts of the arrays in order to know if they should convert arrays from one format to the other. Understanding which format is “row” and which is “column” major is not enough because the definitions of those terms can differ in context.

Understanding these distinctions are critical when programming in Visual Basic and C++ as each language natively stores arrays differently. However, using the Win32 Safearray APIs, either directly or indirectly through the ATL wrapper classes, allows C++ code to create safe arrays in the same order as Visual Basic. However, C++ has the flexibility to create safe arrays ordered differently, which is useful for testing.

In summary: