|
It's a DLL with both managed and unmanaged code. It still has DllMain .
So far I've used them to create Media plugin, custom directshow filters.
These things are very difficult to work with in .NET.
|
|
|
|
|
I agree PInvoke works fine, I could convert entire MFC project of various types into a dll that is called from C#, nevertheless I thought C++/CLI is more convenient.
Now, with new "feature" of VS 2010, I use 3 instances of Visual Studio: one 2008 with the same C++CLI project, another 2010 with dummy C# project and my C++CLI project on VS 2010. This allows me use intellisense from C++ on 2008 and for new APis from C# on 2010 when I need to write code in C++ on 2010.
It is a big fun and very convenient - thanks to Microsoft!
|
|
|
|
|
Member 617025 wrote: It is a big fun and very convenient
Not bad
|
|
|
|
|
Rama Krishna Vavilala wrote: a) Other Interop technologies such as COM Interop and PInvoke are better and easier to manage.
Ok, I gotta ask, since every time I use it it chews up way too much time and leaves me feeling dirty all over: what's your trick to using P/Invoke without descending into the depths of paranoid madness wondering if you got some subtle alignment or calling convention wrong and won't realize it 'till your app hits the field?
I will agree that COM Interop is pretty painless though, provided you're ok limiting yourself to simple interfaces and automation datatypes.
|
|
|
|
|
Shog9 wrote: what's your trick to using P/Invoke
Keep it to minimal use and simple functions.
I use 85% COM Interop, 10% C++/CLI (just because I was mostly doing C++) and 5% PInvoke.
|
|
|
|
|
Micro$oft still doesn't get it.
There are two ways you can move the programming world:
1 - by giving, such as adding C#
2 - by taking, such as making something else more difficult or taking it away
Method 1 can be used with success, C# being a deliberate example.
As for Method 2?
You'd think that even they would have figured out, after the colossal failure of Vista, that people can and do 'just say no'. If the regular rabble are willing to turn around and ignore their upgrade, surely they could have guessed that developer will, too.
My wisdom not being at the same lofty level as theirs, I can only assume that they think there's some reason for a C++ programmer to overspend on VS2010 if they don't want to even use the CLI.
So, now, once again, they have to undo their damage.
Luckily, for many of us, we've also adapted to another Micro$oft favorite: don't install anything until the first few service packs have been released.
Behold, Micro$oft. I Stand Facing East In Order That I May Fart in Your General Direction.
/xml> "The difference between genius and stupidity is that genius has its limits." - Albert Einstein
| "As far as we know, our computer has never had an undetected error." - Weisert
| "If you are searching for perfection in others, then you seek dissappointment. If you are searching for perfection in yourself, then you seek failure." - Balboos HaGadol Mar 2010
|
|
|
|
|
|
Can't help but fully agree (unfortunately!) - installed 2010, tried it, then uninstalled it. Its unstable and dosent compile 2008 C++ projects, sort of the Vista of the IDE world. Maybe this is the project were Vista developers are retired to
Lets hope the service packs are better than those for Vista....
|
|
|
|
|
Balboos wrote: 2 - by taking, such as making something else more difficult or taking it away
True, but in the case of C++/CLI there's nothing else out there that supports it so MS need not worry.
As a general strategy, though, removing features is always annoying and leaves a bad taste. IIRC, MS's original announcement gave the impression that this was permanent but then they backtracked and decided they would bring it back in at some stage?
Kevin
|
|
|
|
|
Is this only for c++/cli or does it effect real c++ as well?
|
|
|
|
|
AFAIK Microsoft dumped their crappy IntelliSense implementation for C++ and built a new one on top of the EDG[^] C++ parser.
So the effect is: IntelliSense for real C++ got better; but support for C++/CLI got removed.
|
|
|
|
|
That is fine with me. In either case I use visual assist. But then again it will be at least a year before I use visual studio 2010. I don't get my disks till the annual license renewal in fall and I pretty much require a service pack to be released before using a new Microsoft compiler.
John
|
|
|
|
|
Does anyone even use c++/CLI?
Wouldn't you just be better off using c# if you want that sort of thing?
|
|
|
|
|
ed welch wrote: Wouldn't you just be better off using c# if you want that sort of thing?
Depends on what "that sort of thing" is
If you want to develop .NET applications from scratch, you'd do yourself a favor if you picked C# rather than C++/CLI.
On the other hand, if you need to expose some existing C++ deep hierarchy of classes to the managed world, C# won't help you there, and that's pretty much the use case for C++/CLI.
I was doing that sort of programming a lot some 6 years ago with old Managed Extensions for C++.
|
|
|
|
|
intellisense for C++ is a little slow, but hey, c++ is complex!
d{^__^}b - it's time to fly
|
|
|
|