Window API don't find the function: TzSpecificLocalTimeToSystemTime()

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Window API don't find the function: TzSpecificLocalTimeToSystemTime()

Thomas Steinbach
Hello,

I need to use the function "TzSpecificLocalTimeToSystemTime "
http://msdn.microsoft.com/en-us/library/ms725485(VS.85).aspx
but can't find that funtion in my mingw 3 installation. And also
can't find in the mingw 4 installation directory.
Where can I find that function? Else I get the warning
"implicit declaration" and while linking I get the
"undefined reference to `TzSpecificLocalTimeToSystemTime'"
error message.

I look for SystemTimeToTzSpecificLocalTime() function but
also can't find that function.
http://msdn.microsoft.com/en-us/library/ms724949(VS.85).aspx
It seems that all the more specialized time/date functions are not
implemented and can't be used within mingw :-(

btw: both are usual defined in winbase.h (MS VC headers)

Thomas



------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: Window API don't find the function: TzSpecificLocalTimeToSystemTime()

Dennis Wassel
2009/12/9 Thomas Steinbach <[hidden email]>:

> Hello,
>
> I need to use the function "TzSpecificLocalTimeToSystemTime "
> http://msdn.microsoft.com/en-us/library/ms725485(VS.85).aspx
> but can't find that funtion in my mingw 3 installation. And also
> can't find in the mingw 4 installation directory.
> Where can I find that function? Else I get the warning
> "implicit declaration" and while linking I get the
> "undefined reference to `TzSpecificLocalTimeToSystemTime'"
> error message.
>
> I look for SystemTimeToTzSpecificLocalTime() function but
> also can't find that function.
> http://msdn.microsoft.com/en-us/library/ms724949(VS.85).aspx
> It seems that all the more specialized time/date functions are not
> implemented and can't be used within mingw :-(
>
> btw: both are usual defined in winbase.h (MS VC headers)
>
> Thomas

You could try rolling your own add-on header + add-on kernel32 import
library and see if this works - I honestly have no idea if the concept
of multiple imp-libs for a single dll will fly (the other way round
seems to work, though).

If you think this is worth a try, do the neccessary definerey, and
create a def-file (mind the stdcall for kernel32) to feed into dlltool
and have it build an import library for those two functions.

If all necessary information to create header and import definitions
is available on msdn, you could also create a patch against mingw and
send it upstream.

Cheers,
Dennis

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: Window API don't find the function: TzSpecificLocalTimeToSystemTime()

Sergey Sarbash
In reply to this post by Thomas Steinbach
Thomas Steinbach пишет:
 > I need to use the function "TzSpecificLocalTimeToSystemTime "
 > http://msdn.microsoft.com/en-us/library/ms725485(VS.85).aspx
 > but can't find that funtion in my mingw 3 installation. And also
 > can't find in the mingw 4 installation directory.

Me too. :(

> I look for SystemTimeToTzSpecificLocalTime() function but
> also can't find that function.

It is. In the last mingw winapi release.

> btw: both are usual defined in winbase.h (MS VC headers)

As expected. It is there.


--
Yours sincerelly,
Sergey Sarbash.



------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: Window API don't find the function:TzSpecificLocalTimeToSystemTime()

Thomas Steinbach
In reply to this post by Dennis Wassel
Hello Dennis,

>> I need to use the function "TzSpecificLocalTimeToSystemTime "
>> http://msdn.microsoft.com/en-us/library/ms725485(VS.85).aspx

> You could try rolling your own add-on header + add-on kernel32 import
> library and see if this works - I honestly have no idea if the concept
> of multiple imp-libs for a single dll will fly (the other way round
> seems to work, though).

I started to code my own external functions, but have some problems with
my declarations/code. First: The sourcecode works well _in_ my programm,
but if I try to put the sourcecode outside of my programm, I get an error,
that
something is wrong with my sourcecode.

For example: I have a haeder file *.h where I declare my func

"WINBASEAPI BOOL WINAPI
TzSpecificLocalTimeToSystemTime(LPTIME_ZONE_INFORMATION, LPSYSTEMTIME,
LPSYSTEMTIME);"

and a funtion for that declaration in a seperated *.c file

WINBASEAPI BOOL WINAPI
TzSpecificLocalTimeToSystemTime(LPTIME_ZONE_INFORMATION
lpTimeZoneInformation, LPSYSTEMTIME lpLocalTime, LPSYSTEMTIME
lpUniversalTime)
{
    [...code...]
    return TRUE
}

I get this error

src/_time.c:19: error: syntax error before "BOOL"
src/_time.c:19: e

Line 19 is the line where my functions tarts

I tried to look for the "SystemTimeToTzSpecificLocalTime()" function
which is available in win-api 3.14 and how that is implemented
(the syntax and form) but can't find the source code.
Where can I find the source code for that function?
don't see that code in w32api-3.14-mingw32-src.tar.gz
or w32api-3.14-mingw32-dev.tar.gz
Are these funtions only "imported"? and there is no source code?

> If you think this is worth a try, do the neccessary definerey, and
> create a def-file (mind the stdcall for kernel32) to feed into dlltool
> and have it build an import library for those two functions.

> If all necessary information to create header and import definitions
> is available on msdn, you could also create a patch against mingw and
> send it upstream.

I will send my code (diff), if it is working well and if I figured out
where do I have to send such code.

Thomas


------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: Window API don't find the function:TzSpecificLocalTimeToSystemTime()

Dennis Wassel
2009/12/10 Thomas Steinbach <[hidden email]>:
> Where can I find the source code for that function?

Well, unless you bribe Bill, I am pretty sure you won't ...

> don't see that code in w32api-3.14-mingw32-src.tar.gz
> or w32api-3.14-mingw32-dev.tar.gz
> Are these funtions only "imported"? and there is no source code?

If these are WIN API functions, then yes, they should only be imported
(that is, unless they are overridden by mingw-specific
implementations, which I highly doubt in this case).

The technique, as mentioned before, is to create headers and an
appropriate import library for kernel32.dll, all of which the mingw
winapi provides. As Sergey said, get the latest release and you should
be fine.

Dennis

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: Window API don't find the function:TzSpecificLocalTimeToSystemTime()

Kai Tietz-2
In reply to this post by Thomas Steinbach
This function is described in msdn at
http://msdn.microsoft.com/en-us/library/ms725485%28VS.85%29.aspx

This function is available for client Windows XP, server Windows
Server 2003, and newer.
The definition should go in winbase.h (included by windows.h). It is
part of kernel32.lib (for kernel32.dll)

Definition should looks like for w32api

  WINBASEAPI WINBOOL WINAPI
TzSpecificLocalTimeToSystemTime(LPTIME_ZONE_INFORMATION
lpTimeZoneInformation,LPSYSTEMTIME lpLocalTime,LPSYSTEMTIME
lpUniversalTime);

Cheers,
Kai

PS: There are other functions of this family missing in w32api, too AFAICS.

--
|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: Window API don't find thefunction:TzSpecificLocalTimeToSystemTime()

Thomas Steinbach
In reply to this post by Dennis Wassel
Hello Dennis,

> Well, unless you bribe Bill, I am pretty sure you won't ... ;-)

>> don't see that code in w32api-3.14-mingw32-src.tar.gz
>> or w32api-3.14-mingw32-dev.tar.gz
>> Are these funtions only "imported"? and there is no source code?
>
> If these are WIN API functions, then yes, they should only be imported
> (that is, unless they are overridden by mingw-specific
> implementations, which I highly doubt in this case).

ok, begin to see...

> The technique, as mentioned before, is to create headers and an
> appropriate import library for kernel32.dll, all of which the mingw
> winapi provides. As Sergey said, get the latest release and you should
> be fine.

Argh, ok. That is the way how it works. Thought that all theese
functions are "new" implemented and in an own way to use it with MinGW.

But then I don't understand, why this function is not in the
kernel32.def file in the latest release... Should be simple
to add that, shouldn't it?

Anyway. Found the problem. It was just a missing
"#include <windows.h>" Now it works fine.

Searching now a description/tutorial and how to create such import
libs and header files for mingw and to use it with my programs.
Does anybody knows such a tutorial for less experienced
programmers?

Thomas


------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: Window API don't find thefunction: TzSpecificLocalTimeToSystemTime()

Thomas Steinbach
In reply to this post by Sergey Sarbash
Hello Sergey,

>> [...]
> Me too. :(
>
>> I look for SystemTimeToTzSpecificLocalTime() function but
>> also can't find that function.
>
> It is. In the last mingw winapi release.

Yes, found that now too.
If you still need the "TzSpecificLocalTimeToSystemTime" then
you can download the source for that function at:

http://www.failure.bravehost.com/prog/mingw/additions/

Either use it with the files and copy both to your project and
add lines like:

#ifdef __MINGW_H
#include "_time.h"
#endif

or copy the funtion and declaration to your sourcecode.
Enclosed with a #ifdef __MINGW_H statement, etc.
Then you can use that Function with MinGW too.

Comments about the sorucecode are welcome.

Thomas


------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: Window API don't find thefunction: TzSpecificLocalTimeToSystemTime()

Sergey Sarbash
Thomas Steinbach пишет:
> If you still need the "TzSpecificLocalTimeToSystemTime" then
> you can download the source for that function at:
>
> http://www.failure.bravehost.com/prog/mingw/additions/

Thank you for the link. I still think that it's better to add the
description of this function to MinGW WinAPI because it is already
implemented so we needn't to reinvent the wheel...
Your solution is the good thing for a while as temporary "crutch" until
then the maintainers update api's desc&lib. Thank you.

--
Best regards,
Sergey Sarbash.



------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: Window API don't find thefunction: TzSpecificLocalTimeToSystemTime()

Dennis Wassel
2009/12/11 Sergey Sarbash <[hidden email]>:

> Thank you for the link. I still think that it's better to add the
> description of this function to MinGW WinAPI because it is already
> implemented so we needn't to reinvent the wheel...
> Your solution is the good thing for a while as temporary "crutch" until
> then the maintainers update api's desc&lib. Thank you.

I feel confused - does the latest w32api contain defs and imports for
those time functions or doesn't it?

If not, have a look at
http://mingw.org/wiki/SubmitPatches
and send it upstream for others to benefit.

Thomas:
The first two google links when searching for "dlltool" are quite helpful.

Cheers,
Dennis

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: Window API don't find thefunction: TzSpecificLocalTimeToSystemTime()

Sergey Sarbash
Dennis Wassel пишет:
> I feel confused - does the latest w32api contain defs and imports for
> those time functions or doesn't it?

It does for the second mentioned (SystemTimeToTzSpecificLocalTime()).
TzSpecificLocalTimeToSystemTime() is missed there (winbase.h).

--
Truly yours,
Sergey Sarbash.



------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: Window API don't find thefunction:TzSpecificLocalTimeToSystemTime()

Thomas Steinbach
In reply to this post by Dennis Wassel
Hello Dennis,

> [...]
> If not, have a look at
> http://mingw.org/wiki/SubmitPatches
> and send it upstream for others to benefit.

I would like to send a patch, but stuck to get a reference copy of
the cvs repository because the password "anoncvs" seems to be
invalid. Either for mingwrt and the w32api repro.

> Thomas:
> The first two google links when searching for "dlltool" are quite helpful.

Thank you for your advice. Will study that.

Thomas



------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users