ThatsAlok wrote: in what case IUnKnown is better and in what case IDispatch is better.
The magic of IDispatch is apparent in automation clients. If you have a server implementing multiple interfaces along with support for automation, an obvious method would be to have a default IDispatch derived automation interface. The smart or VTABLE aware clients can well use the IUnknown derived interfeces. So the entire interface design scenario will be governed by the requirements of your server
My COM server side code is passing array of doubles, from C++ to VB, in the form of SafeArray. I am creating new SafeArray, using SafeArrayCreate. But this code is being called atleast 2000 times, reducing performance. SafeArrayCreate takes lot of time for exection. Is there any way where I can reduce execution time?
Say like, static SafeArray, which will create SafeArray only once, and only accessing and unaccessing it with new data every time? Does any one knows the optimized way to pass array of double from C++ to VB ?
I am using a Popup and Resizing Dialog.In that I am using an activex
Control Microsoft WebBrowser.In this an HTML page is used .I am unable
to use Tab Key in this page. but If I Open this page in browser I can
use tab key.I am using ATL.
I have tried with WS_EX_CONTROLPARENT while creating this child
Please Help in solving this problem
I want to create an extension to the normal flash player (Flash.ocx).
I've created a new COM/ATL project, and added a simple ATL object.
Then I've used the implement interface wizard to create the Flash.ocx interface,
I've also imported the Flash.ocx file in the stdAfx.h file.
this is the part when I got stacked, I just need to change one method and to add one, but what about all the other ones? (the other methods are - return E_NOTIMPL; for now, should I do something about it?) and when I will compile it, will it run by it self or the Flash.ocx should be registered as well?
if will just compile it now and try to run a web page with my new CLSID will it work?
I am a newbie, so I am sorry about all the question...
Will declaring member variable as static guarantee for no memory reallocation against the multiple costructor calls for COM object ( multiple client modules invoking single server module)?
I m using critical section for the static member variable n those are threadsafe, but ds tht mn they provide solution to readers/writers problem?
( I am using a static variable XYZ to store th datapackets in th form of linked-list, where application enqueues th packets RPCs dequeues them. Is locking/unlocking the functin calls for XYZ under critical section safe enough?)
In a COM+ Application( single server and multiple clients ), a client call some method provided by the server through out RPC, the problem is, if both the client and the server have a same NT account, the client can works well, but if the client is loged on with another account, it can't work.
Could any body help me?
I am a student at an engineering college and I am working on my major project. I am stuck at one step. I made a program in matlab which reads an xls file and does some mathematical operations on it(fminsearch).
Now I need to use this program in Visual Basic. For this I made a DLL file of the project using mbuild. But I am unable to write the VB code to use the file.
Can anyone please help me out. This step is of high importance to me. Without this I am lost.
Waiting for your response.
How COM object can support .NET serialization ? I mean, I have a simple COM object implementing persistence through IPersistStreamInit interface and would like to serialize my COM in .NET serialization process. Does COM interop support COM persistence in .NET serialization process ?
I tried many ways but so far I failed. I was able to implement .NET ISerializable interface in my COM object (but what about "older" COM objects, which I cannot redesign ?) but still missing in interop class .NET SerializabeAttribute makes me confused. Should I build a wrapper around interop wrapper (or build totally my own) to satisfy SerializableAttribute requirement ?
I am trying to construct a CComBSTR object containing a long string and I found the CComBSTR could only accept the limited number of characters, those character after that are discarded.
Here is my code:
bsCode.Append("document.bgColor='yellow';alert('a demo message');var retValue = document.bgColor;var heads = document.getElementByTagName('head');heads.setAttribute('JDIC_BROWSER_PROP', retValue);");
Debugging result shows the bsCode only contains the following characters:
"document.bgColor='yellow';alert('a demo message');var retValue = document.bgColor;var heads = document.getElementByTagName('he"
I tried several other way to solve this problem but all failed. The way I tried include:
1. Not using Append, providing the content during the construction
CComBSTR bsCode("document.bgColor='yellow';alert('a demo message');var retValue = document.bgColor;var heads = document.getElementByTagName('head');heads.setAttribute('JDIC_BROWSER_PROP', retValue);");
2. Like the way above, but specify a big enough length of the CComBSTR
CComBSTR bsCode(1024, "document.bgColor='yellow';alert('a demo message');var retValue = document.bgColor;var heads = document.getElementByTagName('head');heads.setAttribute('JDIC_BROWSER_PROP', retValue);");
Each way all lead to the same result.
I am quite confused. Is it true that CComBSTR only support "short" string?
Home > Software > Internet Explorer IE5 Programming Components Browser Control > How to open Web...
Post 1 of 1
Topic 259 of 260
How to open Web Browser from Outlook Addin
by "devom" <email@example.com> Jan 14, 2005 at 02:30 AM
I had created an Outlook Addin using VC++ ATL.There I had created button on
want to open a Web Browser window on clicking on the button.The web
Browser Window could not have any
Buttons,Toolbars etc.eg.I just want to open www.rediff.com in the window
upon initialisation.Next, I want to capture
click events on the rediff page.(Eg. on what picture in the html page did
the user clicked)
How should .I move forward .Plz explain with steps
Thanks in advance
You can host the 'Shell.Explorer' ActiveX control - it's in the shdocvw.dll server in ...\windows\system32.
With ATL, you'll be able to use CAxWindow (or derived) and either use the IWebBrowser(2) from the Platform SDK's header files or simply #import shdocvw.dll.
IWebBrowser(2) provides a method to browse, eg. to www.rediff.com, called Navigate(2).
Once you've loaded the page, you can access the HTML Document from the Document property (returns IDispatch interface).
The Doc also implements IHTMLDocument/IHTMLDOMNode(2), which you can find in mshtml.tlb (using #import) or the Platform SDK.
From the IHTMLxxx API you can find the elements in the page itself.
A word of caution though; there is no real way to tell when a page has loaded as the events such as, BeforeNavigate(2), OnDocumentComplete, etc only notifies of progress for individual document elements, and since most pages contain many such elements, you have to 'look out' for the bits you're concerned with - and then there's always the case where the server isn't running (etc) which you'll also want to handle properly.
HTH and good luck
Last Visit: 29-Sep-20 11:02 Last Update: 29-Sep-20 11:02