문제

To better myself I am attempting to make my dll's COM compliant, I thought I'd just need to extend/implement a few interfaces and job done but now I am at a cross roads,

1) Should I learn MIDL?

2) Should I install the ATL (I am running VC++Express)?

3) Carry on reading the C++ tutorials (http://progtutorials.tripod.com/COM.htm) and hope my Express edition is too limited?

도움이 되었습니까?

해결책

I was interested in transferring native C++ to Android and Java and read that the libraries would need to expose either static 'C' style functions or implement COM.

Android is Linux based operating system... It does not support DLLs and COM.

So no you can't go via COM. You need to learn how to use JNI.

다른 팁

1) Yes. If you are going to define new interfaces, you pretty much have to. It's not impossible to do without MIDL, but it's way harder than to learn basic MIDL.

2) Yes, please do. It'll hide much of the boiler plate code (which is tedious to write, and error prone).

3) I would recommend the book Essential COM by Don Box. It's awesome. Also, a great companion to that book is Essential IDL by Martin Gudgin.

As for VC++ Express - I have never used them. I guess it's possible to do COM with it, but with limited tool/library support.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top