When compiling your foreign functions, be sure to specify the large memory model. Refer to your Microsoft Windows compiler documentation for additional information, such as restrictions on building a Microsoft Windows DLL, and the use of #define statements. (Your foreign function code may need to include the UE.H file to access typedefs and #define statements.)