Click here to Skip to main content
15,892,746 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
AnswerRe: The c# 'using' statement in managed c++ Pin
Mark Salsbery13-Jan-09 11:09
Mark Salsbery13-Jan-09 11:09 
Questionthread deadlock Pin
staticv12-Jan-09 5:02
staticv12-Jan-09 5:02 
GeneralRe: thread deadlock Pin
Luc Pattyn12-Jan-09 6:50
sitebuilderLuc Pattyn12-Jan-09 6:50 
GeneralRe: thread deadlock [modified] Pin
staticv12-Jan-09 23:29
staticv12-Jan-09 23:29 
GeneralRe: thread deadlock Pin
Luc Pattyn13-Jan-09 2:44
sitebuilderLuc Pattyn13-Jan-09 2:44 
GeneralRe: thread deadlock Pin
staticv13-Jan-09 2:59
staticv13-Jan-09 2:59 
GeneralRe: thread deadlock Pin
Luc Pattyn13-Jan-09 3:06
sitebuilderLuc Pattyn13-Jan-09 3:06 
QuestionMixing managed/unmanaged in C++/CLI Pin
Jon Hulatt12-Jan-09 1:38
Jon Hulatt12-Jan-09 1:38 
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;

AnswerRe: Mixing managed/unmanaged in C++/CLI Pin
N a v a n e e t h12-Jan-09 1:47
N a v a n e e t h12-Jan-09 1:47 
GeneralRe: Mixing managed/unmanaged in C++/CLI Pin
Jon Hulatt12-Jan-09 1:49
Jon Hulatt12-Jan-09 1:49 
GeneralRe: Mixing managed/unmanaged in C++/CLI Pin
N a v a n e e t h12-Jan-09 2:08
N a v a n e e t h12-Jan-09 2:08 
AnswerRe: Mixing managed/unmanaged in C++/CLI Pin
teejayem12-Jan-09 9:28
teejayem12-Jan-09 9:28 
Questionthread.Abort() Pin
staticv12-Jan-09 0:53
staticv12-Jan-09 0:53 
AnswerRe: thread.Abort() [modified] Pin
N a v a n e e t h12-Jan-09 2:17
N a v a n e e t h12-Jan-09 2:17 
GeneralRe: thread.Abort() Pin
staticv12-Jan-09 2:44
staticv12-Jan-09 2:44 
GeneralRe: thread.Abort() Pin
N a v a n e e t h12-Jan-09 2:56
N a v a n e e t h12-Jan-09 2:56 
GeneralRe: thread.Abort() Pin
staticv12-Jan-09 2:58
staticv12-Jan-09 2:58 
GeneralRe: thread.Abort() Pin
N a v a n e e t h12-Jan-09 3:11
N a v a n e e t h12-Jan-09 3:11 
QuestionProblem about the visual 2008 c++ Pin
sai5611-Jan-09 21:39
sai5611-Jan-09 21:39 
QuestionVC++ event handling in ManagedC++ Pin
BicycleTheif9-Jan-09 18:23
BicycleTheif9-Jan-09 18:23 
QuestionHow can I include iframe to VC++? Pin
Azhar Rahi9-Jan-09 6:55
Azhar Rahi9-Jan-09 6:55 
AnswerRe: How can I include iframe to VC++? Pin
Aman Bhullar11-Jan-09 4:11
Aman Bhullar11-Jan-09 4:11 
GeneralRe: How can I include iframe to VC++? [modified] Pin
Azhar Rahi11-Jan-09 9:49
Azhar Rahi11-Jan-09 9:49 
QuestionNeed help for directory search in C++ Pin
Thilek8-Jan-09 5:35
Thilek8-Jan-09 5:35 
AnswerRe: Need help for directory search in C++ Pin
George L. Jackson8-Jan-09 6:27
George L. Jackson8-Jan-09 6:27 

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.