T
ThunderMusic
Hi,
Sorry but this message is a bit long, but I really need your help here.
I'm trying to use some API functions that use some trivial types like long
pointers to a structure. I just can figure out which type to use in the API
declaration in my code
take as an example this declaration :
MMRESULT acmFormatSuggest(HACMDRIVER had, LPWAVEFORMATEX pwfxSrc,
LPWAVEFORMATEX pwfxDst, DWORD cbwfxDst, DWORD fdwSuggest);
the parameter pwfxSrc takes a long pointer to a WAVEFORMATEX structure
variable. In my VB declaration of this function, should I just use a Byref
pwfxDst as WAVEFORMATEX or will I have to do some other trivial things with
IntPtr?!?
right now I declared it like this :
Declare Auto Function acmFormatSuggest Lib "MsAcm32.dll" (ByVal had As
IntPtr, ByRef pwfxSrc As WAVEFORMATEX, ByRef pwfxDst As WAVEFORMATEX, ByVal
cbwfxDst As Int32, ByVal fdwSuggest As Int32) As Int32
I mean, what I have to send is not even some WAVEFORMATEX data, I will have
to send a MPEGLAYER3WAVEFORMAT structure to it, which contains the data in
WAVEFORMATEX but also contains other informations needed for Mpeg layer 3
operations. So will I have to put the type to WAVEFORMATEX (as it is
supposed to be, I guess) or MPEGLAYER3WAVEFORMAT as I will have to use or
IntPtr to send the pointer (which I don't know where to get in VB.NET)?
I know I could also include the group
microsoft.public.win32.programmer.mmedia but I think this question is more a
language question than a multimedia question. I mean, it could be any other
API function, I just took this one because it's one I have to use in my
project, but I have many others with the same concern.
Thanks for your help
ThunderMusic
Sorry but this message is a bit long, but I really need your help here.
I'm trying to use some API functions that use some trivial types like long
pointers to a structure. I just can figure out which type to use in the API
declaration in my code
take as an example this declaration :
MMRESULT acmFormatSuggest(HACMDRIVER had, LPWAVEFORMATEX pwfxSrc,
LPWAVEFORMATEX pwfxDst, DWORD cbwfxDst, DWORD fdwSuggest);
the parameter pwfxSrc takes a long pointer to a WAVEFORMATEX structure
variable. In my VB declaration of this function, should I just use a Byref
pwfxDst as WAVEFORMATEX or will I have to do some other trivial things with
IntPtr?!?
right now I declared it like this :
Declare Auto Function acmFormatSuggest Lib "MsAcm32.dll" (ByVal had As
IntPtr, ByRef pwfxSrc As WAVEFORMATEX, ByRef pwfxDst As WAVEFORMATEX, ByVal
cbwfxDst As Int32, ByVal fdwSuggest As Int32) As Int32
I mean, what I have to send is not even some WAVEFORMATEX data, I will have
to send a MPEGLAYER3WAVEFORMAT structure to it, which contains the data in
WAVEFORMATEX but also contains other informations needed for Mpeg layer 3
operations. So will I have to put the type to WAVEFORMATEX (as it is
supposed to be, I guess) or MPEGLAYER3WAVEFORMAT as I will have to use or
IntPtr to send the pointer (which I don't know where to get in VB.NET)?
I know I could also include the group
microsoft.public.win32.programmer.mmedia but I think this question is more a
language question than a multimedia question. I mean, it could be any other
API function, I just took this one because it's one I have to use in my
project, but I have many others with the same concern.
Thanks for your help
ThunderMusic