Click here to Skip to main content
16,005,473 members
Home / Discussions / COM
   

COM

 
GeneralDoModal from an Interface (Simple Object) Pin
26-Jul-01 2:09
suss26-Jul-01 2:09 
GeneralDirectShow Pin
25-Jul-01 5:25
suss25-Jul-01 5:25 
QuestionCan't register the service? Pin
zhaoyong25-Jul-01 2:17
zhaoyong25-Jul-01 2:17 
AnswerRe: Can't register the service? Pin
Not Active25-Jul-01 3:22
mentorNot Active25-Jul-01 3:22 
GeneralGetProperty and VARIANT Pin
AlexEg24-Jul-01 23:34
AlexEg24-Jul-01 23:34 
Generalwhen to call AddRef() and Release Pin
pathi24-Jul-01 21:26
pathi24-Jul-01 21:26 
GeneralRe: when to call AddRef() and Release Pin
Jesse Rosalia16-Aug-01 19:55
Jesse Rosalia16-Aug-01 19:55 
QuestionHow does IOleInPlaceObjectWindowless work? Pin
Kastellanos Nikos24-Jul-01 1:15
Kastellanos Nikos24-Jul-01 1:15 
In an MFC application i put the folowing code
in the OnDraw function of a CView class and it works Roll eyes | :rolleyes: !

I tried to use as less COM overhead as possible.
What the code do is to render an SVG file using the Adobe's SVG control.

When i try the same in an ISAPI filter (a DLL that is loaded by the IIS service) the queryinterface for IOleInPlaceObjectWindowless returns NULL. Is this because
the is no Window?

Note: Doing a Queryinterface for IOleInPlaceObject return an object for both the MFC and the ISAPI-Filter, but calling SetObjectRects return an error and has no effect.





void CSvgtestView::OnDraw(CDC* pDC)
{
	CSvgtestDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	HRESULT hr=0;


	//Load the adobe SVG control	
	ISVGCtl SVGCtl;	
	if(SVGCtl.CreateDispatch("Adobe.SVGCtl")==0)	
		return;
	SVGCtl.SetSrc("C:\\Inetpub\\wwwroot\\test.svg");

	//Set the size
	CComQIPtr<IOleInPlaceObjectWindowless> ptrOleInPlaceObjectWindowless(SVGCtl.m_lpDispatch);	
	RECT rcPosRect={0,0,300,200};
	RECT rcClipRect={0,0,300,200};
	hr=ptrOleInPlaceObjectWindowless->SetObjectRects(&rcPosRect,&rcClipRect);

	
	
	//Render the SVG
	CComQIPtr<IViewObject>	ptrViewObject(SVGCtl.m_lpDispatch);
	RECTL rcBounds={0,0,200,200};
	HDC hdcDraw=pDC->GetSafeHdc();

	hr=ptrViewObject->Draw(
		DVASPECT_CONTENT, //Aspect to be drawn
		-1,	//Part of the object of interest in the draw operation
		NULL,	//Pointer to DVASPECTINFO structure or NULL
		NULL,	//Pointer to target device in a structure
		0,	//Information context for the target device
		hdcDraw, //Device context on which to draw
		&rcBounds, //Pointer to the rectangle in which the object is drawn
		&rcBounds, //Pointer to the window extent and window origin when drawing a metafile
		NULL,	//Pointer to the callback function for canceling or continuing the drawing
		0	//Value to pass to the callback function
		);
}


- - - - - - - - - - - - - - - - - -
Memory leaks is the price we pay \0
01234567890123456789012345678901234
AnswerRe: How does IOleInPlaceObjectWindowless work? Pin
Kastellanos Nikos24-Jul-01 22:46
Kastellanos Nikos24-Jul-01 22:46 
Generaldynamically displaying content in IE Plugin Pin
Amit Dey23-Jul-01 19:49
Amit Dey23-Jul-01 19:49 
GeneralRe: dynamically displaying content in IE Plugin Pin
Erik Thompson24-Jul-01 7:24
sitebuilderErik Thompson24-Jul-01 7:24 
QuestionInstantiate a COM DLL remotely? Pin
Matt Philmon23-Jul-01 18:13
Matt Philmon23-Jul-01 18:13 
AnswerRe: Instantiate a COM DLL remotely? Pin
Jesse Rosalia16-Aug-01 19:47
Jesse Rosalia16-Aug-01 19:47 
GeneralIDispatch Pin
23-Jul-01 15:12
suss23-Jul-01 15:12 
GeneralWMI Security Problem... Pin
Mario M.23-Jul-01 7:39
Mario M.23-Jul-01 7:39 
GeneralActive X Control - Redrawing Pin
Jared Allen23-Jul-01 3:32
Jared Allen23-Jul-01 3:32 
GeneralRe: Active X Control - Redrawing Pin
23-Jul-01 8:21
suss23-Jul-01 8:21 
GeneralRe: Active X Control - Redrawing Pin
23-Jul-01 21:18
suss23-Jul-01 21:18 
GeneralActiveX Control in an Composite Control Pin
22-Jul-01 6:00
suss22-Jul-01 6:00 
GeneralRe: ActiveX Control in an Composite Control Pin
Hadi Rezaee28-Jul-01 19:14
Hadi Rezaee28-Jul-01 19:14 
GeneralActiveX control in an Composite Control Pin
22-Jul-01 5:58
suss22-Jul-01 5:58 
GeneralActiveX control in an Composite Control Pin
22-Jul-01 5:58
suss22-Jul-01 5:58 
GeneralRe: ActiveX control in an Composite Control Pin
Not Active22-Jul-01 10:18
mentorNot Active22-Jul-01 10:18 
GeneralRe: ActiveX control in an Composite Control Pin
22-Jul-01 21:37
suss22-Jul-01 21:37 
GeneralRe: ActiveX control in an Composite Control Pin
23-Jul-01 8:50
suss23-Jul-01 8:50 

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.