Linking DLLs




How should I be linking my (F#) programs to the .NET MDX DLLs?

I'm currently using:

#I @"C:\WINDOWS\Microsoft.NET\DirectX for Managed Code\1.0.2902.0"
#r "Microsoft.DirectX.dll"
#r "Microsoft.DirectX.Direct3D.dll"
#r "Microsoft.DirectX.Direct3DX.dll"

which works fine on my computer but is too brittle to work on other
computers. For example, I recently sent a compiled demo to a friend at MS
who couldn't run it because they didn't have a DLL in the 1.0.2902.0
directory (although they did have DirectX). Presumably there is a more
reliable way of pulling in the correct DLL?

Also, if I want to distribute a DLL that extends the functionality of the F#
interactive session with graphical capabilities, I assume the user is
responsible for loading the MDX DLL before loading my DLL? So I don't have
to worry about referencing the correct MDX DLL when I compile my own DLL,
i.e. it is their problem?

--
Dr Jon D Harrop, Flying Frog Consultancy
The F#.NET Journal
http://www.ffconsultancy.com/products/fsharp_journal?usenet
.