1. eucom help
i'm trying to use IMediaDet which is in qedit.dll.
eucom displays these errors:
80004002: No such interface supported
could not get interface 2: 80004002
when running this code:
without warning
with trace
include IMediaDet.ew
with warning
com_err_out(1)
atom Det
Det = create_com_object (MediaDet_clsid_ix)
if wait_key () then end if
qedit.dll is in windows system32 directory. i did run "regsvr32 qedit.dll".
IMediaDet.ew file is:
-- Wrapper for qedit.dll for EuCOM
-- generated by Tbrowse.exw by Matt Lewis
without warning
include eucom.ew
include w32support.e as mem
global constant
MediaDet_clsid = "65BD0711-24D2-4FF7-9324-ED2E5D3ABAFA",
MediaDet_clsid_ix = add_clsid( MediaDet_clsid) ,
MediaDet_disp = add_iid( MediaDet_clsid_ix, IDispatch)
--methods
-- vtbl for MediaDet
global constant
MediaDet_EnterBitmapGrabMode = 18,
MediaDet_GetBitmapBits = 13,
MediaDet_GetSampleGrabber = 16,
MediaDet_WriteBitmapBits = 14
-- disp methods for MediaDet
global constant
MediaDet_m_EnterBitmapGrabMode = 13,
-- method EnterBitmapGrabMode
-- Returns: VT_HRESULT
-- SeekTime VT_R8
MediaDet_m_GetBitmapBits = 8,
-- method GetBitmapBits
-- Returns: VT_HRESULT
-- streamTime VT_R8
-- pBufferSize VT_I4
-- pBuffer VT_UI1
-- Width VT_I4
-- Height VT_I4
MediaDet_m_GetSampleGrabber = 11,
-- method GetSampleGrabber
-- Returns: VT_HRESULT
-- ppVal ISampleGrabber [OUT]
MediaDet_m_WriteBitmapBits = 9
-- method WriteBitmapBits
-- Returns: VT_HRESULT
-- streamTime VT_R8
-- Width VT_I4
-- Height VT_I4
-- Filename VT_BSTR
--properties
-- vtbl for MediaDet
global constant
MediaDet_CurrentStream = 6,
MediaDet_Filename = 11,
MediaDet_Filter = 3,
MediaDet_FrameRate = 17,
MediaDet_OutputStreams = 5,
MediaDet_StreamLength = 10,
MediaDet_StreamMediaType = 15,
MediaDet_StreamType = 8,
MediaDet_StreamTypeB = 9
-- disp properties for MediaDet
global constant
MediaDet_p_CurrentStream = 3,
-- property CurrentStream
-- Property: VT_I4
MediaDet_p_Filename = 7,
-- property Filename
-- Property: VT_BSTR
MediaDet_p_Filter = 1,
-- property Filter
-- Property: VT_UNKNOWN
MediaDet_p_FrameRate = 12,
-- property FrameRate
-- Property: VT_R8
MediaDet_p_OutputStreams = 2,
-- property OutputStreams
-- Property: VT_I4
MediaDet_p_StreamLength = 6,
-- property StreamLength
-- Property: VT_R8
MediaDet_p_StreamMediaType = 10,
-- property StreamMediaType
-- Property: _AMMediaType
MediaDet_p_StreamType = 4,
-- property StreamType
-- Property: GUID
MediaDet_p_StreamTypeB = 5
-- property StreamTypeB
-- Property: VT_BSTR
2. Re: eucom help
Tone Škoda wrote:
>
>
> i'm trying to use IMediaDet which is in qedit.dll.
>
> eucom displays these errors:
> 80004002: No such interface supported
> could not get interface 2: 80004002
>
Although qedit.dll exposes the usual information that you'd expect to use
with IDispatch (invoke), it doesn't appear to actually have an IDispatch
interface exposed. Comment out this line in your wrapper:
--MediaDet_disp = add_iid( MediaDet_clsid_ix, IDispatch)
and use the vtable directly (via com_interface() calls) and it should
work. You've probably already found this, but here's the documentation on
the interface:
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/directx9_c/directx/htm/imediadetinterface.asp
Matt Lewis
3. Re: eucom help
Matt Lewis wrote:
>
> Although qedit.dll exposes the usual information that you'd expect to use
> with IDispatch (invoke), it doesn't appear to actually have an IDispatch
> interface exposed. Comment out this line in your wrapper:
> }}}
<eucode>
> --MediaDet_disp = add_iid( MediaDet_clsid_ix, IDispatch)
> </eucode>
{{{
> and use the vtable directly (via com_interface() calls) and it should
> work.
thanks for your reply.
when you wrote "use the vtable directly (via com_interface() calls)" you meant
call_interface() and call_interface_ptr()?
all these tries give me:
c:\euphoria\include\fptr.e:82 in procedure call_stdcall_proc()
A machine-level exception occurred during execution of this statement
try 1:
Det = create_com_object (MediaDet_clsid_ix)
detThis = get_obj_this (Det)
detVtbl = peek4u (detThis)
bstr = alloc_bstr (video_fname)
? call_interface_ptr( detThis, detVtbl, MediaDet_p_Filename, {bstr})
try 2:
Det = create_com_object (MediaDet_clsid_ix)
bstr = alloc_bstr (video_fname)
ok = call_interface( Det, IUnknown, MediaDet_p_Filename,
{bstr} )
try 3:
Det = create_com_object (MediaDet_clsid_ix)
duh = query_interface( Det, IUnknown )
if duh[1] = S_OK then
iocs = duh[2]
bstr = alloc_bstr (video_fname)
ok = call_interface_ptr( iocs, peek4u(iocs), MediaDet_p_Filename,
{bstr})
if ok != S_OK then
?1/0
end if
else
?1/0
end if
4. Re: eucom help
Tone Škoda wrote:
>
> Matt Lewis wrote:
> >
> > Although qedit.dll exposes the usual information that you'd expect to use
> > with IDispatch (invoke), it doesn't appear to actually have an IDispatch
> > interface exposed. Comment out this line in your wrapper:
> > }}}
<eucode>
> > --MediaDet_disp = add_iid( MediaDet_clsid_ix, IDispatch)
> > </eucode>
{{{
> > and use the vtable directly (via com_interface() calls) and it should
> > work.
>
>
> thanks for your reply.
>
> when you wrote "use the vtable directly (via com_interface() calls)" you meant
> call_interface()
> and call_interface_ptr()?
Yes, sorry, I answered without checking the source or the docs.
> all these tries give me:
> c:\euphoria\include\fptr.e:82 in procedure call_stdcall_proc()
> A machine-level exception occurred during execution of this statement
Hmm...I'll look into this (although it may take a few days....)
Matt Lewis
5. Re: eucom help
Matt Lewis wrote:
>
> Hmm...I'll look into this (although it may take a few days....)
i found the solution; i had to add guid for interface (IMediaDet_clsid), i
looked it up in qedit.dll with program PE Explorer, this is correct:
global constant
MediaDet_clsid = "65BD0711-24D2-4FF7-9324-ED2E5D3ABAFA",
MediaDet_clsid_ix = add_clsid( MediaDet_clsid),
IMediaDet_clsid = "65BD0710-24D2-4FF7-9324-ED2E5D3ABAFA",
IMediaDet_ix = add_iid ( MediaDet_clsid_ix, IMediaDet_clsid )
--MediaDet_disp = add_iid( MediaDet_clsid_ix, IDispatch)
tbrowse.exw also didn't generate function numbers right, so i had to correct
that.
thanks for your help.
btw this intro tutorial was helpful:
http://devcentral.iticentral.com/articles/DCOM/intro_DCOM/part1/3.php