in reply to Win32::API arguments
I wanted to reply with full code, but I am missing the ASPI drivers and ... I am not going to mess with it :-).
A couple of observations:
1) You have already "told" "Win32::API" that your argument is a pointer (LP prefix) to a struct/record, hence you should just pass the perl scalar and not a reference to it. In other words, use this
"$x = GetCdRomDrives($cds);" instead of "$x = GetCdRomDrives(\$cds);"
2) If I understand the documentation correctly you must call the "$x = GetCdRomDrives($cds)" once and then loop through the results:
foreach $TCdRom (@{$cds->{TCdRom}}){ printf("%s \n", $TCdRom->{HaId}; ... ... }
Of course I cannot check the code and expect some syntax issues/errors :-) YMMV.
CptSkripto
|
|---|