Click here to Skip to main content
15,908,115 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: new / delete : when to delted in this regard, Pin
Rajasekharan Vengalil12-Jan-09 2:01
Rajasekharan Vengalil12-Jan-09 2:01 
GeneralRe: new / delete : when to delted in this regard, Pin
ptr_Electron12-Jan-09 2:10
ptr_Electron12-Jan-09 2:10 
GeneralRe: new / delete : when to delted in this regard, Pin
Cedric Moonen12-Jan-09 2:14
Cedric Moonen12-Jan-09 2:14 
GeneralRe: new / delete : when to delted in this regard, Pin
ptr_Electron12-Jan-09 2:15
ptr_Electron12-Jan-09 2:15 
GeneralRe: new / delete : when to delted in this regard, Pin
Cedric Moonen12-Jan-09 2:26
Cedric Moonen12-Jan-09 2:26 
QuestionXP or Vista style progressbar. Pin
Le@rner12-Jan-09 1:37
Le@rner12-Jan-09 1:37 
QuestionRe: XP or Vista style progressbar. Pin
David Crow12-Jan-09 3:08
David Crow12-Jan-09 3:08 
QuestionMixing managed/unmanaged in C++/CLI Pin
Jon Hulatt12-Jan-09 1:22
Jon Hulatt12-Jan-09 1:22 
I have a legacy C app which uses FFmpeg APIs.

I'm trying to update it, I want to write a UI in C# and keep the core in C.

So, i'm dabbling in C++/CLI for the first time.

It's my understanding that I can create a managed class wrapper, and have managed methods which take managed parameters, convert them as necessary to unmanaged equivalents (with System.Runtime.InteropServices.Marshal methods), do the work in native C, and then convert outputs from unmanaged to managed types for return.

However, I'm stuck at the start. I've created a class like this:-

ref class FFmpegCap
{
public:
	FFmpegCap(String^ inputVideo);

protected:
	AVFormatContext *m_pFormatContext;
					
};


In my constructor, i need to call a C FFmpeg function to initialise the library, one of the parameters it requires is of type AVFormatContext ** . So, I call this function as follows:-

    if (av_open_input_file(&m_pFormatContext, pInputVideo ,NULL,0,NULL) != 0)
{

}


However, this fails to compile; error C2664: 'av_open_input_file' : cannot convert parameter 1 from 'cli::interior_ptr<type>' to 'AVFormatContext **'

It seems that the & operator is not doing what I expect of it!

Any pointers?

Thanks

Jon

using System.Beer;

NewsRe: Mixing managed/unmanaged in C++/CLI Pin
Iain Clarke, Warrior Programmer12-Jan-09 1:32
Iain Clarke, Warrior Programmer12-Jan-09 1:32 
GeneralRe: Mixing managed/unmanaged in C++/CLI Pin
Jon Hulatt12-Jan-09 1:37
Jon Hulatt12-Jan-09 1:37 
QuestionDialog box LAYOUTRTL issue [modified] Pin
Alex@9C12-Jan-09 1:13
Alex@9C12-Jan-09 1:13 
QuestionGerman ANSI/Unicode umlauts in source code [SOLVED] Pin
sashoalm12-Jan-09 0:59
sashoalm12-Jan-09 0:59 
AnswerRe: German ANSI/Unicode umlauts in source code Pin
Iain Clarke, Warrior Programmer12-Jan-09 1:31
Iain Clarke, Warrior Programmer12-Jan-09 1:31 
GeneralRe: German ANSI/Unicode umlauts in source code Pin
sashoalm12-Jan-09 4:08
sashoalm12-Jan-09 4:08 
QuestionProblems with sending UPD Packets over sendto Pin
CrazyDogg11-Jan-09 23:59
CrazyDogg11-Jan-09 23:59 
AnswerRe: Problems with sending UPD Packets over sendto Pin
Rajkumar R12-Jan-09 0:08
Rajkumar R12-Jan-09 0:08 
GeneralRe: Problems with sending UPD Packets over sendto Pin
CrazyDogg12-Jan-09 0:17
CrazyDogg12-Jan-09 0:17 
AnswerRe: Problems with sending UPD Packets over sendto Pin
Stuart Dootson12-Jan-09 0:11
professionalStuart Dootson12-Jan-09 0:11 
GeneralRe: Problems with sending UPD Packets over sendto Pin
CrazyDogg12-Jan-09 0:18
CrazyDogg12-Jan-09 0:18 
GeneralRe: Problems with sending UPD Packets over sendto Pin
David Crow12-Jan-09 3:11
David Crow12-Jan-09 3:11 
GeneralRe: Problems with sending UPD Packets over sendto Pin
CrazyDogg12-Jan-09 3:41
CrazyDogg12-Jan-09 3:41 
GeneralRe: Problems with sending UPD Packets over sendto Pin
David Crow12-Jan-09 3:45
David Crow12-Jan-09 3:45 
GeneralRe: Problems with sending UPD Packets over sendto Pin
CrazyDogg12-Jan-09 3:48
CrazyDogg12-Jan-09 3:48 
QuestionWhy does ConnectEx need a bound socket? Pin
followait11-Jan-09 23:32
followait11-Jan-09 23:32 
AnswerRe: Why does ConnectEx need a bound socket? Pin
Stuart Dootson12-Jan-09 0:01
professionalStuart Dootson12-Jan-09 0:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.