Re: ACM Convert - acmStreamOpen return 512
- From: "Alessandro Angeli" <nobody@xxxxxxxxxxxxxxxxxx>
- Date: Tue, 10 Apr 2007 03:53:19 -0400
From: "esselte"
The integer type in VB is a 32bits. I tried to put 32bit
integer every where with no sucess. The error who is
returned by this function is "The specified handle is
invalid." I don't understand why the handle is invalid
because here it is NULL.
I have just seen that acmFormatSuggest and acmStreamOpen
return the same error.
I think your marshalling attributes for the P/Invoke calls
are wrong: the handle should be ByVal (otherwise you get a
IntPtr& a.k.a. HACMDRIVER* instead of an IntPtr a.k.a.
HACMDRIVER) while the wave structures should be ByRef (to
get an LPWAVEFORMATEX).
If you are not familiar with C types and InterOp
marshalling, you may want to take a look at ApiViewer to
help you figure out the correct declaration:
http://www.activevb.de/rubriken/apiviewer/index-apiviewereng.html
Notice that ApiViewer seems to always marshal
pointers/references/result params as Int32, which works on
Win32 but fails on Win64, so you'd better use IntPtr
instead.
--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm
.
- Follow-Ups:
- Re: ACM Convert - acmStreamOpen return 512
- From: esselte
- Re: ACM Convert - acmStreamOpen return 512
- References:
- Re: ACM Convert - acmStreamOpen return 512
- From: esselte
- Re: ACM Convert - acmStreamOpen return 512
- From: Chris P.
- Re: ACM Convert - acmStreamOpen return 512
- From: esselte
- Re: ACM Convert - acmStreamOpen return 512
- From: Chris P.
- Re: ACM Convert - acmStreamOpen return 512
- From: esselte
- Re: ACM Convert - acmStreamOpen return 512
- Prev by Date: Re: ACM Convert - acmStreamOpen return 512
- Next by Date: Re: ACM Convert - acmStreamOpen return 512
- Previous by thread: Re: ACM Convert - acmStreamOpen return 512
- Next by thread: Re: ACM Convert - acmStreamOpen return 512
- Index(es):