Go Back   Club CDFreaks - Knowledge is Power > International Chat: Software related > Nero SDK Discussion Forum


Commercial message



Nero SDK Discussion Forum Discuss, NeroVisionAPI sample c# program at International Chat: Software related forum; Hi, Is there any examples of creating a DVD viideo disk using C# and NeroVisionAPI?. Cheers Mick


Reply
 
Thread Tools
Old 15-01-2005   #1 (permalink)
New on Forum
 
Join Date: Jan 2005
Posts: 7
NeroVisionAPI sample c# program

Hi,

Is there any examples of creating a DVD viideo disk using C# and NeroVisionAPI?.

Cheers

Mick
MickWall is offline   Reply With Quote
Old 16-01-2005   #2 (permalink)
New on Forum
 
Join Date: Jan 2005
Posts: 7
Re: NeroVisionAPI sample c# program

Ok, So i've been playing a bit but not got too far and only have even more questions!

I can see that I can the following statements to allow me to start using some of the API's

using NeroVisionAPI;
using NEROLib;


and then

NEROLib.NeroClass neroAPI = new NEROLib.NeroClass();

...Do stuff with Nero...

neroProj.SetXMLString("some xml");
NeroVisionAPI.INeroBurnContext context;
neroProj.CreateNeroBurnContext(neroAPI,null,out context);

The problem I have is that the CreateNeroBurnContext need a handle to the neroAPI dll! - in the old days this would have been a loadlibrary or something - but I am new to c# and don't know where to get this from.

Also in the c++ example it tals about a glue library - do I need to use this?.

Perhaps someone could get me started - please.

Cheers


Mick
MickWall is offline   Reply With Quote
Old 17-01-2005   #3 (permalink)
New on Forum
 
Join Date: Jan 2005
Posts: 8
Re: NeroVisionAPI sample c# program

Hey Mick,

I've been doing a similar thing in trying to use Nero Vision from .net. The best way is to create a wrapper in c++ using Nero Vision/Nero API, then use that in c#.

To use the NeroVision api, it needs to be linked with static libraries, which can only be done in c++. I dont think that Nero Vision COM library is meant to be used.
danielr is offline   Reply With Quote
Old 18-01-2005   #4 (permalink)
New on Forum
 
Join Date: Jan 2005
Posts: 7
Re: NeroVisionAPI sample c# program

Thanks for the reply - I am OK at C++ but really new to this .NET stuff!, any chance you could post some or all of your 'wrapper' class file so I can see the sort of thing that needs to be done.

Thanks

Mick
MickWall is offline   Reply With Quote
Old 21-01-2005   #5 (permalink)
New on Forum
 
Join Date: Jan 2005
Posts: 7
Re: NeroVisionAPI sample c# program

Can no one help me here?

Someone must have this working, so please could a small code snippet be posted just to get me started.

Thanks a lot.

Mick
MickWall is offline   Reply With Quote
Old 21-01-2005   #6 (permalink)
Nero Developer
 
Join Date: Oct 2003
Posts: 605
NeroVisionAPI is meant to be used along with NeroAPI. There is no official way to use along with NeroCOM. This will surely be fixed soon.
alexp is offline   Reply With Quote
Old 22-01-2005   #7 (permalink)
New on Forum
 
Join Date: Jan 2005
Posts: 7
Re: NeroVisionAPI sample c# program

Quote:
Originally Posted by alexp
NeroVisionAPI is meant to be used along with NeroAPI. There is no official way to use along with NeroCOM. This will surely be fixed soon.

Lets hope so...
MickWall is offline   Reply With Quote
Old 25-01-2005   #8 (permalink)
New on Forum
 
Join Date: Jan 2005
Posts: 8
Re: NeroVisionAPI sample c# program

Mick,

There is a sample NeroVision c++ project in the SDK.

All you need to do is use that as a starting point. Then you need to decide wether to do a Managed c++ dll or un-managed c++ dll to use in .net. I wasn't too familiar with the pro and cons of doing something like this in managed c++, so i went for the un-managed path.

A managed c++ dll is a typicaly .net assembly which uses the .net framework and is used by adding a reference to it in c#.

An un-managed c++ dll can only be used using the interop "DLLImport" attribute. Since you cannot use un-managed c++ classes (unless its a com object) using DllImport, you must create a c style function library and declare you functions with the "extern" keyword to use from .net, such as.

Code:
extern "C" __declspec(dllexport) void EjectDrive()
Then use them c# like this:
Code:
		
[DllImport("your-unmanaged-library.dll")]
private static extern void EjectDrive();
Whichever method you choose, you need to link your c++ project with the NeroApiGlue libraries. See the sample NeroVision project.
danielr is offline   Reply With Quote
Old 25-01-2005   #9 (permalink)
New on Forum
 
Join Date: Jan 2005
Posts: 7
Re: NeroVisionAPI sample c# program

OK things are moving...

I have the following code

NeroVisionAPI.Project neroProj = new Project();
NeroVisionAPI.INeroBurnContext context;
try
{
neroProj.SetXMLFile("c:\\nerotext.xml");

//Ok lets get a drive
NEROLib.NeroDrives availDrives = neroAPI.GetDrives(NEROLib.NERO_MEDIA_TYPE.NERO_MEDIA_DVD_M);
NEROLib.INeroDrive drive = availDrives.Item(1);
// drive.
long size=0;
neroProj.EstimateDiskSize(out size);

double seconds=0;
neroProj.EstimateCreateNeroBurnContextTime(null, out seconds);

System.IntPtr handle = getNeroModuleHandle();

if (neroProj.CreateNeroBurnContext(handle,null,out context))
{
string strText = "Context created";
}


This is all working!, I have created an un managed DLL that defines the getNeroModuleHandle and this is OK.

As far as I can see I now need to call NeroBurn!, this does not seem to be available from a NEROLib.INeroDrive object. Am I completely off track here?

Mick
MickWall is offline   Reply With Quote
Old 26-01-2005   #10 (permalink)
Nero Developer
 
Join Date: Oct 2003
Posts: 605
Quote:
As far as I can see I now need to call NeroBurn!, this does not seem to be available from a NEROLib.INeroDrive object. Am I completely off track here?
Yes you are, unfortunately. As I have previously posted, you cannot currently do this. This will probably be changed in the upcoming release.
alexp is offline   Reply With Quote
Old 26-01-2005   #11 (permalink)
New on Forum
 
Join Date: Jan 2005
Posts: 7
Re: NeroVisionAPI sample c# program

OK. Thanks, I'll hang on for that then, any ETA that we know of?.

Regards

Mick
MickWall is offline   Reply With Quote
Old 27-01-2005   #12 (permalink)
Nero Developer
 
Join Date: Oct 2003
Posts: 605
No, sorry. Nothing specific. The upcoming release is the best I can say.
alexp is offline   Reply With Quote
Old 01-02-2007   #13 (permalink)
New on Forum
 
Join Date: Feb 2007
Posts: 11
Re: NeroVisionAPI sample c# program

Quote:
Originally Posted by MickWall
OK things are moving...

I have the following code

NeroVisionAPI.Project neroProj = new Project();
NeroVisionAPI.INeroBurnContext context;
try
{
neroProj.SetXMLFile("c:\\nerotext.xml");

//Ok lets get a drive
NEROLib.NeroDrives availDrives = neroAPI.GetDrives(NEROLib.NERO_MEDIA_TYPE.NERO_MEDIA_DVD_M);
NEROLib.INeroDrive drive = availDrives.Item(1);
// drive.
long size=0;
neroProj.EstimateDiskSize(out size);

double seconds=0;
neroProj.EstimateCreateNeroBurnContextTime(null, out seconds);

System.IntPtr handle = getNeroModuleHandle();

if (neroProj.CreateNeroBurnContext(handle,null,out context))
{
string strText = "Context created";
}


This is all working!, I have created an un managed DLL that defines the getNeroModuleHandle and this is OK.

As far as I can see I now need to call NeroBurn!, this does not seem to be available from a NEROLib.INeroDrive object. Am I completely off track here?

Mick

Can you share a little more light on the method getNeroModuleHandle();
devconx is offline   Reply With Quote
 
Reply


If you can't find where you are looking for, then become a member and get an answer fast! We have thousands of people online every moment of the day to help you! Click here



Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
NeroVisionApi mjmim Nero SDK Discussion Forum 1 17-08-2007 22:24
NeroVisionApi mjmim Nero SDK Discussion Forum 0 11-04-2007 13:22
NeroVisionApi mjmim Nero SDK Discussion Forum 3 01-04-2007 17:37
NeroVisionApi.dll Duke Nukem Nero SDK Discussion Forum 0 07-07-2006 16:06
VB Sample Project for NeroVisionAPI raghav2000 Nero SDK Discussion Forum 1 05-08-2004 16:45


All times are GMT +2. The time now is 17:44.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0