NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 63 64 65 66 67 … 93 Next »
Using C++

 
  • 0 Vote(s) - 0 Average
Using C++
acheyne
Offline

Member

Posts: 81
Threads: 20
Joined: Dec 2005
#1
2005-12-22, 02:36 PM
Just a quick question about plugin development. Is there a document anywhere that describes doing plugin development with C++ instead of C#? I'm just curious to see what hoops you have to jump through or if someone has already written a bridge library.

If no one has written a bridge library that takes care of the C# to C++ bridging, are there others who would be interested besides me?

Andrew
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,677
Threads: 767
Joined: Nov 2003
#2
2005-12-22, 03:43 PM
There is no document that describes this, but you shouldnt have to jump through any hoops to get it to work. Visual C++ is quite capable of make .net DLLs, with it's built in support for managed C++.

You'll have to find the language specific way to add a reference to GBPVRPublic.dll, then make a class that implements the IMenuTask interface. Have the project compile to a DLL, then drop the DLL in the GB-PVR 'plugins' directory.

Quote:If no one has written a bridge library that takes care of the C# to C++ bridging, are there others who would be interested besides me?
You wont need anything messy like that.
acheyne
Offline

Member

Posts: 81
Threads: 20
Joined: Dec 2005
#3
2005-12-22, 04:39 PM
I'll take a look. I haven't really used .NET yet and had assumed that the relationship from C# to C++ was similar to Java and JNI. I've actually been looking for a reason to tackle some C# coding anyway, so I doubt I'll ever get around to messing around with this anyway.

Cheers,
Andrew
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,677
Threads: 767
Joined: Nov 2003
#4
2005-12-22, 04:50 PM
Quote:I haven't really used .NET yet and had assumed that the relationship from C# to C++ was similar to Java and JNI.
No, its actually pretty clean. Big chunks of GB-PVR is written as managed C++, which BTW is pretty much identical to normal C++ from a coding perspective. I can easily use C++ classes from C#, exactly as I would use a C# class. There is no ugly glue layer required. Microsoft has done a really good job with this stuff.
acheyne
Offline

Member

Posts: 81
Threads: 20
Joined: Dec 2005
#5
2005-12-23, 01:43 PM
I'm beginning to see that. I've already created a plugin in C# that uses the iTunes COM library to control iTunes. It's pretty powerful and quick. None of the CoCreateInstance() crap that I'm used to whenever having to deal with COM previously and none of the loops I've had to jump through with Java in the past to get it to do platform dependant tasks.

In my day job, I'm always developing cross-platform code (mostly Windows - OSX), so it's nice to do anything that doesn't have to jump through hoops to work.

Andrew
acheyne
Offline

Member

Posts: 81
Threads: 20
Joined: Dec 2005
#6
2005-12-23, 01:44 PM
PS: Nice job on the plugin SDK interface, btw. Simple and easy to implement. Using the tutorial I found that shows how to build a simple Hello World plugin, I was up and going in a few minutes.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode