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

Relevant Pages

  • Re: Dynamic DLL Loading or Static ?
    ... Loading it on demand the cuts down on load time for the app and on memory foot ... the DLL contains functionality that depends on specific platform features. ... There are two areas where static and dynamic loading differ. ... If you use static loading the DLL will be loaded and its Initialization ...
  • Re: Dynamic DLL Loading or Static ?
    ... A DLL is dynamic linked always: ... terms are load-time dynamic linking and run-time dynamic linking. ... > initialize this DLL and I'm loading it dynamically. ... This is the default value for WinXP SP1 and WinSrv03. ...
  • Re: Manifest Requires Win2K Compatibility?
    ... You need to call InitCommonControlsEx() in a controlled manner in order to load the new version Common Controls before the VB6 runtime gets the chance to force loading of the older version DLL. ... Once VBRUN has made this call, the system won't try to handle DLL loading failures - expecting the "I'm so smart" VBRUN to handle them. ...
  • Re: Network Drive Issue
    ... > CHKDSK isn't sufficient to determin the heath of the drive. ... This is related to some network device driver ... renamed to disable it in VS 2005 due to slow and long delay loading ... the last DLL loaded is FEACP.DLL as well. ...
  • Re: Unloading a DLL to update it.
    ... Since I am loading the dll ... >> Private Shared Sub StartApplication() ...