in reply to How do I code GlobalMemoryStatusEx in perl
Win32::API::Struct->typedef(MEMORYSTATUSEX { DWORD dwLength; ...
For one, you probably want some Perl-compatible syntax :)
Win32::API::Struct->typedef(MEMORYSTATUSEX => qw{ DWORD dwLength; ... });
From the docs:
typedef NAME, TYPE, MEMBER, TYPE, MEMBER, ...
This method defines a structure named NAME. The definition consists of types and member names, just like in C. In fact, most of the times you can cut the C definition for a structure and paste it verbatim to your script, enclosing it in a qw() block. The function takes care of removing the semicolon after the member name.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How do I code GlobalMemoryStatusEx in perl
by azaragoza (Acolyte) on Mar 12, 2009 at 02:06 UTC |