Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / General / August 2004



Tip: Looking for answers? Try searching our database.

acmStreamPrepareHeader fails

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bzirk - 31 Aug 2004 20:45 GMT
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 Int32
   Dim cbSrcLength As Int32
   Dim cbSrcLengthUsed As Int32
   Dim cbSrcUser As Int32
   Dim pbDst As Int32
   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?
Ken Halter - 31 Aug 2004 21:10 GMT
> I am trying to call the acmStreamPrepareHeader function in the msacm32.dll
> library as follows:

Sorry. Wrong group. If that's .Net code, you'll have better luck getting
.Net related answers in a .Net group. They all have "dotnet" or "vsnet"
in their names.

Signature

Ken Halter - MS-MVP-VB - http://www.vbsight.com
Please keep all discussions in the groups..

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.