Суть:
нужно поюзать функцию из DLL-ки.
(packet.dll если это говорит о чем-нить).
В доке к dll-ке черным по белому написано:
ULONG PacketGetAdapterNames(PTSTR pStr, PULONG BufferSize)
Usually, this is the first function that should be used to communicate with the driver. It returns the names of the adapters installed on the system in the user allocated buffer pStr. After the names of the adapters, pStr contains a string that describes each of them.
BufferSize is the length of the buffer.
Исходя из данной описанки пишу код:
----
#!perl
use Win32::API;
$function = new Win32::API("packet.dll",
"PacketGetAdapterNames",
'PP', 'N');
$length = pack('L', 250); # store ULONG
$buffer = " " x $length;
$return = $function->Call($buffer, $length);
print $return;
---
Почему перл валится ??
Никакие комбинации из P,N в качестве описания параметров не подходят, валится стабильно... Там где метод Call вызываю.
"Приложение совершило недопустимую операцию и будет закрыто" !!!
Как можно заюзать сию процедурку из DLL-ки на перле ?