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";