|
BTW, looks like the Ctrl-V/Paste problem comes up only in IE7.0. I used firefox and it works fine. Weird huh?
|
|
|
|
|
ssaddi wrote: BTW, looks like the Ctrl-V/Paste problem comes up only in IE7.0. I used firefox and it works fine. Weird huh?
I'm glad you found a fix. I'm using IE7 on my computer, but it pastes just fine. We may never know what went wrong on your end.
Nathan
|
|
|
|
|
hi
this is suresh...........
i have written a comdll using Win32 dynamic link library.so the dll has run without Bugs,
next my client in console.......
#include
#include
#include "iids.h"
#include "interface.h"
void main()
{
CoInitialize(NULL);
I1* p1=NULL;
HRESULT hr=CoCreateInstance(CLSID_D,NULL,CLSCTX_ALL,IID_I1,(void**)&p1);
if(FAILED(hr))
{
cout<<"sorry component cannot be created "<<endl;
}
p1->f1();
I2 *p2;
p1->QueryInterface(IID_I2,(void**)&p2);
p2->f2();
p1->Release();
p2->Release();
CoUninitialize();
}
so finally i cannot co-create the component
|
|
|
|
|
hi
this is suresh...........
i have written a comdll using Win32 dynamic link library.so the dll has run without Bugs,
next my client in console.......
#include<objbase.h>
#include<iostream.h>
#include "iids.h"
#include "interface.h"
void main()
{
CoInitialize(NULL);
I1* p1=NULL;
HRESULT hr=CoCreateInstance(CLSID_D,NULL,CLSCTX_ALL,IID_I1,(void**)&p1);
if(FAILED(hr))
{
cout<<"sorry component cannot be created "<<endl;
}
p1->f1();
I2 *p2;
p1->QueryInterface(IID_I2,(void**)&p2);
p2->f2();
p1->Release();
p2->Release();
CoUninitialize();
}
so finally i cannot co-create the component
|
|
|
|
|
And what was the error?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Hi friend,
it's urgent
I am using some DLL file (LpiCom_6_0.LPOrderPart.dll) in asp file for bulk payment charging (its support by LinkPoint). Its work fine but after some days its not work means registration failed. Again when we registered.it's work fine. What can be problem. If you have any idea then please help me i am facing from six month.
Thanks
Sujit
|
|
|
|
|
Sujit Gupta wrote: it's urgent
Just because you say "It's urgnet", no one will leave their own work and find solution for you
Sujit Gupta wrote: I am using some DLL file (LpiCom_6_0.LPOrderPart.dll) in asp file for bulk payment charging (its support by LinkPoint). Its work fine but after some days its not work means registration failed. Again when we registered.it's work fine. What can be problem. If you have any idea then please help me i am facing from six month.
There could be many reasons why it's not working. But from the details you have mentioned, it seems the problem is due to your DLL getting unregistered somehow.
I believe your DLL resides on one of your servers, I would check if there any script or activity happening on your server that is unregistering it periodically and doesn't register it again. I could be wrong here, but do check.
Sujit Gupta wrote: What can be problem. If you have any idea then please help me i am facing from six month.
Did you check with LinkPoint support?
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
hi,
i'm trying to get the source html code from web page.
IOleCommandTarget *iole;
IWebBrowser2 *iex;
CoCreateInstance(CLSID_InternetExplorer, NULL, CLSCTX_SERVER, IID_IWebBrowser2, (LPVOID*)&iex);
hr = iex ->QueryInterface(IID_IOleCommandTarget, (void**)&iole);
if(SUCCEEDED(hr))
hr = iole ->Exec(&CGID_MSHTML, IDM_VIEWSOURCE, 0, 0, 0);
that doesn't works.
could you tell me what's wrong here?
are there other ways to get html source code without using MFC?
thanks for help.
|
|
|
|
|
sashka wrote: IOleCommandTarget *iole;
IWebBrowser2 *iex;
CoCreateInstance(CLSID_InternetExplorer, NULL, CLSCTX_SERVER, IID_IWebBrowser2, (LPVOID*)&iex);
hr = iex ->QueryInterface(IID_IOleCommandTarget, (void**)&iole);
if(SUCCEEDED(hr))
hr = iole ->Exec(&CGID_MSHTML, IDM_VIEWSOURCE, 0, 0, 0);
What doesn't work here
. Query interface or
. hr = iole ->Exec(&CGID_MSHTML, IDM_VIEWSOURCE, 0, 0, 0);
what is the value of HRESULT after calling
hr = iole ->Exec(&CGID_MSHTML, IDM_VIEWSOURCE, 0, 0, 0);
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
method Exec() doesn't works.
it returns E_UNKNOWNGROUP.
i included mshtmhst.h, mshtmcid.h, mshtml.h.
in mshtmhst.h CGID_MSHTML defined in this way:
EXTERN_C const GUID CGID_MSHTML;
#define CMDSETID_Forms3 CGID_MSHTML
CMDSETID_Forms3 defined in mshtml.h:
EXTERN_C const GUID CMDSETID_Forms3
i am not very familiar with COM, but i have read that
every COM object must be registered in system through
it's unique GUID. so i tried to use macro
DEFINE_GUID(CGID_MSHTML, XXX),
XXX - GUID for CGID_MSHTML command group (found with google).
that doesn't worked.
|
|
|
|
|
Sorry for replying late. Is your problem resolved?
Can you point me to header/idl where E_UNKNOWNGROUP is defined?
sashka wrote: i am not very familiar with COM, but i have read that
every COM object must be registered in system through
it's unique GUID. so i tried to use macro
DEFINE_GUID(CGID_MSHTML, XXX),
XXX - GUID for CGID_MSHTML command group (found with google).
that doesn't worked.
You are suppose to register COM servers and coclass only for the components you develop. All other COM servers, be it Out of process server(EXE) or Inprocess servers(DLLs), are suppose to be registered in a predefined way. For Inproc servers, we usually use Regsvr32.exe to register the DLL (See DllRegisterServer function that is exported by any COM inproc server. This function is called.)
I believe reading some basics about COM before going ahead, will help design your component/application in a better way.
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
sorry for replying late.
last time i gave you an incorrect description of my error, sorry for that too.
when the Exec() method fails it returns not E_UNKNOWNGROUP, but OLECMDERR_E_UNKNOWNGROUP,
it defined in docobj.h.
my goal was to retrieve a source html code from browser.
i have found another way to do it:
...
HRESULT hr;
IWebBrowser2 *iex;
OLECHAR *path = L"h://1.html";
IDispatch *iDisp;
IPersistFile *persistFile;
...
hr = iex ->get_Document(&iDisp);
if(SUCCEEDED(hr)){
hr = iDisp->QueryInterface( IID_IPersistFile, (void**)&persistFile);
if(SUCCEEDED(hr))
hr = persistFile ->Save(path, 1);
}
it works.
but i got a new problem - can't change the page, using Navigate() method:
...
hr = iex ->Navigate( L"http:\\www.bash.org", 0, 0, 0, 0);
the value of hr is -2147023116;
if you have some free time, please look whats wrong wiht that.
great thanks for help.
|
|
|
|
|
Good to know it you found a workaround for that. I might look at your original problem if my spare time.
Member 4718531 wrote: hr = iex ->Navigate( L"http:\\www.bash.org", 0, 0, 0, 0);
the value of hr is -2147023116;
I think iex ->Navigate( L"http:\\www.bash.org", 0, 0, 0, 0); should be iex ->Navigate( L"http:\\\\www.bash.org", 0, 0, 0, 0);
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Why we should not modify the existing interface which is released?
I am new please explain.
|
|
|
|
|
Avoiding crashes of existing clients may be a good reason?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
modified on Friday, February 29, 2008 8:48 AM
|
|
|
|
|
|
Current clients of the your COM component rely on its interface as it stands. If you change the interface, i.e. the (binary) contract between the COM server and its clients, then you probably break the client themselves.
Interfaces must be immutable is one of the fundamental principles of COM .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
hi all
I am working with an application in which i required to send fax periodically . For that i used windows service. If i started the service for first time the pdf document was sent successfully thru fax( i used faxcom.dll for this purpose). But second time on words it is not at all sending the fax. The application was executed and stopped at faxserv.Send() method.I was given timer delay 2 minutes in service to execute code to send fax. I just restarted my system then the system was showing an error like ' The adobe reader was encounterd a problem ' . After i checked the application(service) it was working properly. (it seems the system it self rectified the error in adobe)
But why the adobe was encoutered the problem (i can say that the problem for adobe is with my service only).
plz let me share any information in this regard .
Thanks in advance
Pinky
|
|
|
|
|
Hi there
I'm desperately searching for example code helping me to write a Rose Add-in in Vc++. There are couple of VB6 examples out there, but none in C++. I have knowledge in COM, and there is a TLB of Rational Rose available, but I'm stuck.
HELP !!!
|
|
|
|
|
I have a thread function which is something like this.
1)
Extract the pointer value which comes as part of the thread function call.
2)
Initialize the thread with ::CoInitializeEx(0,COINIT_MULTITHREADED) so that it enters the MTA of the process.
3)
Use the pointer extracted above in Step 2 to make a COM call.
The actual COM call (step 3) is made after the thread is initialized for using COM (step 2).
Is this fine? Should I also change my thread function such step 2 preceeds step 1.
Thanks
Rajdeep
|
|
|
|
|
The pointer you are passing needs to be marshaled because the coclass it belongs to is created within other appartment (unless your object is created withing MTA)
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Hi,
I have the the following body of code:
STDMETHODIMP_(ULONG) CoCarClassFactory::Release()<br />
{<br />
if(--m_refCount == 0)<br />
{<br />
delete this;<br />
return 0;<br />
}<br />
<br />
return m_refCount;<br />
}
My question is about the return 0; statement after the delete this; line. How can the function still return after deleting the object that contains itself?
TIA!
I am a SysAdmin, I battle my own daemons.
|
|
|
|
|
DenClancy wrote: My question is about the return 0; statement after the delete this; line. How can the function still return after deleting the object that contains itself?
just check this out, try it on any compiler :-
class ABC
{
public:
void MyFunc() { cout<<"hello atl";}
};
void main()
{
ABC *c= NULL;
c->MyFunc();
}
are you wondering it will work or not.. but it will work.. try it!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
|
In addition to the previous posts. The reason why this works is that it is ok to execute code after the class object is deleted only if you do not try to use any non static class variables.
John
|
|
|
|
|