|
I am working on a large codebase on VC++ 6.0, which contains many unused functions. i.e. functions that are never called from anywhere else in the code. I would like to delete these functions.
Without having to run every possible scenario with some sort of code coverage tool, is there any possible way to find these functions? Currently all I can do is do a Find In Files on the function name and work it out.
Thanks for your help...
Cheers
d3m0n
|
|
|
|
|
do you want to do that for your personal order? I mean the compiler sees which functions you use...
|
|
|
|
|
Yes... it's sometimes confusing if you're changing a file, and there's a function in there with an obvious bug. There's no point trying to fix the bug if that function is totally redundant. Better to just remove it.
So I was wondering if there was a way to find every redundant function, so I don't waste my time looking at them.
Thanks.
Cheers
d3m0n
|
|
|
|
|
[d3m0n] wrote: So I was wondering if there was a way to find every redundant function...
Doesn't the profiler tell you this?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I could never get the profiler to work. Enabled the option in the project settings but the [Build->Profile] menu is always disabled.
Might try again though if you think it would be useful for what I'm trying to do.
Thanks.
Cheers
d3m0n
|
|
|
|
|
[d3m0n] wrote: Enabled the option in the project settings...
On the Link tab, you checked the Enable profiling checkbox?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Interesting this profiler, I did not know its existence but do not see a profiler anywhere neither in Build menu nor in the settings.
I use VS 2003. could you help please?
|
|
|
|
|
Yup, and rebuilt like it says in MSDN
Cheers
d3m0n
|
|
|
|
|
Hi all,
I am capturing video from device and then rendering it in a Dialog Box window using RenderStream function by using the following piece of code:
CHECK_HRESULT(UnInitializeGraph());
CHECK_HRESULT(InitializeGraph(enmCAPTURE_GRAPH, hParent, hPreview));
CComPtr pCaptureFilter;
CHECK_HRESULT(AddFilterByName( CLSID_VideoInputDeviceCategory, bstrDeviceName, &pCaptureFilter));
CHECK_HRESULT(RenderStream(pCaptureFilter, PIN_CATEGORY_PREVIEW, MEDIATYPE_Video));
CHECK_HRESULT(GetGraphInterfaces());
and it is working fine.
Now suppose i don't want to use RenderStream given above and get the same functionality.I want to connect the individual filters by AddFilter function.
Actually i am trying to do that but i am not getting anything.
Please help me how should i proceed.
Thanks and Regards,
Mayank
|
|
|
|
|
Is that C++? Many of those DirectShow calls don't look right to me
For example, RenderStream isn't called on an object and I thought it took 5 parameters...
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi Mike,
Thanks for your reply.
Actually it is C++ only and these indeed are the right calls.In RenderStream i am calling another RenderStream function which is indeed taking 5 parameters.I have attached camcorder through Fusion HDTV card to my system and is getting the video being captured being displayed.
I used GraphEdit and saw the follwing process going on:
TvTuner-->TvAudio-->Crossbar-->FusionHDTV-->Video Renderer
Now if i don't want to use RenderStream function how will i be able to get the video displayed.
If i can get the filters of all the above and then connect them in the filter graph then if i will be able to get the video displayed.
e.g i can add the Crossbar filter using the given below code:
CHECK_HRESULT(AddFilterByName( AM_KSCATEGORY_CROSSBAR, bstrDeviceName, &pCrossbarFilter));
Or is there any method to accomplish above
Thanks and Regards,
Mayank
|
|
|
|
|
Hi all,
i have made a SDI application in that i have made a splitter control which is dividing my window in two horizontal parts. For those two partition i have made two view each derived from CFormView. In that i have made a list control each. now my problem is while i resize my window or splitter control my list control is not resizing itself. I know that the desired code should be written in WM_SIZE but i don know how to code it. Can anybody help me in this...
Thanks in advance
|
|
|
|
|
Hi,
MFC version of WM_SIZE is OnSize Handler and if you need to adjust the size to whole window the following code will do it.
void CYourFormView::OnSize(UINT nType, int cx, int cy)
{
CFormView::OnSize(nType, cx, cy);
m_wndListCtrl.MoveWindow(0, 0, cx, cy);
}
if you want the list control to be placed and resize to new position use SetWindowPos() instead of MoveWindow.
Best Regards
Raj
|
|
|
|
|
Rajkumar is right - you need to handle WM_SIZE / OnSize in your formview. BUT: If you have many controls on your form, then there is a whole section of articles on the subject on this strange site. What was the name....?
Ah yes:
http://www.codeproject.com/dialog/#Control+Positioning[^]
Iain.
|
|
|
|
|
I want to Call WIN 32 DLL in WIN 16 Program. PLz give some IDEA or any reference.
|
|
|
|
|
why would you do that?
rrrado
|
|
|
|
|
...and how would you expect that to work? And why would you write a Win16 app?
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi All,
How to get the status of all ports on the remote system? I need to give a list of ports that are listening, opened, waiting to close etc. Almost the same output as:
netstat -o
The only thing is that, I need to get the information of remote system. I am trying WMI, but, no luck yet. Any help is greatly appreciated.
Regards,
KVRN Kiran Kumar.
|
|
|
|
|
I would like to print some text using the default printer.
(by a MFC C++ program)
Please help me with some related coding or web pages.
Thanks!
|
|
|
|
|
Printing is built into MFC. If you made your application, you can select to have printing and print previewing in, and then its the same as drawing to the screen.
Or look on codeproject, and there are many articles on print preview, and printing.
Iain.
|
|
|
|
|
|
|
|
You're welcome.
|
|
|
|
|
I would like to print some text using the default printer.
(by a MFC C++ program)
Please help me with some related coding or web pages.
Thanks!
|
|
|
|