|
One thing you still didn't understand is that a line like as follow is completely wrong !!
codec=(AVCodec *)p3
Basically, p3 is a pointer to a function. The (AVCodec *) in front of it specifies that the pointer must in fact be interpreted as a pointer to a AVCodec structure. Which of course completely false. Please, take care of what I said previously !
If this function returns an AVCode pointer, then you should do this instead:
HMODULE hDll3 = LoadLibrary("avcodec.dll");
typedef (AVCode*)(avcodec_find_encoder)(int CODECID);
avcodec_find_encoder* p3 = (avcodec_find_encoder*)GetProcAddress(hDll3, "avcodec_find_encoder");
if(p3==NULL)
AfxMessageBox("Failed loading3");
p3(CODEC_ID_MPEG1VIDEO);
if(p3==NULL)
AfxMessageBox("Failed loading3");
AVCodec* codec = p3(...);
Also, note that in the typedef, you specified that this function receive a integer parameter, so of course you need to supply it also (note the ... in the function call).
Next, I repeat it once again: don't call LoadLibrary multiple times for the same library, this is useless. And don't forget to call FreeLibrary after it.
For this:
RahulOP wrote: p2((AVCodecContext *)p4,(AVCodec*)p3);
This is the same as above: you cannot cast pointer to functions this way !!. What you need to do, is call p4 (and store the result somewhere, then call p3 and store the result somewhere and finally, call p2 and giving the previous results):
AVCodecContext* pContext = p4();
AVCoded* pCoded = p3(...);
p2(pContext,pCoded);
If you have problems, please update all the code with the remarks I explained here before posting another question (otherwise, I will correct the same things over and over again). If you don't understand something, ask for more information (instead of blindly copy/pasting).
Hope this helps
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
Thanks!! Helps a lot!!
codec=(AVCodec *)p3 is sheer stupidity since that is the only line i wrote that way. Everything else I did exactly the way you told me.
Will be posting my complete code as soon as I iron out the bugs
|
|
|
|
|
Can you e-mail me the files? DejaVuNic -at- Gmail I'll try it a try.
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[ ]--
[My Current Status]
|
|
|
|
|
|
|
|
|
See Here[^]and Here[^] maybe it is some helpful to you
whitesky
|
|
|
|
|
|
angelfirefox wrote: [Message Deleted]
[Click for User Profile] angelfirefox
you are in now Tox "NO" List!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
How to show gif in CRichEditCtrl not using third dll?
And How to change text color when inputting #G show Green Text to next # or end ?
#R Tom# says: #G Hello,#R everyone.
And when i click tom,get charactor t-o-m.
Just like a chatboard.
-- modified at 2:03 Wednesday 14th June, 2006
|
|
|
|
|
Is there any way to set where a file begins (like SetEndOfFile except that it sets the beginning of the file)? I have a situation where I need to make files smaller by deleting data from the beginning, and reading and writing all the data is very inefficient.
Thanks
|
|
|
|
|
|
_johan wrote: s there any way to set where a file begins (like SetEndOfFile except that it sets the beginning of the file)? I have a situation where I need to make files smaller by deleting data from the beginning, and reading and writing all the data is very inefficient.
I think there is no such way/method to set begins of the file.
But you can maintain your delimiter for the begining of data/file.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
All right. Thanks for the quick responses
|
|
|
|
|
hello
I have a code with VC++ which print on console,I want to show the output in listbox of MS Visual C++ windows forms appl(.NET) .could u plz tell me the solution.
Yogesh Talokar
|
|
|
|
|
The first thing about this is that you should be knowing how to handle unmanaged code from the managed code.
Second issue: Is it possible to change your application from Console to Windows Forms.
You will have to write the entire logic again if you want to do it in windows forms
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
hello
could u plz tell me how to handle unmanaged code from the managed code.
Yogesh_T
|
|
|
|
|
it's one of the difficult things to achieve but it's easier than the other way round.
Here[^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Craete the Windows form application. Then place the ListBox on the form.
Now where you are printing to conmsole pass these values to you listbox control.
Cheers
"Peace of mind through Technology"
|
|
|
|
|
Yogesh wrote: have a code with VC++ which print on console,I want to show the output in listbox of MS Visual C++ windows forms appl(.NET) .could u plz tell me the solution.
Create new GUI based application,
add List box on it,
create Control variable of list box,
use Methods of the Control variable to insert the data into list box.
There may be other solution for this
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Hi All,
I am working on VC++ (exe dialog application).. I have loaded the xml file using DOM i;e using a pointer to IXMLDOMDocument and calling the load() function of it. Can I know if there are any built in function or any other alternatives to find the size of the DOM ,before and after loading the xml file??
|
|
|
|
|
|
Thanks for the idea. But since I am new to VC++ and DOM ..Can you please clarify me on these
I got to use the syntax to be as
HRESULT getProperty(BSTR name, VARIANT* value);
but what does the "BSTR name" indicate here..
|
|
|
|
|
myvisualcplusplus wrote: ut what does the "BSTR name" indicate here..
name indicates the name of the property of which you will get the value
value indicates the parameter which receives the property value.
Knock out 't' from can't,
You can if you think you can
|
|
|
|