digitalmars.D - SetTimer function not found?
- "Godlike" <darkandan windowslive.com> Jun 02 2012
- "Martin Nowak" <dawg dawgfoto.de> Jun 02 2012
- Dmitry Olshansky <dmitry.olsh gmail.com> Jun 02 2012
- Dmitry Olshansky <dmitry.olsh gmail.com> Jun 02 2012
- Dmitry Olshansky <dmitry.olsh gmail.com> Jun 02 2012
- "Godlike" <darkandan windowslive.com> Jun 02 2012
- "John Chapman" <johnch_atms hotmail.com> Jun 02 2012
- Kevin Cox <kevincox.ca gmail.com> Jun 02 2012
- "John Chapman" <johnch_atms hotmail.com> Jun 02 2012
- "John Chapman" <johnch_atms hotmail.com> Jun 02 2012
Hi Im experiencing problems with writing a windows program in D language, it's really good language width C++ speed and C# easy of use but why there's no critically important for windows programmers function SetTimer? Is there a reimplementation or something? Regards
Jun 02 2012
On Sat, 02 Jun 2012 11:46:39 +0200, Godlike <darkandan windowslive.com> wrote:Hi Im experiencing problems with writing a windows program in D language, it's really good language width C++ speed and C# easy of use but why there's no critically important for windows programmers function SetTimer? Is there a reimplementation or something? Regards
The core.sys.windows.* modules are translated by hand. They're not yet complete and would benefit from your contribution. https://github.com/D-Programming-Language/druntime/tree/master/src/core/sys/windows martin
Jun 02 2012
On 02.06.2012 14:35, Kevin Cox wrote:On Jun 2, 2012 6:33 AM, "John Chapman" <johnch_atms hotmail.com <mailto:johnch_atms hotmail.com>> wrote: > > On Saturday, 2 June 2012 at 10:11:02 UTC, Godlike wrote: >> >> On Saturday, 2 June 2012 at 10:00:07 UTC, Martin Nowak wrote: > > Just add these declarations to the appropriate module: > > extern(Windows) { > > alias void function(HWND, uint, uint, uint) TIMERPROC;
Better check this callback definition - it might be extern(System) or extern(C).> > uint SetTimer(HWND hWnd, uint uIDEvent, uint uElapse, TIMERPROC lpTimerFunc); > > BOOL KillTimer(HWND hWnd, uint uIDEvent); > } Better yet, put them into std.windows and submit a pull request :P
-- Dmitry Olshansky
Jun 02 2012
On 02.06.2012 14:55, John Chapman wrote:On Saturday, 2 June 2012 at 10:47:37 UTC, Dmitry Olshansky wrote:On 02.06.2012 14:35, Kevin Cox wrote:On Jun 2, 2012 6:33 AM, "John Chapman" <johnch_atms hotmail.com <mailto:johnch_atms hotmail.com>> wrote:On Saturday, 2 June 2012 at 10:11:02 UTC, Godlike wrote:On Saturday, 2 June 2012 at 10:00:07 UTC, Martin Nowak
Just add these declarations to the appropriate module: extern(Windows) { alias void function(HWND, uint, uint, uint) TIMERPROC;
Better check this callback definition - it might be extern(System) or extern(C).
No, it's extern(Windows). And actually it's already defined in core.sys.windows.windows.
Right, which is exactly the same as extern(System) "expands" to on windows platform. -- Dmitry Olshansky
Jun 02 2012
On 02.06.2012 15:08, Dmitry Olshansky wrote:On 02.06.2012 14:55, John Chapman wrote:On Saturday, 2 June 2012 at 10:47:37 UTC, Dmitry Olshansky wrote:On 02.06.2012 14:35, Kevin Cox wrote:On Jun 2, 2012 6:33 AM, "John Chapman" <johnch_atms hotmail.com <mailto:johnch_atms hotmail.com>> wrote:On Saturday, 2 June 2012 at 10:11:02 UTC, Godlike wrote:On Saturday, 2 June 2012 at 10:00:07 UTC, Martin Nowak
Just add these declarations to the appropriate module: extern(Windows) { alias void function(HWND, uint, uint, uint) TIMERPROC;
Better check this callback definition - it might be extern(System) or extern(C).
No, it's extern(Windows). And actually it's already defined in core.sys.windows.windows.
Right, which is exactly the same as extern(System) "expands" to on windows platform.
-- Dmitry Olshansky
Jun 02 2012
On Saturday, 2 June 2012 at 10:00:07 UTC, Martin Nowak wrote:On Sat, 02 Jun 2012 11:46:39 +0200, Godlike <darkandan windowslive.com> wrote:Hi Im experiencing problems with writing a windows program in D language, it's really good language width C++ speed and C# easy of use but why there's no critically important for windows programmers function SetTimer? Is there a reimplementation or something? Regards
The core.sys.windows.* modules are translated by hand. They're not yet complete and would benefit from your contribution. https://github.com/D-Programming-Language/druntime/tree/master/src/core/sys/windows martin
'Nowak' Are you from Poland? If yes im too. I dont have knowledge about making bindings or other low-level things so i cant help you, im just surprised that there's no that important function but there are others not important if compared to this. How about this? http://www.dsource.org/projects/bindings/browser/trunk/win32 I cant manage it to work, compiled it but conflict errors on import. I really need this function otherwise im cooked.
Jun 02 2012
On Saturday, 2 June 2012 at 10:11:02 UTC, Godlike wrote:On Saturday, 2 June 2012 at 10:00:07 UTC, Martin Nowak wrote:On Sat, 02 Jun 2012 11:46:39 +0200, Godlike <darkandan windowslive.com> wrote:Hi Im experiencing problems with writing a windows program in D language, it's really good language width C++ speed and C# easy of use but why there's no critically important for windows programmers function SetTimer? Is there a reimplementation or something? Regards
I cant manage it to work, compiled it but conflict errors on import. I really need this function otherwise im cooked.
Just add these declarations to the appropriate module: extern(Windows) { alias void function(HWND, uint, uint, uint) TIMERPROC; uint SetTimer(HWND hWnd, uint uIDEvent, uint uElapse, TIMERPROC lpTimerFunc); BOOL KillTimer(HWND hWnd, uint uIDEvent); }
Jun 02 2012
--0015175cd9e8c1b4a004c17adadd Content-Type: text/plain; charset=UTF-8 On Jun 2, 2012 6:33 AM, "John Chapman" <johnch_atms hotmail.com> wrote:On Saturday, 2 June 2012 at 10:11:02 UTC, Godlike wrote:On Saturday, 2 June 2012 at 10:00:07 UTC, Martin Nowak wrote:
Just add these declarations to the appropriate module: extern(Windows) { alias void function(HWND, uint, uint, uint) TIMERPROC; uint SetTimer(HWND hWnd, uint uIDEvent, uint uElapse, TIMERPROC
BOOL KillTimer(HWND hWnd, uint uIDEvent); }
Better yet, put them into std.windows and submit a pull request :P --0015175cd9e8c1b4a004c17adadd Content-Type: text/html; charset=UTF-8 <p><br> On Jun 2, 2012 6:33 AM, "John Chapman" <<a href="mailto:johnch_atms hotmail.com">johnch_atms hotmail.com</a>> wrote:<br> ><br> > On Saturday, 2 June 2012 at 10:11:02 UTC, Godlike wrote:<br> >><br> >> On Saturday, 2 June 2012 at 10:00:07 UTC, Martin Nowak wrote:<br> ><br> > Just add these declarations to the appropriate module:<br> ><br> > extern(Windows) {<br> ><br> > alias void function(HWND, uint, uint, uint) TIMERPROC;<br> ><br> > uint SetTimer(HWND hWnd, uint uIDEvent, uint uElapse, TIMERPROC lpTimerFunc);<br> ><br> > BOOL KillTimer(HWND hWnd, uint uIDEvent);<br> > }</p> <p>Better yet, put them into std.windows and submit a pull request :P </p> --0015175cd9e8c1b4a004c17adadd--
Jun 02 2012
On Saturday, 2 June 2012 at 10:47:37 UTC, Dmitry Olshansky wrote:On 02.06.2012 14:35, Kevin Cox wrote:On Jun 2, 2012 6:33 AM, "John Chapman" <johnch_atms hotmail.com <mailto:johnch_atms hotmail.com>> wrote:On Saturday, 2 June 2012 at 10:11:02 UTC, Godlike wrote:On Saturday, 2 June 2012 at 10:00:07 UTC, Martin Nowak
Just add these declarations to the appropriate module: extern(Windows) { alias void function(HWND, uint, uint, uint) TIMERPROC;
Better check this callback definition - it might be extern(System) or extern(C).
No, it's extern(Windows). And actually it's already defined in core.sys.windows.windows.uint SetTimer(HWND hWnd, uint uIDEvent, uint uElapse,
lpTimerFunc);BOOL KillTimer(HWND hWnd, uint uIDEvent); }
Better yet, put them into std.windows and submit a pull request :P
Jun 02 2012
On Saturday, 2 June 2012 at 10:35:17 UTC, Kevin Cox wrote:On Jun 2, 2012 6:33 AM, "John Chapman" <johnch_atms hotmail.com> wrote:On Saturday, 2 June 2012 at 10:11:02 UTC, Godlike wrote:On Saturday, 2 June 2012 at 10:00:07 UTC, Martin Nowak wrote:
Just add these declarations to the appropriate module: extern(Windows) { alias void function(HWND, uint, uint, uint) TIMERPROC; uint SetTimer(HWND hWnd, uint uIDEvent, uint uElapse, TIMERPROC
BOOL KillTimer(HWND hWnd, uint uIDEvent); }
Better yet, put them into std.windows and submit a pull request :P
Done.
Jun 02 2012









Dmitry Olshansky <dmitry.olsh gmail.com> 