|
Hi everybody,
I’m developing an MFC application. I‘ve created an event sink for IHTMLFormElement, using BEGIN_DISPATCH_MAP-END_DISPATCH_MAP macros.
In this event sink, I’m catching submit event of the form. For most of the sites it’s working fine. But for some of the SSL sites like bankofamerica.com, the form sink does not get submit event. How to get submit event for such sites?
I tried put_onsubmit, but it is also not working. I might be making some mistake doing it. The code I tried is:
hr = m_pUnkSinkForm->QueryInterface (IID_IDispatch, (void **)&pSelfDisp);
VariantInit(&vargID);
vargID.vt = VT_DISPATCH;
vargID.pdispVal = pSelfDisp;
IHTMLFormElement *pIHTMLFormElement = NULL;
hr = m_pUnkSrcForm->QueryInterface(IID_IHTMLFormElement, (void**)&pIHTMLFormElement);
if(SUCCEEDED(hr))
{
hr = pIHTMLFormElement->put_onsubmit(vargID);
If there is any other workaround except put_onsubmit, please mention, I’ll try it out.
Thanks in advance…
Avya.
|
|
|
|
|
Hi All
I have a MFC client wich is a part of big 3-tier application. Recently, I've begun to convert some parts of it into managed code.
By that, I mean that I rewrote some components of the app using C# and imported them into my app as a COM components (including the communication with the server wich I changed from COM+ to .Net remoring).
It works fine, but when I close the application I get exception in call to corExitProcess().
Does anybody know something about that?
Do I have to shut the CLR in some way?
thanks!
|
|
|
|
|
Is it possible to write my own outlook, but only interface (UI) wise? In other words, does Outlook provide access to it's internals (database, code to send recieve email, account information, etc.)?
Sammy
"A good friend, is like a good book: the inside is better than the cover..."
|
|
|
|
|
There's an object model, so yes, at least partially. However, it may be that some operations bring up bits of Outlook's own GUI.
Steve S
|
|
|
|
|
I am able to get document for the window, but how can I get interface pointers multiple documents.
A window can contain multiple documents. To be precise, if a document has multiple frames each frame has its own document. How can I access the document associated with particular frame.
Avya.
|
|
|
|
|
Hi,
How do a COM client interacts with an EJB ?
or
How can I call Java functions (specifically EJB interfaces) from within a C++ program? Is this possible in the first place.
God Is Great
|
|
|
|
|
how do we interact 2 way BETWEEN A COM COMPONENT[say written in MFC COM] and a simple java class/EJB component.
say i wish to call a method in the java class from the COM component.
From MFC COM component ,i pass it a number,the java class/component must multily it by say 10 and return the result back to MFC COM component.
Is it possible.
Both reside on same machine.
God Is Great
|
|
|
|
|
Hi,
Can anyone tell me how to get the DLL name/path from a CLSID or PROGID? I have a CLSID and I want to know what the exe or DLL is that serves it.
Thank you.
|
|
|
|
|
You can query registry value
HKEY_CLASSES_ROOT\CLSID\{your clsid}\InprocServer32
and/or LocalServer32
Edward
|
|
|
|
|
Hello All
I am in a bit of trouble,
I want to use a function
Sub Verify( _
ByVal SignedMessage As String, _
[ ByVal bDetached As Boolean ], _
[ ByVal VerifyFlag As CAPICOM_SIGNED_DATA_VERIFY_FLAG ] _
)
in C++ now _bstr_t object is to based as the first parameter, but the problem is that the File which I want to load is in DER format, I have tried different things like CFile, fstream and FILE to open it and convert the char buffer into _bstr_t but only some portion of File is read. I wanted to know is there any thing in COM libariaries to laod a DER format file or some way to make a _bstr_t from a File.
I dont have experties in COM based programming, and I have to use it for thies purpose
best Regards
Muhammad Aftab Alam
|
|
|
|
|
I have a clsid of a com component now i want to know its interface identifier. How can i do it.
Thanx in advance
Regards
INAM
Inam
|
|
|
|
|
A CLSID is a GUID that references a coclass; whereas an IID is a GUID that references an interface in the coclass. I'm not sure I understand what you're really wanting becuse a coclass can support more than one interface - which means there will be more than one IID. Are you sure you're not wanting the ProgID? if so you can use:
CLSIDFromProgID
or
ProgIDFromCLSID
Regards,
|
|
|
|
|
I created a user control using c#.it automatically saved as .cs file.it works
properly.what i want now is to use it in a web page.but i can't find it's class id.i tried regedit.i typed the path of the project & searched.but no use.can somebody help meee?????
madara
|
|
|
|
|
I've found an excellent article by Dino Esposito on the MSDN about Browser Helper Objects, which is what I'm trying to write. However, I can't find the example source code (ViewSource) that allegedly goes with it, anywhere. Before you say it, I've posted messages on the MSDN board, but I thought I'd try here too in case anyone has it or can tell me where to find it.
Dave
|
|
|
|
|
|
Luca
yes, that is the article 'Browser Helper Objects: The Browser the Way You Want It', that I found on the web, but although the article refers to source code I couldn't find the code. If you have found the article AND the code, can you tell me how to get the code. Thanks.
Dave
|
|
|
|
|
hi
i used ie head files to make dximagetransform. And i included related head files. but the compile errors appeared:
e:\internet explorer 6sp1 header and library files\include\dxatlpb.h(298) : error C2668: 'InlineIsEqualGUID' : ambiguous call to overloaded function
e:\internet explorer 6sp1 header and library files\include\dxatlpb.h(308) : error C2668: 'InlineIsEqualGUID' : ambiguous call to overloaded function
e:\internet explorer 6sp1 header and library files\include\dxatlpb.h(313) : error C2668: 'InlineIsEqualGUID' : ambiguous call to overloaded function
what's wrong?
thanks.
|
|
|
|
|
Are you using ATL as well? Try this (ugly, but maybe useful) hack:
using ATL::InlineIsEqualGUID;
#include <dxatlpb.h>
--
Gott weiß ich will kein Engel sein.
|
|
|
|
|
I have been running around in circles trying to find comprehensive guidelines and examples on how to write "both" components, the msdn site is totally#$#$# up.
Can someone give me some guidelines and point me to some articels/samples?
thanks a heap
Man Learns from History that he never learns from History
|
|
|
|
|
Could you be a little more descriptive in what you mean by "both" components.
- Nick Parker My Blog
|
|
|
|
|
Trying to write an in-process component whose threading model will be "both". I want it to be instantiated in the same apartment as the client, irrespective of whether the client has entered an STA or MTA. If I understand right, the main criteria for writing this kind of component pertains to how I can perform callbacks to the client.
thanks
Man Learns from History that he never learns from History
|
|
|
|
|
That's right. If your component might use the client object on the thread other than STA (if the client is in STA), you'd have to do marshalling/unmarshalling of the client object "manually".
Edward
|
|
|
|
|
So would this work? When I decide I need to do a callback, I check the thread id of the current thread. If it matches the one that passed the callback pointer(which I would have stored somewhere), I make a direct call. If not, I call it via a proxy which I implement with custom marshalling.
BTW, if I dont use callbacks in the component, can I go ahead and implement it as "both" without worrying about anything else?
thanks!!
Man Learns from History that he never learns from History
|
|
|
|
|
I wouldn't bother with checking threadid, you rcomponent might be called from MTA.
If your object pointer is not being passed directly to another thread (for instance one of object's methods created thread and from this thread you invoke one of the objects methods) you do not have to worry about this at all.
And you are right, if you do not use other objects (callbacks or internally created com objects) in your component you don't have to worry about all this (of course synchronization must be taken care of).
As for marshalling, in case it's necessary, I usually prefer using GIT (global interface table, works on NT sp3, Win95 with dcom): for instance when object gets created I'd register it in the GIT (IGlobalInterfaceTable::RegisterInterfaceInGlobal) and then all other threads that need to use the object would get the interface pointer from GIT (GetInterfaceFromGlobal) instead of using it directly, this way none the object itself can use any internal com objects (callbacks) safely.
HTH,
Edward
|
|
|
|
|
So we do not need "custom" marshalling here, only "manual" invocation of the facilities already available. When the component gets the interface pointer to the callback object, it checks it into the GIT. When the client needs to be notified of something, the interface pointer is checked out from the GIT and the callback performed.
thanks
Steve
|
|
|
|