HomePhorge

(PUP-2657) FFI Puppet::Util::Windows::Error
bf6f5c4e67c5Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(PUP-2657) FFI Puppet::Util::Windows::Error

  • Remove dependency on 'windows/error'
  • Expand FFI helper methods from MemoryPointer to Pointer as we need them to operate on a chunk of memory that will be LocalFree'd (i.e. MemoryPointer is set to own the memory and autorelease when done)
  • Unfortunately, attempts to use FFI to call GetLastError were futile. FFI.errno should automatically be capturing the GetLastError result of any call made through FFI, however this doesn't appear to be the case in practice. Furthermore, attempting to define GetLastError as a function in FFI yields the same result. A number of tests fail as the error code is being stomped / swallowed. The solution is to use Win32API.new to define / use this single function. Sigh.

Details

Provenance
Ethan J. Brown <Iristyle@github>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU8cc786b44cde: Merge branch 'ticket/master/PUP-838-FFI_Windows_Process'
Branches
Unknown
Tags
Unknown

Event Timeline

Ethan J. Brown <Iristyle@github> committed rPUbf6f5c4e67c5: (PUP-2657) FFI Puppet::Util::Windows::Error (authored by Ethan J. Brown <Iristyle@github>).May 29 2014, 7:43 AM