|
| bho and vb.net |
 |
Wed, 13 Dec 2006 15:49:00 -080 |
Is there any sample of a basic BHO program written in VB.NET?
Or can I start from a sample of a BHO written in C#.NET and get enought info
to try a translation in VB.NET?
Thank you
--
|
| Post Reply
|
| RE: bho and vb.net |
 |
Wed, 13 Dec 2006 23:17:00 -080 |
This is what I was looking for and didn't find.
Thanks.
--
bruno
"Walter Wang [MSFT]" wrote:
> Hi Bruno,
>
> Based on my understanding, you want to find some BHO examples written in
> VB.NET to get started in BHO programming.
>
> I suggest you first to get familiar with BHO by reading following article:
>
> #Browser Helper Objects: The Browser the Way You Want It
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebgen/ht
> ml/bho.asp
>
>
> Indeed most of the examples found on the internet about BHO in managed code
> are written in C#, such as:
>
> #AutoSig: A browser helper object that automatically adds a different
> signature when you post a message to a CP forum - The Code Project - C#
> Samples
> http://www.codeproject.com/cs/samples/autosig.asp
>
> #IEAccessible Final Document
> http://slappy.cs.uiuc.edu/fall03/team2/Final/index.html
>
> #Steven M. Cohn's WebLog : IE Browser Helper Objects
> http://weblogs.asp.net/stevencohn/articles/60948.aspx
>
>
> However, it shouldn't be too difficult to translate them to VB.NET,
> especially there's not much code to make a basic BHO. You could use
> Reflector to decompile the C# example's assembly and view them as VB.NET
> code. You can find Reflector here:
>
> http://www.aisto.com/roeder/dotnet/
>
>
> Hope this helps.
>
> Sincerely,
> Walter Wang (wawang@online.microsoft.com, remove 'online.')
> Microsoft Online Community Support
>
> ==================================================
> Get notification to my posts through email? Please refer to
>
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications. If you are using Outlook Express, please make sure you clear the
> check box "Tools/Options/Read: Get 300 headers at a time" to see
your reply
> promptly.
>
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/subscriptions/support/default.aspx.
> ==================================================
>
> This posting is provided "AS IS" with no warranties, and confers
no rights.
>
|
| Post Reply
|
| RE: bho and vb.net |
 |
Thu, 14 Dec 2006 06:16:36 GMT |
Hi Bruno,
Based on my understanding, you want to find some BHO examples written in
VB.NET to get started in BHO programming.
I suggest you first to get familiar with BHO by reading following article:
#Browser Helper Objects: The Browser the Way You Want It
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebgen/ht
ml/bho.asp
Indeed most of the examples found on the internet about BHO in managed code
are written in C#, such as:
#AutoSig: A browser helper object that automatically adds a different
signature when you post a message to a CP forum - The Code Project - C#
Samples
http://www.codeproject.com/cs/samples/autosig.asp
#IEAccessible Final Document
http://slappy.cs.uiuc.edu/fall03/team2/Final/index.html
#Steven M. Cohn's WebLog : IE Browser Helper Objects
http://weblogs.asp.net/stevencohn/articles/60948.aspx
However, it shouldn't be too difficult to translate them to VB.NET,
especially there's not much code to make a basic BHO. You could use
Reflector to decompile the C# example's assembly and view them as VB.NET
code. You can find Reflector here:
http://www.aisto.com/roeder/dotnet/
Hope this helps.
Sincerely,
Walter Wang (wawang@online.microsoft.com, remove 'online.')
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your
reply
promptly.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.
|
| Post Reply
|
| RE: bho and vb.net |
 |
Sat, 6 Jan 2007 00:06:02 -0800 |
Hi Walter,
I started learning about BHO and began testing some programs of my own,
without success.
Among different approach, I choose the one described in MSDN Thec Support
http://support.microsoft.com/default.aspx/kb/194913/en-us that lets VB get
reference to IUnknown**. What I’m supposing to do is to define IUnknown and
IObjectWithSite in an .odl file and get its .tlb file referenced in VB.NET.
I’m using VS2005 and tried the sample found in that article (as it is, just
IUnknown definition), but when I execute step 6 I get a message box in VB
saying: “Impossible to add reference VBUnknown.tlb. Verify the file is
accessible and the assembly and component is valid”.
I'm not so expert in ODL compile and tryed many combination without success.
Iunderstand there’s a compiler problem among the old mktyplib that I don’t
have, Midl /mktyplib203, CreateTypeLib2 API.
Can you give me some suggestions?
Thanks
bruno
"Walter Wang [MSFT]" wrote:
> Hi Bruno,
>
> Based on my understanding, you want to find some BHO examples written in
> VB.NET to get started in BHO programming.
>
> I suggest you first to get familiar with BHO by reading following article:
>
> #Browser Helper Objects: The Browser the Way You Want It
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebgen/ht
> ml/bho.asp
>
>
> Indeed most of the examples found on the internet about BHO in managed code
> are written in C#, such as:
>
> #AutoSig: A browser helper object that automatically adds a different
> signature when you post a message to a CP forum - The Code Project - C#
> Samples
> http://www.codeproject.com/cs/samples/autosig.asp
>
> #IEAccessible Final Document
> http://slappy.cs.uiuc.edu/fall03/team2/Final/index.html
>
> #Steven M. Cohn's WebLog : IE Browser Helper Objects
> http://weblogs.asp.net/stevencohn/articles/60948.aspx
>
>
> However, it shouldn't be too difficult to translate them to VB.NET,
> especially there's not much code to make a basic BHO. You could use
> Reflector to decompile the C# example's assembly and view them as VB.NET
> code. You can find Reflector here:
>
> http://www.aisto.com/roeder/dotnet/
>
>
> Hope this helps.
>
> Sincerely,
> Walter Wang (wawang@online.microsoft.com, remove 'online.')
> Microsoft Online Community Support
>
> ==================================================
> Get notification to my posts through email? Please refer to
>
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications. If you are using Outlook Express, please make sure you clear the
> check box "Tools/Options/Read: Get 300 headers at a time" to see
your reply
> promptly.
>
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/subscriptions/support/default.aspx.
> ==================================================
>
> This posting is provided "AS IS" with no warranties, and confers
no rights.
>
|
| Post Reply
|
| RE: bho and vb.net |
 |
Mon, 08 Jan 2007 06:04:26 GMT |
Hi Bruno,
I'm not quite sure about your question, please feel free to correct me if I
misunderstood anything.
The KB you mentioned is VB or VBA specific, not VB.NET related. Besides,
you don't need to declare IUnknown to create your BHO. The interface that a
BHO must implemented is IObjectWithSite.
Using the AutoSig example on codeproject I mentioned in my first reply, you
could easily use Reflector to open the generated assembly and view VB.NET
definition of the interface:
<ComVisible(True), Guid("FC4801A3-2BA9-11CF-A229-00AA003D7352"),
InterfaceType(ComInterfaceType.InterfaceIsIUnknown)> _
Public Interface IObjectWithSite
' Methods
<PreserveSig> _
Function GetSite(ByRef guid As Guid, <Out> ByRef ppvSite As IntPtr)
As Integer
<PreserveSig> _
Function SetSite(<MarshalAs(UnmanagedType.IUnknown)> ByVal site As
Object) As Integer
End Interface
Hope this helps.
Regards,
Walter Wang (wawang@online.microsoft.com, remove 'online.')
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader
so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.
|
| Post Reply
|
|
|