|
|
Comments and Discussions
|
|
 |

|
Hi Alok
I have read your article and follows=ed the steps worked very well for me.
I made Com dll in Vs2008 and Dot net Demo Application in vs2010 . . .Worked very fine.
thanks a lot.
|
|
|
|

|
Events descriptions are missing, which would be great for beginners like me.
|
|
|
|
|

|
Hi Alok,
Can you say anything about setting the version number of the COM/ATL DLL? I can't find out how to do it.
I assume it's necessary if you update your COM at a later date and want the new version to overwrite the old when distributed?
Great tutorial by the way. Worked fine on my VS2010
|
|
|
|

|
DIYAddict wrote: Can you say anything about setting the version number of the COM/ATL DLL? I can't find out how to do it.
Apology for late reply, please let me know you are looking for Interface Version Or COM/ATL DLL version, as both are different topic and you might require different way to achieve same
"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
|
|
|
|

|
Hi
I tried your code and also generated my own project upon your article.
I am running windows 8 ( started VS 2008 as admin) and after running the c# i am getting
the message
Retrieving the COM class factory for component with CLSID {A7657FC5-D63C-49C3-AEE5-D8799F412C74} failed due to the following error: 80040154.
I assume it is related to security but i am admin in my computer , run VS as admin
i tried to register the dll manually using regsvr32 as admin (using batch file)
Nothing is helping
Please help.
Thanks,
Eli
|
|
|
|

|
eli.arad wrote: I am running windows 8 ( started VS 2008 as admin) and after running the c# i am getting
Apologies for replying late.. let me build environment based on Windows8, will get bck to you on that
"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
|
|
|
|

|
my vote 5.
question to _ISimpleComEvents_Event and _ISimpleComEvents_TotalMarksEventHandler, I don't see any definition of these two symbols, but acutall when typing them, they can be recognized. can you give more infomation to them? Thanks.
|
|
|
|

|
6. Now add Event almost in the same way, we add method in interface. Now right click on _ISimpleComEvents and Add | Add method.
I'm using VS2008 pro. When i right-clicked _ISimpleComEvents on class view, i only see Add | Function or Variable...
When i added, i dont see the event added into the .idl instead added into SimpleATLCom_i.h.
Any idea?
|
|
|
|

|
Alex Ten wrote: I'm using VS2008 pro. When i right-clicked _ISimpleComEvents on class view, i only see Add | Function or Variable...
have a look at [^]
"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
|
|
|
|

|
I have vc++(MFC) project so i made dll of that project and want to use it in c#.but i dont know how to use..
|
|
|
|

|
Ketan Bhut wrote: have vc++(MFC) project so i made dll of that project and want to use it in c#.but i dont know how to use..
[^]
"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
|
|
|
|

|
I'have done both tutorials (VC6 and this one) and this one is also excelent!
|
|
|
|

|
Exactly what I was looking for! Thanks.
- Bob
Bob Ciora
|
|
|
|

|
Thanx ThatsAlok.
I have builded a simple COM/ATL DLL by VC2010 just like u. And the COM object has event too.
I test it by VC#, uses easy and correct. But I wanna use it in VC++ program, I dont know how to handle the event.
Did u know how to use it in VC++? (VS2005, 2008 or 2010 will be ok). Can u give a sample project? Thanx a lot.
|
|
|
|

|
yeap, there is very good wrapper written one of my favourite author, you may try this link Understanding COM Event Handling[^]
"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
|
|
|
|

|
Thanx for ur quick response.
I saw the link and tested the project, it can work normally.
But I wanna use ATL to handle the event by VS 2008 or VS2010. How can I do?
|
|
|
|

|
Hello,
It shows "System.AccessViolationException" error. What could be the problem. Please help me to solve this.
Thanks,
Sowbhagya
|
|
|
|

|
Sowbhagya Sanjeev wrote: It shows "System.AccessViolationException" error. What could be the problem. Please help me to solve this.
Let me know where exactly you getting this error?
"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
|
|
|
|

|
Hi Alok,
I have implemented one COM plug-in for Acrobat and placed in plug-ins (C:\Program Files (x86)\Adobe\Acrobat 10.0\Acrobat\plug_ins) folder.
I have created one C# application. In that I have created instance for Acrobat.
Am calling function which I have written in COM plug-in. The function should open one PDF file and get information from that.
It shows error while opening file in acrobat. The same code works without COM.
What could be the problem.
Please help me to solve this issue.
Thanks,
Sowbhagya
|
|
|
|

|
Sowbhagya Sanjeev wrote: I have implemented one COM plug-in for Acrobat and placed in plug-ins (C:\Program Files (x86)\Adobe\Acrobat 10.0\Acrobat\plug_ins) folder.
I am extremly sorry, i have no knowledge how Adobe handle it's plug-ins. I believe doesn't lies in com-component but in the way adobe handle it's plugin. see you getting access-violation error, these mean it's not able get access which is requires.
this seems to be problem more close to product handling of plug-in rather than COM itself.!
Regards
"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
|
|
|
|

|
Thanks for your article. I used Windows 7 and VS 2010 to develop this. But it shows below error.
Error 1 The type 'SampleATMcomLib.SimpleComClass' has no constructors defined \SimpleATlComTest\SimpleATlComTest\Form1.cs 16 35 SimpleATlComTest
What could be the problem.
Please help me to solve this error.
Thanks in Advance,
Sowbhagya
|
|
|
|

|
Hi Sowbhagya,
Thank you for going through article, let me check same on VS2010. my small question is are you developing from scratch or using solutions file attached with article.
If later is true, i recommend you to create a new solutions in VS2010 using instruction present here.!
regards
"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
|
|
|
|
|

|
I have not been able to run the example on the x64 Windows 7 platform using either Visual Studio 2008 or Visual Studio 2010. When I try to execute the C# code I get the error:
Retrieving the COM class factory for component with CLSID {A7657FC5-D63C-49C3-AEE5-D8799F412C74} failed due to the following error: 80040154.
After chasing down a copy of rpcndr.lib in a WinDDk I was able to build and run the example on a 32-bit version of Windows 7 using Visual Studio 2008.
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
Article touching simple issues like property, method and event and using it in .NET applications
| Type | Article |
| Licence | CPOL |
| First Posted | 18 Jul 2009 |
| Views | 61,774 |
| Downloads | 1,079 |
| Bookmarked | 72 times |
|
|