hi

I have tried the solution that danny suggested and even set the environment variables in windows control panal,but it's still not working.

it seems that set the environment path only means that you can access fsc.exe or fsi.exe at any location in the command-line prompt, but the fsi.exe searching path is always the ...\FSharp-1.9.6.2\bin .

now i had to copy the WinIo.dll to "...\FSharp-1.9.6.2\bin" and it works, but is there a way to add search path to fsi.exe ?

BTW: #I @"path" doesn't work also

By on 9/21/2008 8:15 PM ()

hi babaq,

Use Process Explorer to check whether the path to winio.dll is being set correctly in the running instance of fsi.
The solution above works for me.

1
2
#I requires a string literal so #I @"path" sets the include path to "path" - which doesn't exist. use it so:
#I @"c:\this\is\my\path\to\my\dll"

however this will not work with an unmanaged dll - that requires the environment variable "path" to be set as illustrated above.

best of luck,

Danny

By on 9/22/2008 4:45 AM ()

hi Danny,

i tried the Process Explorer,it's a wonderful tool ,and i found that setting environment path is all right, you can place the Winio.dll wherever you want that you add it to environment path ,and fsi.exe will find it .

but what my situation is that WinIo.dll is just a wrapper of WinIo.sys --- a WDM driver supporting direct access to parallel port and memory mapping, i found it's only functioning as at the same Directory as the fsi.exe.

now i have no clue to handle it, except copy only the WinIo.sys to c:\FSharp-1.9.6.2\bin ,which is a ugly solution:)

By on 9/23/2008 3:01 AM ()

Hi babaq,

this could possible be a path problem as fsi.exe is not running from the same location as your app.

try adding this before the class Stimulus:

1
2
3
4
5
6
7
8
9
10
11
12
13
#if INTERACTIVE 

module Env = 

 // This is the path to your native dll 
 let nativeDllPath = __SOURCE_DIRECTORY__ + @"\bin\Debug" 
 let path = System.Environment.GetEnvironmentVariable("path") 

 do System.Environment.SetEnvironmentVariable("path", nativeDllPath + ";" + path) 

open Env

#endif 

regards,

Danny

By on 9/21/2008 11:12 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper