Larry <> wrote in news:dontmewithme-
:
> Sorry for gettin back on this question but I wasn't able to go
> about it!
>
> Below is a chunk of VB code:
This is a Windows 32 API call. Surprisingly enough, there is a Perl module
called Win32::API on CPAN.
....
> and I need to that in Perl!!
Then you should consider trying to do it yourself first and posting
questions about the _specific_ problems you encounter.
On the other hand, I am getting tired of pointing out this obvious maxim
to people who are obviously never going to learn. Here's some untested
code. Enjoy!
> sorry again!
Don't apologize. Just do what the posting guidelines suggest and there
won't be any need for apologies. Useless apologies create just as much
noise as asinine queries.
#! /usr/bin/perl
use strict;
use warnings;
use Win32::API;
use Win32::API::Struct;
use Data:

umper;
Win32::API::Struct->typedef(WAVEINCAPS => qw(
INT ManufacturerID;
INT ProductID;
LONG DriverVersion;
TCHAR ProductName[32];
LONG Formats;
INT Channels;
INT Reserved;
)
);
Win32::API->Import(winmm => q{
LRESULT waveInGetDevCaps(
UINT_PTR DeviceID,
LPWAVEINCAPS pwic,
UINT cbwic
)}
);
my $caps = Win32::API::Struct->new('WAVEINCAPS');
# You probably need a way of finding out a valid device id
# 0 seems suspect
my $result = waveInGetDevCaps(
0,
$caps,
Win32::API::Struct->sizeof('WAVEINCAPS')
);
print Dumper $caps;
__END__