I am trying to do something VERY simple. I want to use this:
[url]http://www.codeproject.com/csharp/dotnetbandobjects.asp?msg=727553#xx714692xx[/url
]
to point to a web page.
I cannot use process.start because it opens the webpage in the last
opened IE window, not the window which is currently active. So, I am
trying to use the Microsoft Internet Controls COM.
I found out that I cannot simply add the COM reference and compile
it's objects. It wanted a strong name.
Being very new the below was the best I could do.
Best I can tell I made Interop.SHDocVwLib.dll a strong named library
accessible to the .net framework. But when I try and use it's objects
on most all it get is "equals" or "ReferenceEquals." I don't have
Navigate Object.
I need help. Please. All I want to do is load a url in the IE
instance whose window I am in. Thank you.
C:\Temp\. net\code\Bands\dotnetBandObjects_src\Sam
pleBars\bin\Release>sn
-k Sam
eBars.snk
Microsoft (R) .NET Framework Strong Name Utility Version 1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
Key pair written to SampleBars.snk
C:\Temp\. net\code\Bands\dotnetBandObjects_src\Sam
pleBars\bin\Release>tlbimp
Samp
leBars.dll /keyfile:SampleBars.snk /out:Interop.SampleBarsLib.dll
/namespace:Sam
pleBarsLib
Microsoft (R) .NET Framework Type Library to Assembly Converter
1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
TlbImp error: The input file
'C:\Temp\. net\code\Bands\dotnetBandObjects_src\Sam
p
leBars\bin\Release\SampleBars.dll' is not a valid type library
C:\Temp\. net\code\Bands\dotnetBandObjects_src\Sam
pleBars\bin\Release>tlbimp
SHDo
cVw.dll /keyfile:SampleBars.snk /out:Interop.SHDocVwLib.dll
Microsoft (R) .NET Framework Type Library to Assembly Converter
1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
Type library imported to
C:\Temp\. net\code\Bands\dotnetBandObjects_src\Sam
pleBar
s\bin\Release\Interop.SHDocVwLib.dll
C:\Temp\. net\code\Bands\dotnetBandObjects_src\Sam
pleBars\bin\Release>I'm not understanding what you are trying to accomplish. Would you mind
re-explaining. I went to the link you posted and couldn't see any thing
relevant to what you were explaining.
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"jm" <john_20_28_2000@.yahoo.com> wrote in message
news:c67e4bdd.0405261139.50a2bb71@.posting.google.com...
>I am trying to do something VERY simple. I want to use this:
> [url]http://www.codeproject.com/csharp/dotnetbandobjects.asp?msg=727553#xx714692xx[/u
rl]
> to point to a web page.
> I cannot use process.start because it opens the webpage in the last
> opened IE window, not the window which is currently active. So, I am
> trying to use the Microsoft Internet Controls COM.
> I found out that I cannot simply add the COM reference and compile
> it's objects. It wanted a strong name.
> Being very new the below was the best I could do.
> Best I can tell I made Interop.SHDocVwLib.dll a strong named library
> accessible to the .net framework. But when I try and use it's objects
> on most all it get is "equals" or "ReferenceEquals." I don't have
> Navigate Object.
> I need help. Please. All I want to do is load a url in the IE
> instance whose window I am in. Thank you.
> C:\Temp\. net\code\Bands\dotnetBandObjects_src\Sam
pleBars\bin\Release>sn
> -k Sam
> eBars.snk
> Microsoft (R) .NET Framework Strong Name Utility Version 1.1.4322.573
> Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
> Key pair written to SampleBars.snk
> C:\Temp\. net\code\Bands\dotnetBandObjects_src\Sam
pleBars\bin\Release>tlbim
p
> Samp
> leBars.dll /keyfile:SampleBars.snk /out:Interop.SampleBarsLib.dll
> /namespace:Sam
> pleBarsLib
> Microsoft (R) .NET Framework Type Library to Assembly Converter
> 1.1.4322.573
> Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
> TlbImp error: The input file
> 'C:\Temp\. net\code\Bands\dotnetBandObjects_src\Sam
p
> leBars\bin\Release\SampleBars.dll' is not a valid type library
> C:\Temp\. net\code\Bands\dotnetBandObjects_src\Sam
pleBars\bin\Release>tlbim
p
> SHDo
> cVw.dll /keyfile:SampleBars.snk /out:Interop.SHDocVwLib.dll
> Microsoft (R) .NET Framework Type Library to Assembly Converter
> 1.1.4322.573
> Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
> Type library imported to
> C:\Temp\. net\code\Bands\dotnetBandObjects_src\Sam
pleBar
> s\bin\Release\Interop.SHDocVwLib.dll
> C:\Temp\. net\code\Bands\dotnetBandObjects_src\Sam
pleBars\bin\Release>
Essentially, when one uses a COM object, in a .net application, it
doesn't have a Strong Name. I don't know what it wants me to do.
MSDN is so complex that I can't put it together. It claims VS .NET
will do it for me, but I can't figure it out. I also do not see the
relationship between a .snk keyfile, my solution that I am bulding and
how to put them together to get that keyfile so that I have a strong
name for my COM objects I am using.
It really doesn't have to be about the bandobjects, that is simply
where I first encountered the error because the Microsoft Internet
Control doesn't have a strong name;
Thinking back, and I apologize, the MS Inet control COM object really
doesn't have anything to do with the article. I was simply adding the
COM object to the project below to make the bandobject be able to
navigate to web pages, etc. instead of simply displaying a message
box.
I guess I don't really know what a Strong Name is.
BTW, process.start will not work properly as it always uses the last
session of IE open and not the current session the user is in, thus my
need for the COM object (I am not asking for help here, just giving
background.)
Thanks for all your help.
"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message news:<Oe9U8e6QEHA
.3944@.tk2msftngp13.phx.gbl>...
> I'm not understanding what you are trying to accomplish. Would you mind
> re-explaining. I went to the link you posted and couldn't see any thing
> relevant to what you were explaining.
> --
> Regards,
> Alvin Bruney
> [ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
> Got tidbits? Get it here... http://tinyurl.com/27cok
> "jm" <john_20_28_2000@.yahoo.com> wrote in message
> news:c67e4bdd.0405261139.50a2bb71@.posting.google.com...
Friday, March 16, 2012
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment