refined code to getlastwin32 error

still marshalling of multiple params is not working.commiting to save
the work