Click here to Skip to main content
15,890,609 members
Home / Discussions / C#
   

C#

 
AnswerRe: How can I push a button virtual? Pin
Member 44178925-Mar-09 5:30
Member 44178925-Mar-09 5:30 
QuestionC# xsd Pin
babongita4-Mar-09 3:17
babongita4-Mar-09 3:17 
AnswerRe: C# xsd Pin
Pete O'Hanlon4-Mar-09 4:52
mvePete O'Hanlon4-Mar-09 4:52 
QuestionReflection - Sample? Pin
softwarejaeger4-Mar-09 3:15
softwarejaeger4-Mar-09 3:15 
AnswerRe: Reflection - Sample? Pin
Pete O'Hanlon4-Mar-09 5:58
mvePete O'Hanlon4-Mar-09 5:58 
QuestionServer Pin
mrithula84-Mar-09 2:53
mrithula84-Mar-09 2:53 
AnswerRe: Server Pin
Jimmanuel4-Mar-09 3:28
Jimmanuel4-Mar-09 3:28 
QuestionBHO and ActiveX communication Pin
gusc4-Mar-09 2:51
gusc4-Mar-09 2:51 
I'm working on one interesting open-source project here - BHO for IE that also should accept calls from Javascript. I've tried several solutions and still haven't got it to work.

First I tried to implement IDocHostUIHandler interface in my main class and cast IWebBrowser2 to ICustomDoc. Then pass an object, which implemented IDispatch interface, to SetUIHandler. The result - absolute silence (even alert(typeof window.external.myFunction) did not return anything), although method GetExternal got called.

Second I tried to create separate ActiveX class and through pUnkSite, which was cast to IWebBrowser2 in SetSite method, i tried execScript method to create wrapper object for this ActiveX. This is called on IWebBrowser.NavigateComplete2 event. The result was even weirder. At first I got it to work and calling myFunction (which had a call to show System.Windows.Forms.MessageBox) showed a message with text from Javascript. Now I wanted to make some comunication from ActiveX to BHO, so I implemented IObjectWithSite in this ActiveX class to communicate with browser and use PutProperty and GetProperty methods on IWebBrowser2. That's where I got stuck - once I casted pUnkSite to IWebBrowser2, my BHO which called execScript with "var axObject = new ActiveX("myNamespace.myClassAx");" started to throw exceptions saying "Exception from HRESULT: 0x80020101".

So here are few questions:
What does this exception mean?
Why GetExternal (window.external) does not work ?
Am I on the right track for ActiveX to BHO communication (and vice-versa)?

I'm a newbie on C#. Please help! Smile | :)

My system configuration is:
Windows XP SP3, IE7, .NET 3.5 and I'm using Microsoft Visual C# 2008 Express Edition
QuestionDispose an instance Pin
yesu prakash4-Mar-09 2:11
yesu prakash4-Mar-09 2:11 
AnswerRe: Dispose an instance Pin
DaveyM694-Mar-09 2:14
professionalDaveyM694-Mar-09 2:14 
GeneralRe: Dispose an instance Pin
Xmen Real 4-Mar-09 4:21
professional Xmen Real 4-Mar-09 4:21 
GeneralRe: Dispose an instance Pin
DaveyM694-Mar-09 4:35
professionalDaveyM694-Mar-09 4:35 
AnswerRe: Dispose an instance Pin
harold aptroot4-Mar-09 6:29
harold aptroot4-Mar-09 6:29 
GeneralRe: Dispose an instance Pin
yesu prakash4-Mar-09 18:37
yesu prakash4-Mar-09 18:37 
GeneralRe: Dispose an instance Pin
harold aptroot4-Mar-09 22:46
harold aptroot4-Mar-09 22:46 
GeneralRe: Dispose an instance Pin
yesu prakash5-Mar-09 17:23
yesu prakash5-Mar-09 17:23 
GeneralRe: Dispose an instance Pin
harold aptroot5-Mar-09 22:37
harold aptroot5-Mar-09 22:37 
Questionpassing multiple parameters to the query in C# Pin
Deepali Khalkar4-Mar-09 1:34
Deepali Khalkar4-Mar-09 1:34 
AnswerRe: passing multiple parameters to the query in C# Pin
N a v a n e e t h4-Mar-09 1:42
N a v a n e e t h4-Mar-09 1:42 
AnswerRe: passing multiple parameters to the query in C# Pin
Megidolaon4-Mar-09 2:04
Megidolaon4-Mar-09 2:04 
GeneralRe: passing multiple parameters to the query in C# PinPopular
J4amieC4-Mar-09 2:29
J4amieC4-Mar-09 2:29 
AnswerRe: passing multiple parameters to the query in C# Pin
fly9044-Mar-09 5:14
fly9044-Mar-09 5:14 
QuestionTcpChannel disconnect Pin
yesu prakash4-Mar-09 0:15
yesu prakash4-Mar-09 0:15 
AnswerRe: TcpChannel disconnect Pin
stancrm4-Mar-09 1:25
stancrm4-Mar-09 1:25 
QuestionSpecified argument was out of the range of valid values. Parameter name: index. Pin
haleemasher4-Mar-09 0:09
haleemasher4-Mar-09 0:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.