in reply to Re^2: Import a DLL from C# to Perl
in thread Import a DLL from C# to Perl
use strict; use warnings; use Inline C => Config => BUILD_NOISY => 1; use Inline C => <<'EOC'; typedef int (__stdcall *f_funci)(); int initdll() { double a = 1; double b = 2; HINSTANCE hInst = LoadLibrary("C:\\dev\\teste\\DLLExportTest.dll"); if( hInst != NULL ) { f_funci funci = (f_funci)GetProcAddress(hInst, "Add"); if (!funci) { printf( "could not locate the function\n" ); return EXIT_FAILURE; } else { /* funci(&result); */ } FreeLibrary( hInst ); // temporary return 1; } else { return 0; } } EOC print "initdll returned: ", initdll(), "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Import a DLL from C# to Perl
by BrowserUk (Patriarch) on May 10, 2018 at 04:09 UTC | |
by syphilis (Archbishop) on May 10, 2018 at 04:56 UTC | |
by BrowserUk (Patriarch) on May 10, 2018 at 05:35 UTC | |
|
Re^4: Import a DLL from C# to Perl
by paulorfmmb (Acolyte) on May 10, 2018 at 18:25 UTC | |
by syphilis (Archbishop) on May 11, 2018 at 03:33 UTC |