Search code examples
c#comlinqpad

SHDocVw and IEFrame in LINQPad


How do I reference SHDocVw and IEFrame in LINQPad?

I tried both system32 and SysWOW64 but they both fail to load: "Metadata file 'c:\Windows\SysWOW64\ieframe.dll' could not be opened -- 'An attempt was made to load a program with an incorrect format. '"

In Visual Studio this is done using the COM tab and choosing "Microsoft Internet Controls" but in LINQPad the reference dialog is completely different...

Is tlbimp RCW generation an option? Surely there are existing wrappers I can leverage on (as any .NET apps developed in VS can)

Thanks.


Solution

  • It turns out Visual Studio actually creates the Interop when I include the reference... Essentially using tlbimp. for simplicity, I just referenced to the one Visual Studio created... It is all good now.