0

I'd like to use IE to open a web-page and retrieve its content from clojure-clr. I tried to translate the following C#-snippet to clojure, but could not load the DLL necessary to use SHDocVw (I don't have my clojure-code at hand right now):

using SHDocVw;
public void OpenBrowser(string url)
{ 
object o = null;
SHDocVw.InternetExplorer ie = new
SHDocVw.InternetExplorerClass();
IWebBrowserApp wb = (IWebBrowserApp) ie;
wb.Visible = true;
//Do anything else with the window here that you wish
wb.Navigate(url, ref o, ref o, ref o, ref o);
}

How would I go about accessing IE from clojure?

Alex Miller
  • 69,183
  • 25
  • 122
  • 167
steglig
  • 1,098
  • 1
  • 9
  • 15

1 Answers1

1

You need to load the dll explicitly in your clojure script, by calling Assembly.Load. This is true if you want to use anything that is not in System or in clojure.core (as those are loaded automatically).

Kurt Schelfthout
  • 8,880
  • 1
  • 30
  • 48
  • Thanks. I did. I did try to load SHDocVw.dll in the way you described. It turned out I needed an Interop-Assembly. In C# Visual Studio would do that for me - in Clojure I forgot about that... – steglig May 20 '11 at 17:05