require DynaLoader;
@ISA = qw|Exporter DynaLoader|;
- $VERSION = '0.36';
+ $VERSION = '0.37';
$XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
ANSI path name for the current directory if the long pathname cannot
be represented in the system codepage.
+=item Win32::GetCurrentProcessId()
+
+Returns the process identifier of the current process. Until the
+process terminates, the process identifier uniquely identifies the
+process throughout the system.
+
+The current process identifier is normally also available via the
+predefined $$ variable. Under fork() emulation however $$ may contain
+a pseudo-process identifier that is only meaningful to the Perl
+kill(), wait() and waitpid() functions. The
+Win32::GetCurrentProcessId() function will always return the regular
+Windows process id, even when called from inside a pseudo-process.
+
=item Win32::GetCurrentThreadId()
Returns the thread identifier of the calling thread. Until the thread
terminates, the thread identifier uniquely identifies the thread
throughout the system.
-Note: the current process identifier is available via the predefined
-$$ variable.
-
=item Win32::GetFileVersion(FILENAME)
Returns the file version number from the VERSIONINFO resource of
XSRETURN_EMPTY;
}
+XS(w32_GetCurrentProcessId)
+{
+ dXSARGS;
+ EXTEND(SP,1);
+ XSRETURN_IV(GetCurrentProcessId());
+}
+
XS(w32_GetCurrentThreadId)
{
dXSARGS;
newXS("Win32::CopyFile", w32_CopyFile, file);
newXS("Win32::Sleep", w32_Sleep, file);
newXS("Win32::OutputDebugString", w32_OutputDebugString, file);
+ newXS("Win32::GetCurrentProcessId", w32_GetCurrentProcessId, file);
newXS("Win32::GetCurrentThreadId", w32_GetCurrentThreadId, file);
newXS("Win32::CreateDirectory", w32_CreateDirectory, file);
newXS("Win32::CreateFile", w32_CreateFile, file);