Search:
Namespaces
Discussions
.NET v1.1
Feedback
acmSTREAMHEADER Structure
Messages
Related Types
This message was discovered on
microsoft.public.dotnet.languages.vc
.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
Post a new message to this list...
bzirk (VIP)
I am trying to call the acmStreamPrepareHeader function in the msacm32.dll
library as follows:
Public Declare Auto Function acmStreamPrepareHeader Lib "msacm32.dll" (ByVal
has As
IntPtr
, ByRef pash As sACMSTREAMHEADER, ByVal fdwPrepare As Int32) As
Int16
mmr = acmStreamPrepareHeader(hstr, strhdr, 0)
where hstr is an
IntPtr
returned by a preceding acmStreamOpen call and
strhdr is defined as:
<StructLayout(
LayoutKind
.Sequential, CharSet:=
CharSet
.Auto)> Public
Structure sACMSTREAMHEADER
Dim cbStruct As Int32
Dim fdwStatus As Int32
Dim dwUser As Int32
Dim pbSrc As
UInt32
Dim cbSrcLength As Int32
Dim cbSrcLengthUsed As Int32
Dim cbSrcUser As Int32
Dim pbDst As
UInt32
Dim cbDstLength As Int32
Dim cbDstLengthUsed As Int32
Dim dwDstUser As Int32
Dim dwReservedDriver As Int32
End Structure
and initialized as follows:
Dim strhdr As sACMSTREAMHEADER
strhdr.cbStruct =
Marshal
.SizeOf(strhdr)
strhdr.fdwStatus = 0
strhdr.pbSrc = pSrcWaveData.ToInt32
strhdr.cbSrcLength = SrcWaveData.Length
strhdr.pbDst = pDstWaveData.ToInt32
strhdr.cbDstLength = pdwOutputBytes
where pSrcWaveData is given by
pSrcWaveData =
Marshal
.AllocHGlobal(SrcWaveData.Length)
and pDstWaveData is given by
pDstWaveData =
Marshal
.AllocHGlobal(pdwOutputBytes)
SrcWaveData is a byte array.
The call to acmSteamPrepareHeader always return mmr=11, which is 'one or
more invalid parameters' What am I missing?
Reply to this message...
William DePalo [MVP VC++] (VIP)
"bzirk" <
Click here to reveal e-mail address
> wrote in message
news:
Click here to reveal e-mail address
...
[Original message clipped]
There are two problems posting here:
1) This group is concerened with Visual C++ and not Visual Basic.
2) Multimedia issues like yours concerning the ACM are the subject of the
group
microsoft.public.win32.programmer.mmedia
If you don't get a reply here you should post again in a VB group (which? I
have no idea.) or the multimedia group I mentioned above.
Regards,
Will
Reply to this message...
System.IntPtr
System.Runtime.InteropServices.CharSet
System.Runtime.InteropServices.LayoutKind
System.Runtime.InteropServices.Marshal
System.UInt32
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com