From: Jan Dubois Date: Fri, 11 May 2007 16:55:17 +0000 (-0700) Subject: RE: [perl #42925] Win32::GetLastError fails when first called X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=dcd628c71019d2ab6ad9086f53e399febeeda3cb;p=p5sagit%2Fp5-mst-13.2.git RE: [perl #42925] Win32::GetLastError fails when first called From: "Jan Dubois" Message-ID: <02bd01c79427$d36140b0$7a23c210$@com> p4raw-id: //depot/perl@31214 --- diff --git a/ext/Win32CORE/Win32CORE.c b/ext/Win32CORE/Win32CORE.c index 8a56c3e..aacbf63 100644 --- a/ext/Win32CORE/Win32CORE.c +++ b/ext/Win32CORE/Win32CORE.c @@ -15,7 +15,9 @@ static void forward(pTHX_ const char *function) { dXSARGS; + DWORD err = GetLastError(); Perl_load_module(aTHX_ PERL_LOADMOD_NOIMPORT, newSVpvn("Win32",5), newSVnv(0.27)); + SetLastError(err); SPAGAIN; PUSHMARK(SP-items); call_pv(function, GIMME_V);