|
hi all
my question is that can we typecast the directshow filter?
if yes how i typecast the IUnknown filter to IBaseFilter?
pls help me
|
|
|
|
|
raj1576 wrote: my question is that can we typecast the directshow filter?
Why?
raj1576 wrote:
if yes how i typecast the IUnknown filter to IBaseFilter?
Why don't you use the mechanism COM provides for, i.e. QueryInterface ?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
thanks pallini for reply
Because I am getting the value from the IUnknown filter from the gmfbridge and now i want to connect the manually graph so that I have to use typecast this IUnknown filter to the IBaseFilter.
|
|
|
|
|
Your question is unclear, to say the least. I can't make head or tail out of it. Can you explain more clearly?
Steve
|
|
|
|
|
I am using gmfbridge to play the clips
hr = pController->CreateSourceGraph(wFilter, m_pGraph, &m_pSinkFilter);
where m_pSinkFilter is the IUnknown type. If I want to GetPin of this m_pSinkFilter then this function wants the IBaseFilter type.
GetPin((IBaseFilter*)&m_pSinkFilter, PINDIR_OUTPUT);
Is this possible
|
|
|
|
|
raj1576 wrote: GetPin((IBaseFilter*)&m_pSinkFilter, PINDIR_OUTPUT);
Is this possible
What happens when you try it?
|
|
|
|
|
|
The better thing is..
IBaseFilter *pFilter = 0;
HRESULT hr;
hr = m_pSinkFilter->QueryInterace(IID_IBaseFilter, (void**)&pFilter);
if(SUCCEEDED(hr))
{
}
Cool_Dev
=======
|
|
|
|
|
raj1576 wrote: GetPin((IBaseFilter*)&m_pSinkFilter, PINDIR_OUTPUT);
That looks wrong, since m_pSinkFilter is already a pointer to an interface, you should write
GetPin((IBaseFilter*)m_pSinkFilter, PINDIR_OUTPUT)
(i.e. remove the address-of operator).
In any case, what is the purpose of bypassing the COM QueryInterface mechanism? Why don't you use m_pSinkFilter to QueryInterface for IBaseFilter ?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Now I am doing this like as
hr = pController->CreateSourceGraph(wFilter, m_pGraph, &m_pSinkFilter);
hr = m_pSinkFilter->QueryInterface(IID_IBaseFilter, (void**)&FileSource);
if(SUCCEEDED(hr))
{
hr = ConnectFilters(m_pGraph,FileSource,mxfparser);
if(FAILED(hr))
{
MessageBoxA(NULL,"failed to connect","",NULL);
}
}
But Here now connectFilters Failed.
|
|
|
|
|
Hi,
I am an experienced programmer in Linux, but new to Windows.
I want to develop windows XP driver for a PCI based device.
Also, I want to write a device capability Demonstration application.
I am free to select Visual Studio 6.0 to Visual Studio 2008.
1. Is it a good decision to do the Demo Application development in VC++ Dot-Net, and Driver Development in Non-Dot net environment?
2.Which version of Visual studio is suitable for me, considering the future usefulness of the technical knowledge I am acquiring.
3.Please suggest some good books for Windows XP Driver Development.
Thank You very Much
Jacob
|
|
|
|
|
TechAvtar wrote: 1. Is it a good decision to do the Demo Application development in VC++ Dot-Net, and Driver Development in Non-Dot net environment?
IMHO yes.
TechAvtar wrote: 2.Which version of Visual studio is suitable for me, considering the future usefulness of the technical knowledge I am acquiring.
The latest one.
TechAvtar wrote: 3.Please suggest some good books for Windows XP Driver Development.
Sorry, I don't know.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
TechAvtar wrote: 3.Please suggest some good books for Windows XP Driver Development.
Take a look here[^], lots to choose from.
|
|
|
|
|
Hi Guys,
Do we have any unicode equivalent to this _chdrive function?
I made my application unicode supporting one. previously it was working fine but now it is not working and application is crashing.
Previously it was having the value of 28 but now the value is 35. Why is it so?
code snippet:
----------------------
_chdrive(theApp.m_Dir[0]-'A'+1);
-------------------------------------------------
can anyone shed some light on this issue?
Thanks,
Rakesh.
|
|
|
|
|
Rakesh5 wrote: Do we have any unicode equivalent to this _chdrive function?
_chdrive is completely independent of UNICODE, since it accepts an integer as argument (and not a string).
Rakesh5 wrote: Previously it was having the value of 28 but now the value is 35.
Which value are you talking about ? The return value of _chdrive ? That's impossible since it returns either 0 or 1.
Please clarify your question...
|
|
|
|
|
Hi,thanks for the reply...
int a = theApp.m_Dir[0]-'A'+1 ;
Can you please tell me what is the logic behind using 'A' + 1 ;
Can you help me??
Thanks,
Rakesh.
|
|
|
|
|
Rakesh5 wrote: Can you please tell me what is the logic behind using 'A' + 1 ;
You wrote the code but you don't understand what you wrote ??
Anyway, you are taking the first letter of the m_Dir string (which is probably a drive letter) and substracting the value of 'A'. This is because the letter 'A' has a specific ASCII code (which is not 1) but the A drive should be 1. Then you are incrementing the drive number by 1.
|
|
|
|
|
actually i did not write the code..my seniors have written.. am trying to learn what they have used ..
anyway thanks alot for your help...
rakesh.
|
|
|
|
|
Rakesh5 wrote: actually i did not write the code..my seniors have written.. am trying to learn what they have used ..
So use the debugger to see what the value of a is.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
finding prime nos. with an algo having time complexity of O(n)???
|
|
|
|
|
This sounds like a very good question for Google.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi,
I would like to know if there are any ways to programmatically detect or monitor the file or folder being copied either by copy command(like on command prompt-- copy a b) or by using drag/drop(ctrl+c and ctr+v).
It would be helpful if you could give some pointers( preferably some APIs in vc++)
thanks and regards
Dinakara K
Dinakara K
CAIR, Bangalore
|
|
|
|
|
You would probably need a File System Filter Driver for this.
Not a very easy task.
Look at the FileSpy sample in the Windows Driver Kit (WDK).
|
|
|
|
|
Thanks for the quick reply.I will look at FileSpy.....
Dinakara K
CAIR, Bangalore
|
|
|
|
|
I want to build an application with publish/subscribe model for UDP communication for a real time simulation system. I'm new to this communication model and need to know much about the publish/subscribe model. We are using the Client/Server model for the communication. Where can I get some details about this model and what is the middleware I should be using.
Thanks
Vijeesh T
|
|
|
|