Click here to Skip to main content
15,921,841 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: menu Pin
sardinka23-Sep-03 6:02
sardinka23-Sep-03 6:02 
GeneralRe: menu Pin
David Crow23-Sep-03 7:03
David Crow23-Sep-03 7:03 
Generalhelp on drawing application in VC++ Pin
swerajan23-Sep-03 4:31
swerajan23-Sep-03 4:31 
QuestionWhat Profiler message means ? Pin
vgrigor23-Sep-03 4:30
vgrigor23-Sep-03 4:30 
Generalmenu Pin
sardinka23-Sep-03 4:23
sardinka23-Sep-03 4:23 
GeneralRe: menu Pin
RobJones23-Sep-03 4:30
RobJones23-Sep-03 4:30 
GeneralRe: menu Pin
Chris Richardson23-Sep-03 11:04
Chris Richardson23-Sep-03 11:04 
QuestionWhat means such Profiler output ? Pin
vgrigor23-Sep-03 4:04
vgrigor23-Sep-03 4:04 
Is it possible by profiler output to gather what probles is ?

I have ActiveX(ATL) in CDialog (MFC)

Visible problems:
Much time to load,
to unload,
(and leak of memory)

Does this ActiveX in -Process ?
(according to Profiler output )
they marked as appartment,
and MFC app I initialized as Appartment-Threaded.
but accidencial cases can happen...
- does I have in-proc case?

To understand output:
I use interface IPictureDisp for direct loading
pictures from CDialog resource to ActiveX.
(code is below)

Profiler - DevPartner 7.1

Made folowing output:
(is it possible to understand where problem is in, by anylizing it?)

thanks you

list ----------------------------------
Method Name,"% in Method","% with Children","Called","Average"

WaitForSingleObject,"10,16","10,16","31я064","55,19"

#6274 (mfc71d.dll),"5,69","11,23","2я627","365,10"

PtAllSet::baseGet,"3,69","6,35","158","3я939,56"

WaitForMultipleObjects,"3,50","3,50","3я677","160,52"

#6849 (mfc71d.dll),"2,53","52,69","24я929","17,11"

OutputDebugStringA,"2,41","2,41","6я807","59,67"

CallWindowProcA,"2,38","26,62","25я311","15,88"

BitBlt,"2,32","2,32","2я630","148,83"

rand,"2,29","2,42","82я220","4,70"

GetMessageA,"2,02","2,75","3я700","91,93"

#7017 (mfc71d.dll),"1,65","27,88","2я956","94,32"

RtlAllocateHeap,"1,63","1,63","86я808","3,17"

PtAllSet::SetFilter,"1,53","2,08","156","1я655,03"

#6045 (mfc71d.dll),"1,53","8,20","18","14я328,79"

PtVArray::Search,"1,47","1,50","1я898","130,91"

recv,"1,42","1,47","843","283,93"


#5954 (mfc71d.dll),"1,36","2,32","6я821","33,51"

PtAdmin::CloseDictionary,"1,24","2,07","3","69я695,58"

SendMessageA,"1,15","10,41","13я858","13,97"

SetDIBitsToDevice,"1,10","1,10","825","224,15"

PtAdmin::OpenDictionary,"1,02","1,98","3","57я179,20"

#1718 (mfc71d.dll),"0,99","1,08","12я802","13,05"

RtlFreeHeap,"0,89","0,89","85я679","1,76"

PtOnDemandSet::baseGet,"0,88","1,71","47","3я148,29"

#7007 (mfc71d.dll),"0,84","19,16","2я311","61,26"

WaitForMultipleObjectsEx,"0,82","0,82","3я600","38,42"


---------------------------------


code of loading Picture into activeX
<br />
<br />
	HRESULT PutImage(IPictureDisp* pPicture, int nEntry)<br />
	{<br />
		m_isChanged = true;<br />
<br />
		if (FireOnRequestEdit(DISPID_PICTURE) == S_FALSE)<br />
			return S_FALSE;<br />
		m_spPictures[nEntry] = 0;<br />
		if (pPicture)<br />
		{<br />
			CComQIPtr<IPersistStream, &IID_IPersistStream> p(pPicture);<br />
			if (p)<br />
			{<br />
				ULARGE_INTEGER l;<br />
				p->GetSizeMax(&l);<br />
				HGLOBAL hGlob = GlobalAlloc(GHND, l.LowPart);<br />
				if (hGlob)<br />
				{<br />
					CComPtr<IStream> spStream;<br />
					CreateStreamOnHGlobal(hGlob, TRUE, &spStream);<br />
					if (spStream)<br />
					{<br />
						if (SUCCEEDED(p->Save(spStream, FALSE)))<br />
						{<br />
							LARGE_INTEGER l;<br />
							l.QuadPart = 0;<br />
							spStream->Seek(l, STREAM_SEEK_SET, NULL);<br />
							OleLoadPicture(spStream, l.LowPart, FALSE, IID_IPictureDisp, (void**)&m_spPictures[nEntry]);<br />
						}<br />
						spStream.Release();<br />
					}<br />
					GlobalFree(hGlob);<br />
				}<br />
			}<br />
		}<br />
		m_bRequiresSave = TRUE;<br />
		FireOnChanged(nEntry + 3);<br />
		FireViewChange();<br />
		SendOnDataChange(NULL);<br />
<br />
		//pPicture->Release();<br />
<br />
		return S_OK;<br />
<br />
	}<br />

AnswerRe: What means such Profiler output ? Pin
Mike Dimmick23-Sep-03 5:53
Mike Dimmick23-Sep-03 5:53 
GeneralRe: What means such Profiler output ? Pin
vgrigor23-Sep-03 6:02
vgrigor23-Sep-03 6:02 
Generaldll shared data Pin
umarcool23-Sep-03 3:47
umarcool23-Sep-03 3:47 
GeneralRe: dll shared data Pin
Mike Dimmick23-Sep-03 4:14
Mike Dimmick23-Sep-03 4:14 
GeneralRe: dll shared data Pin
umarcool23-Sep-03 5:35
umarcool23-Sep-03 5:35 
GeneralRe: dll shared data Pin
Alexander M.,27-Sep-03 7:29
Alexander M.,27-Sep-03 7:29 
Generalwriting general plugins fro winamp in VC++. Pin
karteek23-Sep-03 3:40
karteek23-Sep-03 3:40 
Generaldatabase delete help! Pin
coda_x23-Sep-03 2:52
coda_x23-Sep-03 2:52 
GeneralRe: database delete help! Pin
David Crow23-Sep-03 3:01
David Crow23-Sep-03 3:01 
QuestionHow to invoke a function at a regular interval? Pin
George223-Sep-03 1:54
George223-Sep-03 1:54 
AnswerRe: How to invoke a function at a regular interval? Pin
sashaf23-Sep-03 2:40
sashaf23-Sep-03 2:40 
GeneralRe: How to invoke a function at a regular interval? Pin
Mike Dimmick23-Sep-03 2:50
Mike Dimmick23-Sep-03 2:50 
GeneralRe: How to invoke a function at a regular interval? Pin
George223-Sep-03 16:44
George223-Sep-03 16:44 
GeneralRe: How to invoke a function at a regular interval? Pin
George223-Sep-03 16:45
George223-Sep-03 16:45 
GeneralQuestion about enum in C/C++ Pin
George223-Sep-03 1:48
George223-Sep-03 1:48 
GeneralRe: Question about enum in C/C++ Pin
567890123423-Sep-03 3:22
567890123423-Sep-03 3:22 
GeneralRe: Question about enum in C/C++ Pin
George223-Sep-03 16:51
George223-Sep-03 16:51 

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.