in reply to Using the Serial Port

Win32::API is available on The CPAN.

"Win32" means all the 32-bit Windows, including Windows-95 and up. That doesn't necessarily mean the same thing will work in all places, of course. This is Windows, after all. :)

Replies are listed 'Best First'.
Re^2: Using the Serial Port
by eran_benjamin (Initiate) on Apr 19, 2005 at 12:25 UTC
    Thanks Friedo for your quick answer. I did what you said, and download the API module. But now I get this 'shout': "Can't locate loadable object for module Win32::API in @INC". INC cntains all the links I set, which the first one point at the Win32-API-0.41 directory (which I have download from Cpan) Whem I tried to debug I have tested the Win32-API-0.41 directory it self by a simple test as suggested in the Win32:API link that you have sent me. all I wanted is to call the API, and get a process ID, thus I have copy paste the example given in the Cpan, and now I got the following 'shout': Can't locate Win32/API.pm Although I ran the test in the same directory whereas the API.pm was! But beside this 2 problems above,I am worried now, about something else: The Device I work with (the speach recognition device) can work only with Windows98/95 as it use the 8bit Dos, which is not applicable for Windows-2K/XP. Do you think I might face problem using the Win32 when communicate to that device? Please reply, thanks, Eran.
      If you are using ActiveState Perl, I believe you can use their PPM (Perl Package Manager) utility to install this module.

      At a command prompt, type 'ppm'. This will bring you to a 'ppm>' prompt. Then the command 'install win32::api' should download the proper files and install it for you. (it's been a while since I've used this and I can't test it at the moment to make sure it works). However, if you DO have problems, type 'help' and the PPM will give you a list of commands.

      Hope that helps!

        Thanks, I have managed to install the API.pm. Still I get a shout that the perl, find the FILE, but has a problem with the object! Do you have any idea how to solve this problem. ...... Can't locate loadable object for module Win32::API in @INC (@INC contains: . .\t .\lib ..\lib C:\Perl\site\lib\Win32 C:\Perl\site\lib\Win32API C:/Perl/lib C:/Perl/site/lib) at ..\lib/Win32API/CommPort.pm line 5 ......
      Did you only download the module, or did you actually install it?
      Read the documentation provided with the module. The least you probably have to do is:
      perl Makefile.PL make make test make install
      To get things running!

      Paul

        I have run the makefile.pl but hadn't run the test and the install. here is the command and part of the reaction: perl install.pl ... Installing C:\Perl\site\lib\Win32\API.pm Skipping C:\Perl\site\lib\Win32API\CommPort.pm (unchanged) Installing C:\Perl\site\lib\Win32API\API.pm Writing C:\Perl\site\lib/auto/Win32/SerialPort/.packlist ... Now that I did so, I still get the 'shout': Can't locate loadable object for module Win32::API in @INC (@INC contains: . .\t .\lib ..\lib C:\Perl\site\lib\Win32 C:\Perl\site\lib\Win32API C:/Perl/lib C:/Perl/site/lib) at ..\lib/Win32API/CommPort.pm line 5 Pay attention that the perl, fing the FILE, it has a problem with the object! Do you have any ide how to solve this problem.