Leser: 12
|< 1 2 >| | 13 Einträge, 2 Seiten |
1
2
3
4
5
6
7
8
9
10
11
typedef struct _SYSTEMTIME
{
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
} SYSTEMTIME,
my $winsystime = pack("ssssssss", $wyear, $wmonth, $wdayofweek, $wday, $whour, $wminute, $wsecond, $wmilliseconds);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Win32::API::Struct->typedef(SYSTEMTIME => qw{
WORD wYear,
WORD wMonth,
WORD wDayOfWeek,
WORD wDay,
WORD wHour,
WORD wMinute,
WORD wSecond,
WORD wMilliseconds
});
Win32::API->Import('kernel32', 'BOOL SetSystemTime(SYSTEMTIME lpPoint)');
my $systime = Win32::API::Struct->new('SYSTEMTIME');
# dann kann man mit $systime->{wYear} = 2004, etcpp. die Werte setzen
# und dann die Funktion aufrufen
SetSystemTime($systime);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!perl
use strict;
use warnings;
use Win32::API;
use Win32::API::Struct;
Win32::API::Struct->typedef(SYSTEMTIME => qw{
WORD wYear
WORD wMonth
WORD wDayOfWeek
WORD wDay
WORD wHour
WORD wMinute
WORD wSecond
WORD wMilliseconds
});
Win32::API->Import('kernel32', 'BOOL SetSystemTime(SYSTEMTIME lpPoint)');
my $systime = Win32::API::Struct->new('SYSTEMTIME');
# dann kann man mit $systime->{wYear} = 2004, etcpp. die Werte setzen
# und dann die Funktion aufrufen
@{$systime}{qw/wYear wMonth wDay wHour wMinute wSecond wMilliseconds/} = qw/2004 2 6 22 38 30 0/;
SetSystemTime($systime);
|< 1 2 >| | 13 Einträge, 2 Seiten |