|
Hi,
I want to POST datas and at the same time open the default browser
so I found code that do the thing :
First I call CoCreateInstance with CLSID_InternetExplorer as argument
Then I call NaviGate with the url and the datas to post as arguments
So InternetExplorer opens and I see the result of the datas I posted.
But now I want to open the defaultbrowser and not only InternetExplorer.
How should I do ?
Thanks.
lasterix
|
|
|
|
|
you will get Default Browser Location here in this registry KEY.
HKEY_CLASSES_ROOT\HTTP\shell\open\command
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
Ok thanks, but I don't know how to use it in my case.
|
|
|
|
|
|
|
|
Hi,
I have an ATL COM that is initialized with CoInitializeEx(NULL,COINIT_MULTITHREADED) thus its multiple apartment COM and calls can be made simultaneously from different clients.
When I initialize and call it from an application, no problem.
When I initialize and call from 2 different applications- no problem as well.
But when I initialize it in one application and then try to initialize or call it from another thread in the same application, I get the following error:
"the application called an interface that was marshaled for a different thread"
What can I do to solve it? Should I change the way I call it?
Thanks.
avivhal
|
|
|
|
|
the CoInitialize(Ex) initializes the apartment for the thread - you also need to mark the type of apartment for the object. If you create it in ATL, the wizard asks you if you want to create single/multithreaded object.
You need to have Free threaded object and free threaded thread to achieve no marshalling.
|
|
|
|
|
Did you call CoInitializeEx(NULL,COINIT_MULTITHREADED) in that thread ?
|
|
|
|
|
Is Automation the only major concern between IDispatch and IUnknown??? or anything else hiding in??
Hariharan.T
|
|
|
|
|
One small thing to know - IUnknown is a base interface from which every interface should either directly or indirectly derive. Even IDispatch is derived from IUnknown.
Best thing according to me would be trying find/understand why IUnknown is really required and same abt IDispatch. This will help you understand them better.
Have a great day ahead!
Regards,
Sohail Kadiwala
(My Blog - http://blogs.wdevs.com/sohail/[^])
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Hi Sohail Sir!,
i Would also like to knwo in what case IUnKnown is better and in what case IDispatch is better.
Thanks
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
Hi!
IDispatch was designed for usage from script languages. If you look into details, how does it work, you'll find that intent easily.
So answer to your question in COM borders is quite impossible - IUnknown cannot be better than IDispatch , because when you use the IDispatch , you use the IUnknown as well. But it's worth of use if you talk to script languages (VB counts here as script language)
The core parts of the IDispatch are GetIdsOfNames and Invoke . The whole IDL part is just an add-on to the automation part, I can describe that if you want (this post is quite long anyway)
|
|
|
|
|
Hello Sir!
I think, I got something in my mind from your above Post.if any problem come in my way,I think I am going to agian knock your Door.
Thanks.
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
No problem
|
|
|
|
|
I think I dont need to comment more on this
|
|
|
|
|
Thanks Dear you are Back to Help me out
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
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 ?
Thanks.
Regards,
Mandar
|
|
|
|
|
hi,
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
dialog.
Please Help in solving this problem
thanks in advance
|
|
|
|
|
Hi,
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...
Thanks.
|
|
|
|
|
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?)
|
|
|
|
|
Can I set break points in th COM project and use the debug mode?
I want to trace for values of some variables and memory bindings.
|
|
|
|
|
|
Yes you can. If you are debugging a COM server implemented as DLL the procedure for debugging is same as debugging a normal DLL
Have a great day ahead!
Regards,
Sohail Kadiwala
(My Blog - http://blogs.wdevs.com/sohail/[^])
modified 21-Apr-21 21:01pm.
|
|
|
|