|
Ok, any idea where to search for <object> tag. I've googled but no solution to my problem...
_____________________________
...and justice for all
APe
|
|
|
|
|
|
I m makeing ATL DLL using ATL COM Wizard
i m getting an error as follows
F:\rough work\atl2\atl2.idl(18) : error MIDL2025 : syntax error : expecting a type specification near "CString"
for the line given below
[id(1), helpstring("method Connect")] HRESULT Connect(CString ip , int port);
how can i remove the eror
thanx
Regards.
|
|
|
|
|
Use BSTR instead of CString
-------------------------
Have a great day ahead!
Regards,
Sohail Kadiwala
modified 21-Apr-21 21:01pm.
|
|
|
|
|
I have a simple test object with one method that opens an ADO connection, performs an insert, and closes the connection.
When I enlist the object in a transaction I incur a delay of about 15 seconds in destroying my closed connection object, both explicit using 'set cn = nothing' and implicitly if I omit the set and the object goes out of scope.
I am new to COM+ so any help would be appreciated.
My blog.
|
|
|
|
|
the problem
error C2970: 'IDispEventImpl' : template argument 'pdiid' : invalid address of static variable 'DIID__IStageEvents'
error C2065: 'DIID__IStageEvents' : undeclared identifier
error C2065: 'LIBID_MoticMotorLib' : undeclared identifier
how to solve the problems above!
thanks!
andy_cn
|
|
|
|
|
how do i solve the problem,
error C2970: 'IDispEventImpl' : template argument 'pdiid' : invalid address of static variable 'DIID__IStageEvents'
error C2970: 'IDispEventImpl' : template argument 'plibid' : invalid address of static variable 'LIBID_MoticMotorLib'
error C2065: 'DIID__IStageEvents' : undeclared identifier
error C2065: 'LIBID_MoticMotorLib' : undeclared identifier
thanks!
|
|
|
|
|
I suppose you failed to add the following line
#import "YourDLL"
using namespace THE DLLNAME
and add the dll into your current work space..
if this dosent solve the problem...do let me know
cheers
Balkrishna Talele
|
|
|
|
|
I successed to add the following line
#import "C:\WINNT\System32\MoticMotor.dll" no_namespace named_guids
but I can't still solve the problem.
As a matter of fact,the problem only appears in the SinkObj.h, 'DIID__IStageEvents' can be used successfully in the file mygrabDlg.cpp( mygrabDlg.h), "mygrab" is the file name i inputed in the Appwizard when i start to create the MFC app.
thanks!
|
|
|
|
|
I successed to add the following line
#import "C:\WINNT\System32\MoticMotor.dll" no_namespace named_guids
but I can't still solve the problem.
as a matter of fact,the problem only appears in the SinkObj.h, 'DIID__IStageEvents' can be used successfully in the file mygrabDlg.cpp( mygrabDlg.h), "mygrab" is the file name i inputed in the Appwizard when i start to create the MFC app.
thanks!
andy_cn
|
|
|
|
|
thank you very much for your reply!
I successed to add the following line
#import "C:\WINNT\System32\MoticMotor.dll" no_namespace named_guids
but I can't still solve the problem.
as a matter of fact,the problem only appears in the SinkObj.h, 'DIID__IStageEvents' can be used successfully in the file mygrabDlg.cpp( mygrabDlg.h), "mygrab" is the file name i inputed in the Appwizard when i start to create the MFC app.
thanks
andy_cn
|
|
|
|
|
Hy all!
I don't know is this the right place for this question, so my apologies if it isn't.
I have project written in C#, and now my new requirenment is that I must embed IE (i think that wizard generates ActiveX control?) in one of the forms. That control loads some html which has JavaScript code with which I must comunicate.
If anyone can shed some light on how to attack the problem, or point me the right way, I'll be grateful. And I promise if I get it to work I'll publish the code on CodeProject.
Thnx in advance.
|
|
|
|
|
For a C++ implementation, see this[^] article here on CodeProject.
It shows you how to use the IHTMLDocument2 interface to enumerate and execute JavaScript functions coded on a HTML page. As it uses a lot of COM, it may be difficult to port this to C#. The process how to call JS functions is precisely the same, though. The required functions and variables differ, though.
But reading the article will give you an idea how to execute JS functions by using COM. Next step is to implement this approach using C#.
Happy coding
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Hi all,
Someone please explain me why COM doesnot support Multiple Inheritance incase of Interfaces
I mean why I shouldn't have
IDerived:IBase1,IBase2
I did read about it in Don Box book, but I would appreciate if someone explains it in detail (A link to some online resource would work fine too )
Thanks
-------------------------
Have a great day ahead!
Regards,
Sohail Kadiwala
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Greetings All,
I have a free threaded application with some 5 threads. In one of the threads I am creating an instance of IGlobalInterfaceTable and calling RegisterInterfaceInGlobal(..). It returns S_OK.
If I unmarhsall this interface in the same thread somewhere down the line, it works properly.
But when I create instance of IGlobalInterfaceTable in another thread, and call GetInterfaceFromGlobal(..), it returns me HRESULT of 0x8000FFFF which is Catastrophic failure.
Can anyone help?
|
|
|
|
|
Is your interface correctly registered in registry and does the project contain the correct marshalling information?
I noticed some problems with GIT when the interface wasn't properly marshalled.
|
|
|
|
|
Hi Everyone,
This is a design related issue.Let mme give you all a background of the issue. We have a local datbase implemmented in form of the binary files. One component is designed with some interfaces to access this database. Actually this component loads the binary file in its memory(as it is a out-of-proc COM component) but as this becomes very complex and it tends to be orrupt very frequently. But as we have decided to change the backend from binary file to a xml file we will not be using any code for accessing the memory mapped files instead now we want to use the xml file.
This was the past story now the real challenge is that as we cannot break the interface as there are many customers using the interfaces we have decided that we will the interfaces same and instead we will change its implementation from inside the component.
So I would like to know from yopur expreinces that what design should I follow in this scenario?
Please provide your valuable inputs and if possible some code snippets to me.
Thanks in advance
Deepak
|
|
|
|
|
Hi all,
I've created an ActiveX control using Visual C++ .NET.
When I add this control to a container created with Visual C++ .NET (or a Visual C++ 6.0) everything works and there is no apparently problem. But now, I'm trying to test this ActiveX with an application created with Visual Basic 6.0. The problem is that the ActiveX control does not appear in the list of registered components from the Visual Basic 6.0 (Menu -> Project -> Components, or Ctrl+T). So, I can't add my ActiveX to the Visual Basic 6.0 container.
When I try to make the same operation with a Visual Basic .NET container, I find the same situation, this is, the ActiveX control is not in the registered components list. But the ActiveX control is already registered.
I use the OleView application in order to ensure that the control is registered.
Due to my ActiveX control perfectly works with a Visual C++ .NET (and a Visual C++ 6.0) container, I suppose there is any bad chosen compiler option (by the time, everything is by default). Does anybody experimented the same situation testing his/her ActiveX in a Visual Basic container?
Thanks in advance.
|
|
|
|
|
want to retieve currently written text in iexlorer address bar when user
press enter button or click go button
pls help
-----------------------------
"I Think It will Work"
Formerly Known As "Alok The Programmer" at CP
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
I have created a COM object and in my class there is an empty constructor.
Can I provide a destructor and perform cleanup there?
I need to serialize a CList to a file and then free the objects stored in the CList.
|
|
|
|
|
Yes, there's no reason why you can't provide a destructor with cleanup code.
"Oh, I'm sick of doing Japanese stuff! In jail we had to be in this dumb kabuki play about the 47 Ronin, and I wanted to be Oshi, but they made me Ori!"
|
|
|
|
|
10x
I solved the problem with simple casting, someting like:
<br />
IDispatch *pDisp = returnval.pdispVal;<br />
IResult *res = (IResult *)(pDisp);<br />
It worked very well.
|
|
|
|
|
Nooooooooooooo! You just committed a deadly COM sin. Never, ever, cast interfaces like that. Always use QueryInterface() . Do this instead:
pDisp->QueryInterface(IID_IResult, (void**)&res);
You can never know for sure what an interface pointer points to. It may point to a C++ object, but it may also point to a proxy. The object implementing IDispatch may not even implement IResult .
I repeat: always use QueryInterface() .
--
Arigato gozaimashita!
|
|
|
|
|
Wow ! Yeah, I figured, thanks for the info, I am re-writing that right now ;-]
I've got to read some books about COM, but unfortunately I don't have much time
|
|
|
|
|
btw, any idea how to get the interface pointer IID, if I dont have Named Guid constants?
|
|
|
|