.NETGURU
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




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification