dattaforit has asked for the wisdom of the Perl Monks concerning the following question:

Dear friends, I want to use the Win32::GuidGen() in my perl script. My Perl version is 5.8.9 and it is on windows(64 bit). For this function, i will require win32::API, from where can i get the win32::API module for windows 64 bit? Please do the needful. Thanks in advance. Regards,
  • Comment on how to install win32::GuidGen on windows 64 bit OS

Replies are listed 'Best First'.
Re: how to install win32::GuidGen on windows 64 bit OS
by ikegami (Patriarch) on Feb 27, 2009 at 05:29 UTC

    First, questions go in Seekers of Perl Wisdom. I moved your post there. Perl Monks Discussion is for discussions about PerlMonks.

    Secondly, the modules are Win32::API and Win32::Guidgen, not win32::API, win32::GuidGen or Win32::GuidGen.

    where can i get the win32::API module for windows 64 bit?

    To my knowledge, there is no such module. Win32::API is very specifically for Win32. Changing it so it can handle Win64 would not be a trivial task. You'd be much better off creating an XS interface to the DLL GuidGen uses.

    ... or give Data::UUID a try.

    Update: jand points out below that Win32 has a GuidGen() function.

Re: how to install win32::GuidGen on windows 64 bit OS
by syphilis (Archbishop) on Feb 27, 2009 at 05:32 UTC
    My Perl version is 5.8.9 and it is on windows(64 bit)

    The important thing is not whether windows is 64-bit, but whether the build of perl is 64-bit. What does perl -V:archname report ? If it reports MSWin32-x86-multi-thread then you can use the existing (32-bit perl) ppm packages. But if it reports MSWin32-x64-multi-thread then you do have a 64-bit build of perl, and there's no ppm package available.

    Afaik, Win32::API currently won't build on MSWin32-x64-multi-thread, though work on that is in progress.

    Cheers,
    Rob
Re: how to install win32::GuidGen on windows 64 bit OS
by jand (Friar) on Feb 27, 2009 at 17:36 UTC
    I don't quite see the point of using that module. The Win32 module included in core Perl already has a Win32::GuidGen() function; I don't see anything that the module of the same name provides beyond 3 more aliases for the same functionality.

    Is Win32::GuidGen() not working in your 64-bit Perl for Windows?

      win32::GuidGen() does not work on 64-bit perl for windows. It requires(prerequisite) win32::api for the usage of win32::GuidGen. And i dont find any win32::api for 64 bit perl for windows.
        Win32::GuidGen() does not require Win32-API (I'm very certain, as I actually wrote it myself). It is a function in the Win32 module and included in core Perl. Please try it:
        perl -MWin32 -le "print Win32::GuidGen()"

        If it doesn't work, what does happen?

Re: how to install win32::GuidGen on windows 64 bit OS
by Anonymous Monk on Feb 27, 2009 at 05:09 UTC
      i have already used all these but they all require win32-API and all these works on windows 32 bit, but i want it for windown 64 bit. when i use these on windows 64 bit, i get error for win32::API which is unavailable for 64 bit of windows.