diff options
author | Jan Dubois <jand@activestate.com> | 2007-05-11 09:55:17 -0700 |
---|---|---|
committer | Steve Hay <SteveHay@planit.com> | 2007-05-14 16:54:30 +0000 |
commit | dcd628c71019d2ab6ad9086f53e399febeeda3cb (patch) | |
tree | 24198236d2728f1b1686d8719a4162693b2fe238 /ext/Win32CORE | |
parent | a4a4db2cfa16fb7b8c8ec0c8874b653d8fe0dbba (diff) | |
download | perl-dcd628c71019d2ab6ad9086f53e399febeeda3cb.tar.gz |
RE: [perl #42925] Win32::GetLastError fails when first called
From: "Jan Dubois" <jand@activestate.com>
Message-ID: <02bd01c79427$d36140b0$7a23c210$@com>
p4raw-id: //depot/perl@31214
Diffstat (limited to 'ext/Win32CORE')
-rw-r--r-- | ext/Win32CORE/Win32CORE.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); |