Readme file for the Microsoft compilers: Win32 SDK, Visual C++(32s version), Visual C++ for NT Using the command line: How to build a sample user DLL using command line: (samples are under SOURCES subdirectory of your compiler directory). Each sample has a compile.bat and a linkme.bat file associated with it. To build a sample project just call these files in sequence. How to generate a new user DLL project for Microsoft 32bit compilers: For information on how to generate the source files see Appendix F in the manual. Using command line calls to the compiler and linker: Typical compile line: cl -c -IC:\WINMCAD\USEREFI\MICROSFT\INCLUDE -DWIN32 filename.c or, using the relative notation in the case of the samples, cl -c -I..\..\INCLUDE -DWIN32 filename.c Typical link line: link -out:C:\WINMCAD\USEREFI\DLLname.dll -dll -entry:"DllEntryPoint" filename.obj C:\WINMCAD\USEREFI\MICROSFT\LIB\MCADUSER.LIB or, again, using the relative notation in the case of the samples, link -out:..\..\..\DLLname.dll -dll -entry:"DllEntryPoint" filename.obj ..\..\LIB\MCADUSER.LIB Using Visual C++: How to build a sample user DLL in Visual C++: Each sample has a .mak project file associated with it. To build a sample just start Visual C++ for NT open the project and Rebuild it. How to generate a new user DLL project in Visual C++: Create a new project and choose a name and path for it. Choose Dynamic Link Library (.DLL) for the Project Type. Add your source files to the project.(If you have not created the source files yet you can add them later) Add the library file MCADUSER.LIB in the MICROSFT\LIB directory to the project. Under Options Project Compiler Options dialog box choose the Preprocessor category and add the directory where the include file MCADINCL.H for MICROSFT is located, e.g. C:\WINMCAD\USEREFI\MICROSFT\INCLUDE (or ..\..\INCLUDE in relative notation for the samples) to the Include path. Under Options Project Linker Options dialog box choose the Image Attributes category and enter DllEntryPoint for the Entry-Point Symbol Now you are ready to build the DLL. You can do this by choosing "Rebuild all" under menu option Project. After building you have to move the DLL to the USEREFI directory under MATHCAD's default directory, e.g. C:\WINMCAD\USEREFI. Comments: In the source file: The DLL entry point can be called anything you want, e.g. DllEntryPoint. But you need to specify the name to the linker. You do this by choosing a linker option as described above. Need to initialize the C runtime libraries using calls to _CRT_INIT when the DLL is first entered and when it is detached. This is demonstrated in the sample. Alignment: The default structure alignment for Win32s applications is 8 byte alignment For more information see the sample source files and the readme.txt file in USEREFI subdirectory.