external function GetTimeZoneInformation

forum.advanced.programming (1998-2005)
attilio domecijn

external function GetTimeZoneInformation

Post by attilio domecijn » 09 Dec 2004, 12:13

 Posted by:  attilio domecijn 

Hi,

Does I test used external function GetTimeZoneInformation (Kernel32.dll)
without successes, somebody have a solution?
Thank you

--

Attilio DOMECIJN
E-Mail: attilio.domecijn@advalvas.be
domecijn_attilio@hotmail.com
cidonie@lavache.com
Bureau: attilio.domecijn@selligent.com
GSM: +32(0)486.67.71.75
Fixe: +32(0)64.44.81.78
Address: 12 Ruelle Houtart
7110 Houdeng-Goegnies
Plan: http://www.mappy.com/PlanPerso/Loustico/0

Stefan Beltrame

external function GetTimeZoneInformation

Post by Stefan Beltrame » 09 Dec 2004, 12:47

 Posted by:  Stefan Beltrame 

Hi Attilio

Use this declaration in external functions.

!!CB!! 81
Library name: KERNEL32.DLL
ThreadSafe: No
Function: GetTimeZoneInformation
Description:
Export Ordinal: 0
Returns
Number: DWORD
Parameters
structPointer
Receive Number: LONG
Receive String: char[64]
Receive Number: WORD
Receive Number: WORD
Receive Number: WORD
Receive Number: WORD
Receive Number: WORD
Receive Number: WORD
Receive Number: WORD
Receive Number: WORD
Receive Number: LONG
Receive String: char[64]
Receive Number: WORD
Receive Number: WORD
Receive Number: WORD
Receive Number: WORD
Receive Number: WORD
Receive Number: WORD
Receive Number: WORD
Receive Number: WORD
Receive Number: LONG

To convert the strings use WideCharToMultiByte also from Kernel32.dll

Regards
Stefan

Christian Astor

external function GetTimeZoneInformation

Post by Christian Astor » 09 Dec 2004, 22:40

 Posted by:  Christian ASTOR 


Receive String: LPVOID

(sample posted last year (FileTime.zip))

Pavel Logvin

external function GetTimeZoneInformation

Post by Pavel Logvin » 10 Dec 2004, 23:11

 Posted by:  Pavel Logvin 

!!CB!! 81
Library name: kernel32.dll
ThreadSafe: Yes
Function: GetTimeZoneInformation
Description:
Export Ordinal: 0
Returns
Number: DWORD
Parameters
structPointer
! LONG Bias;
Receive Number: LONG
! WCHAR StandardName[32];
Receive String: byte[64]
! SYSTEMTIME StandardDate;
struct
! WORD wYear;
Receive Number: WORD
! WORD wMonth;
Receive Number: WORD
! WORD wDayOfWeek;
Receive Number: WORD
! WORD wDay;
Receive Number: WORD
! WORD wHour;
Receive Number: WORD
! WORD wMinute;
Receive Number: WORD
! WORD wSecond;
Receive Number: WORD
! WORD wMilliseconds;
Receive Number: WORD
! LONG StandardBias;
Receive Number: LONG
! WCHAR DaylightName[32];
Receive String: byte[64]
! SYSTEMTIME DaylightDate;
struct
! WORD wYear;
Receive Number: WORD
! WORD wMonth;
Receive Number: WORD
! WORD wDayOfWeek;
Receive Number: WORD
! WORD wDay;
Receive Number: WORD
! WORD wHour;
Receive Number: WORD
! WORD wMinute;
Receive Number: WORD
! WORD wSecond;
Receive Number: WORD
! WORD wMilliseconds;
Receive Number: WORD
! LONG DaylightBias;
Receive Number: LONG

!!CB!! 134
Function: gfnGetTimeZoneBias
Description: Returnes the workstation Bias = Local Time - GMT in hours
Returns
Number:
Parameters
Static Variables
Local variables
Number: nRet
Number: nBias
String: sStandardName
Number: nStandardDateYear
Number: nStandardDateMonth
Number: nStandardDateDayOfWeek
Number: nStandardDateDay
Number: nStandardDateHour
Number: nStandardDateMinute
Number: nStandardDateSecond
Number: nStandardDateMilliseconds
Number: nStandardBias
String: sDaylightName
Number: nDaylightDateYear
Number: nDaylightDateMonth
Number: nDaylightDateDayOfWeek
Number: nDaylightDateDay
Number: nDaylightDateHour
Number: nDaylightDateMinute
Number: nDaylightDateSecond
Number: nDaylightDateMilliseconds
Number: nDaylightBias
Actions
Set nRet = GetTimeZoneInformation( nBias, sStandardName,
nStandardDateYear, nStandardDateMonth, nStandardDateDayOfWeek,
nStandardDateDay, nStandardDateHour, nStandardDateMinute,
nStandardDateSecond, nStandardDateMilliseconds,
nStandardBias, sDaylightName,
nDaylightDateYear, nDaylightDateMonth, nDaylightDateDayOfWeek,
nDaylightDateDay, nDaylightDateHour, nDaylightDateMinute,
nDaylightDateSecond, nDaylightDateMilliseconds,
nDaylightBias
)
Return nBias / 60

Regards,
Pavel Logvin

Return to “advanced.programming”

Who is online

Users browsing this forum: [Ccbot] and 0 guests