From dcd628c71019d2ab6ad9086f53e399febeeda3cb Mon Sep 17 00:00:00 2001 From: Jan Dubois Date: Fri, 11 May 2007 09:55:17 -0700 Subject: RE: [perl #42925] Win32::GetLastError fails when first called From: "Jan Dubois" Message-ID: <02bd01c79427$d36140b0$7a23c210$@com> p4raw-id: //depot/perl@31214 --- ext/Win32CORE/Win32CORE.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ext') diff --git a/ext/Win32CORE/Win32CORE.c b/ext/Win32CORE/Win32CORE.c index 8a56c3e21a..aacbf63025 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); -- cgit v1.2.1