|
I'm trying to find a solution to a little problem that involves being able to decode any type of media and save it into a wave-file.
Of course, this is done through DirectShow. I've actually tried this, but it doesn't seem to work.
I have a simple AVI-source, which I convert to matroska using mkvmerge.
Anyway, the file contains a video tracks and a audio track (MP3).
So I use Haali's Media Splitter, FFDShow, WavDest and File Writer, in that order. But the output audio file seems corrupted since it won't play!
Connecting an audio rendered after FFDShow plays the audio perfectly fine and clear.
I have no idea what can be wrong here, so if anyone has any idea or an alternative suggestion, please indulge me.
Thanks.
|
|
|
|
|
Hi,
During the setup of my application (using wise installation system) I am installing several files to c:\ProgramData.
During the runtime of the application I have to make changes to the content of those files - however for some reason it can be done only if I run the application as administrator.
Strangley though if I delete those files and install them again - this time not as an administrator - the problem disappear. However those files must be installed during the application setup (which runs with administrator priviliges)
I will appriciate any comments regarding this issue.
Eran
|
|
|
|
|
You are creating the files as an administrator but trying to modify the content as a normal user?
Under Vista's file security scheme, each file/folder is assigned an ACL, from your installer you need to make sure that you add users to the ACL's as the default would be for administrators. Luckily, vista has a tool to do this for you, "icacls.exe".
I will leave you to find out how to use it.
Waldermort
|
|
|
|
|
Thanks Waldermort, you have been a great help!
|
|
|
|
|
Sorry for distrubing all.
i have to create communication Between modem and Pc through RS-232.
1)i created a port along with activeX(microsoft Communication control, version 6.0)control.it works well and opened the serial port.
2)my dialoge box is having all port configaration controls(like hyperterminal) and after that two edit boxes one for commands to modem,after that submit button.
next there will edit box for responces for Modem.
3)iam not able to create thread for communication b/w pc and modem. which fuctions i have to call.pls anybody help
4)iam successfully completed the communication B/w two sys by RS-232 port.
here is the thread where i used in Communication b/w in two sys
<code>
UINT ReaderThread(LPVOID lParam)
{
CString strCount;
VARIANT vtResult;
CString str,str1;
CSerialcomDlg* m_wnd = (CSerialcomDlg*)lParam;
while(1)
{
int nCount = m_wnd->m_CommControl.GetInBufferCount();
if(nCount > 0)
{
strCount.Format("%d",nCount);
for(int i = 0; i< nCount;i++)
{
vtResult = m_wnd->m_CommControl.GetInput();
str.Format("%s",(LPCSTR)(_bstr_t)vtResult);
str1 = str;
}
m_wnd->m_edtrecvdata.SetWindowText(str1);
}
}
return TRUE;
}
</code>
|
|
|
|
|
I suggest using the search[^] page here on Code Project, and enter 'serial' as the keyword.
Software Zen: delete this;
|
|
|
|
|
krishna Vuppala wrote: 3)iam not able to create thread for communication b/w pc and modem. which fuctions i have to call.
To get started with multithreading and avoid common pitfalls, read this[^]. In my opinion the very best starting point for multithreading.
When you've read the article above and understood it, you'll face a new problem: since you're using an ActiveX control and want to access it from different threads, you need to know how to cross apartment boundaries the right way using marshalling. Read Lim Bio Liong's excellent article series starting here[^].
Writing the serial communication part by yourself, not using the MSComm control, isn't that hard really.
Have a look at Joe Newcomer's article here[^].
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Dear All
In one multi threaded program an unknown bug is detected merely which results in program exit.
We use Dr Watson to catch the reason of this exception but no reson is logged in Dr Watson log file.
any way
do you know :
1. What kind of exceptions is not detectable by Dr.Watson program ?
2. Do you know any other reason for program exit by windows ?
3. Do you know any third party program which can help us to detect the reason of this failure.
some points about our program :
1.Our program is a Server program which works with USB port to read and write voice data from a hardware.
2. This program sends and receives data on a LAN to other computers.
3. We use windows 2K sp4 OS.
4. Some DLLs of program is written with msvc 6 but main program is written with msvc 7.
If you have any idea please let me know.
Thanks in advance
Monhi
|
|
|
|
|
There are some activeX controls on my dialog, and I want to get the ID of the activeX control that has the keyboard focus.
I use the function:
GetWindowsLong(::GetFocus(), GWL_ID),
But the return value is always 0.
I put the fuction GetLastErr() after it, but the return value is ERORR_SUCCESS.
Did I use the wrong fuction? And is there any other way to get the Id?
Thanks!
|
|
|
|
|
I have noticed that active-x are always created with id 0. Use Spy++ and check the ID.
|
|
|
|
|
Naveen.R wrote: I have noticed that active-x are always created with id 0. Use Spy++ and check the ID.
I don't believe this is reliable. Also note that ActiveX controls need not even have a window.
Steve
|
|
|
|
|
Stephen Hewitt wrote: I don't believe this is reliable
I just said my findings. If you show me a sample which have a active-x control id other than 0, I am ready to change the statement.
|
|
|
|
|
I inserted the “Microsoft Office Chart 10.0” control into the “ActiveX Control Test Container” then used "Spy++" to scope out the IDs -- no zeros to be seen! Your advice relies on implementation details of the controls in question.
Steve
|
|
|
|
|
Stephen Hewitt wrote: I inserted the “Microsoft Office Chart 10.0” control into the “ActiveX Control Test Container” then used "Spy++" to scope out the IDs
Ya u r right... Its an ATL active-x isnt it. when I chacked other ATL activex's, it also have have ID. But many other non ATL active x, the ID 0, like Calender,Micorsoft Form 2 controls( For those having windows ).
I have tried specifying the control id while creating the control. In such cases also Id is coming as 0. May be as you said its the implementation difference of control. But offcourse I think this is not under our control.
Do you think its the implementation differece of ATL Active X and MFC Active x?
|
|
|
|
|
Naveen.R wrote: Do you think its the implementation differece of ATL Active X and MFC Active x?
Both ATL's and MFC's hosting and control implentation details differ.
But this line of reasoning is missing the point: If you’re manipulating an ActiveX control you should manipulate it via the OLE control interfaces if possible and be weary of directly manipulating it’s window; windowless controls need not even have windows! One of the main goals of ActiveX control is to isolate clients of the implementation details of the control. ATL allows you to treat the control as a window but the window you manipulate is part of the hosting code and not part of the control: it handles messages and translates them into interface calls on the control. See the OnSize function in the "ATLHOST.H" file for an example.
Steve
|
|
|
|
|
Sorry I dont know much about ATL. May be we can focus on MFC..
What my doubt is that, when ever I create a MFC activex and add it to some applications, the control id is 0. Why this comes so? MFC ignores those ID's? ( Not only MFC activex but the activex like microsoft form 2 control also have same behavior )
|
|
|
|
|
The axtiveX I used was "Microsoft Forms 2.0 OptionButton", and I created it in the MFC application....
But in the Resource.h file the activeX control has the id which is not 0.
|
|
|
|
|
Can you tell me y u need the id of the control?
As i told earlier, that "Microsoft Forms 2.0 OptionButton" active x will be created with out an id. But MFC internally keeps the id of the control. check the COleControlSite::FindItem function() for more details.
|
|
|
|
|
hi,
i have created a new desktop and i successfully switched in to that destop. But any of windows shortcuts not working on my new desktop.ie, if i press Ctrl+Alt+Del the taskmanager executes on default desktop.
how can i solve this problem ? some one please help me.
Thanks & Regards
|
|
|
|
|
Great to hear that you've created your own desktop. Now you need to create your own Operating System.
All the best.
Sreedhar DV
[Real success is having courage to meet failure without being defeated.]
|
|
|
|
|
Hi, I have Two bmp file . Now I want to write A custom Programme so that
I can overlay One bitmap over other and save it to the file.
I try using VIDEOINFOHEADER . but cannot actually proceed how to
overlay one bitmap over other .
Trioum
|
|
|
|
|
Do you want to write a bmp on the other bmp file?
|
|
|
|
|
yes I want to overlay one bmp over other .
Trioum
|
|
|
|
|
Check this code
CImage m_File1,m_File2,mm;
CDC dc;
CBitmap bmp;
m_File1.Load(_T("c:\\1.bmp"));
m_File2.Load(_T("c:\\2.bmp"));
dc.CreateCompatibleDC(GetDC());
dc.FillSolidRect(CRect(0,0,800,600),RGB(53,97,200));
bmp.CreateCompatibleBitmap(GetDC(),800,600);
dc.SelectObject(bmp);
m_File1.BitBlt(dc.m_hDC,0,0,800,600,0,0,SRCCOPY);
m_File2.BitBlt(dc.m_hDC,150,150,800,600,0,0,SRCCOPY);
mm.Attach((HBITMAP)bmp.m_hObject);
mm.Save(_T("E:\\123.bmp"));
m_File2.Detach();
m_File1.Detach();
mm.Detach();
bmp.DeleteObject();
dc.DeleteDC();
|
|
|
|
|
Hamid. wrote: m_File2.Detach();
m_File1.Detach();
mm.Detach();
Nice memory leaks there
Those should be Destroy, not Detach.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|