Subject: | #define PERL_NO_GET_CONTEXT |
You need a
------------------------
#define PERL_NO_GET_CONTEXT
------------------------
before
------------------------
#include "EXTERN.h"
------------------------
at https://metacpan.org/source/RIVY/Win32-CommandLine-v0.7.318_12237505/lib/Win32/CommandLine.xs#L1 or else your dll will be very big in KB and slow.
This can be improved.
------------------------
row = (AV *)sv_2mortal((SV *)newAV());
av_push(row, newSVpv( "cntUsage", 0 ));
av_push(row, newSVpv( "DWORD", 0 ));
av_push(row, newSVnv( offsetof(PROCESSENTRY32, cntUsage) ));
av_push(row, newSVpv( "L!", 0 ));
av_push(results, newRV((SV *)row));
-----------------------
don't mortal it, instead replace newRV with newRV_noinc. I didn't compile your module, just glanced over it.