I've got a function which returns an IUnknown in an OleVariant and I need to get the interface pointer out and call QueryInterface to see if it has an IDispatch interface. Using Delphi 5 I get "Invalid typecast" on various attemps :-
procedure win_getreturntype(var RetVal : OleVariant;
var rettype : Integer;
var bqlVal : TActiveXReturn);
hr : HRESULT;
pdisp : IDispatch;
punkVal : IUnknown;
locDisp : PChar;
// hr := IUnknown(RetVal.punkVal).QueryInterface(IID_IDispatch, Addr(pdisp));
hr := IUnknown(RetVal).QueryInterface(IID_IDispatch, pdisp);
if FAILED(hr) then
Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.
This article explains how to create forms/units independent of other forms/units object names in a delphi project.
Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
- This article will help user in how to convert their numeric value become words.
How to use
1. You can copy this code in your Unit as function
2. than you can perform your function by type this code
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred.
This will be demonstrated using Adobe Premiere Pro CS6.