in reply to Re: Calling dll function(created in VC++) from Perl
in thread Calling dll function(created in VC++) from Perl

This node falls below the community's minimum standard of quality and will not be displayed.
  • Comment on Re^2: Calling dll function(created in VC++) from Perl

Replies are listed 'Best First'.
Re^3: Calling dll function(created in VC++) from Perl
by ikegami (Patriarch) on Apr 21, 2008 at 05:33 UTC
    What's wrong with the samples in the docs?
Re^3: Calling dll function(created in VC++) from Perl
by BrowserUk (Patriarch) on Apr 21, 2008 at 13:37 UTC

    Sure, if you think it will help:

    c:\test>type test.c int __declspec( dllexport ) test( int x ) { x *= 2; return x; } c:\test>cl /LD /MT test.c Microsoft (R) 32-bit C/C++ Standard Compiler Version 13.00.9466 for 80 +x86 Copyright (C) Microsoft Corporation 1984-2001. All rights reserved. test.c Microsoft (R) Incremental Linker Version 7.00.9466 Copyright (C) Microsoft Corporation. All rights reserved. /out:test.dll /dll /implib:test.lib test.obj Creating library test.lib and object test.exp c:\test>type dlltest.pl #! perl -slw use strict; use Win32::API; my $fun = Win32::API->new( 'test.dll', 'int test( int x )' ) or die $^E; print $fun->Call( 123 ); c:\test>dllTest 246

    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.