This is just a SWAG - but did you register your .dll?
In reply to Re: Win32::API - Passing "by reference" by Art_XIV in thread Win32::API - Passing "by reference" by EricDB