public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* API info
@ 1997-07-25  3:27 Bardley09
  1997-07-25  9:56 ` Michael Hirmke
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Bardley09 @ 1997-07-25  3:27 UTC (permalink / raw)
  To: gnu-win32

Hello.  This is undoubtedly a tardbie sort of question, but i'll ask it anway
and depend upon your kindness.

Where can i find the documentation for the Win32 functions?  I'm interested
in writing programs which use all the windowing, buttoning, etc.  I'm hoping
one doesn't have to buy a thick MS manual or subscription.  I hope this is
clear.  I have very little programming experience.  Feel free to reply only
to me, if you like.  Thank you.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: API info
  1997-07-25  3:27 API info Bardley09
@ 1997-07-25  9:56 ` Michael Hirmke
  1997-07-25 11:33 ` Eric Britten
  1997-07-25 12:27 ` Mikey
  2 siblings, 0 replies; 9+ messages in thread
From: Michael Hirmke @ 1997-07-25  9:56 UTC (permalink / raw)
  To: gnu-win32

Hi Bardley09,

> 
> Hello.  This is undoubtedly a tardbie sort of question, but i'll ask it
> anway and depend upon your kindness.
> 
> Where can i find the documentation for the Win32 functions?  I'm interested

I have a api32.hlp here - don't know, where I got it from.
If you like, I mail it to you, but it is 4 MB in size !!

> in writing programs which use all the windowing, buttoning, etc.  I'm hoping
> one doesn't have to buy a thick MS manual or subscription.  I hope this is
> clear.  I have very little programming experience.  Feel free to reply only
> to me, if you like.  Thank you.

Bye.
Michael.
--
Michael Hirmke           | Telefon +49 (911) 557999
Georg-Strobel-Strasse 81 | FAX     +49 (911) 557664
90489 Nuernberg          | E-Mail  mh@mike.franken.de
                         | WWW     http://minimike.franken.de/
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: API info
  1997-07-25  3:27 API info Bardley09
  1997-07-25  9:56 ` Michael Hirmke
@ 1997-07-25 11:33 ` Eric Britten
  1997-07-25 12:27 ` Mikey
  2 siblings, 0 replies; 9+ messages in thread
From: Eric Britten @ 1997-07-25 11:33 UTC (permalink / raw)
  To: gnu-win32

You can get access an up to date online reference at
http://www.microsoft.com/msdn .  Then you must join the MSDN online.
It's free.  After you fill out some registration information you get
access to all sorts of development information including SDK, DDK,
books, journels, etc.  You can also sign up to have various newsletters
sent to your email address, and on occasion you may receive a CD from
microsoft.

Hope this helps.

Eric Britten

Bardley09@aol.com wrote:

> Where can i find the documentation for the Win32 functions?  I'm
> interested
> in writing programs which use all the windowing, buttoning, etc.  I'm
> hoping
> one doesn't have to buy a thick MS manual or subscription.  I hope
> this is
> clear.  I have very little programming experience.  Feel free to reply
> only
> to me, if you like.  Thank you.



-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: API info
  1997-07-25  3:27 API info Bardley09
  1997-07-25  9:56 ` Michael Hirmke
  1997-07-25 11:33 ` Eric Britten
@ 1997-07-25 12:27 ` Mikey
  1997-07-25 18:23   ` High resolution clock Joerg Lepler
  2 siblings, 1 reply; 9+ messages in thread
From: Mikey @ 1997-07-25 12:27 UTC (permalink / raw)
  To: Bardley09, gnu-win32

try
http://www.microsoft.com/msdn/
for docs, you'll have to sign up, but it's free

to use the win32api examples you will probably
have to get

SDK_4_ming_cygwin32.tar.gz
from 

http://wwwdim.uqac.uquebec.ca/ftp/pub/gnuwin32/bin/
Blatant Plug!!!

On Fri, 25 Jul 1997 06:26:36 -0400 (EDT), you wrote:

>
>Hello.  This is undoubtedly a tardbie sort of question, but i'll ask it anway
>and depend upon your kindness.
>
>Where can i find the documentation for the Win32 functions?  I'm interested
>in writing programs which use all the windowing, buttoning, etc.  I'm hoping
>one doesn't have to buy a thick MS manual or subscription.  I hope this is
>clear.  I have very little programming experience.  Feel free to reply only
>to me, if you like.  Thank you.
>-
>For help on using this list (especially unsubscribing), send a message to
>"gnu-win32-request@cygnus.com" with one line of text: "help".
>

(*jeffdb@netzone.nospam.com)
Remove *&.nospam from the above to reply
         Mikey
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 9+ messages in thread

* High resolution clock
  1997-07-25 12:27 ` Mikey
@ 1997-07-25 18:23   ` Joerg Lepler
  1997-07-26  0:36     ` root
                       ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Joerg Lepler @ 1997-07-25 18:23 UTC (permalink / raw)
  To: gnu-win32

Hi,

   Presently I am trying to do fine grain network performance measurments.
Therefore I would need some functions for high resolution clocks. I
remember that on a SUN or a SGI there were sw clocks with a resolution as
low as 108 nanoseconds. As I have to deal with latencies of 2-3
milliseconds, I need a clock with a resolution of at least one
millisecond. 

Does anyone know about such clock functions for the win32 environment?

Thanks,
Joerg

------- Joerg Lepler -----------------
E-Mail: joerg@std.saic.com
        SAIC
        Simulation Technology Division
        (703) 907 5378


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: High resolution clock
  1997-07-25 18:23   ` High resolution clock Joerg Lepler
  1997-07-26  0:36     ` root
@ 1997-07-26  0:36     ` Vladimir belkin
  1997-07-26  4:42       ` Valery Fine
  1997-08-04  9:43     ` Gerhard G. Thallinger
  2 siblings, 1 reply; 9+ messages in thread
From: Vladimir belkin @ 1997-07-26  0:36 UTC (permalink / raw)
  To: gnu-win32; +Cc: joerg

At 21:22 25.07.97 -0400, Joerg Lepler <joerg@std.saic.com> wrote:
>
>Hi,
>
>   Presently I am trying to do fine grain network performance measurments.
>Therefore I would need some functions for high resolution clocks. I
>remember that on a SUN or a SGI there were sw clocks with a resolution as
>low as 108 nanoseconds. As I have to deal with latencies of 2-3
>milliseconds, I need a clock with a resolution of at least one
>millisecond. 
>
>Does anyone know about such clock functions for the win32 environment?

The best way is to use:

BOOL QueryPerformanceCounter( LARGE_INTEGER  *lpliPerformanceCount 
 // address of current counter value
);
  and 
BOOL QueryPerformanceFrequency(
   LARGE_INTEGER  *lpliPerformanceFreq 	// address of currentfrequency
);	

// When these functions does not work it is possible to use
// multimedia timer API (libwinmm.a) :

    MMRESULT timeBeginPeriod(UINT uPeriod); 
    DWORD timeGetTime(VOID);
    MMRESULT timeEndPeriod(UINT uPeriod);

//////////////////// ------- //////////////////


Regards,

  Vladimir Belkin (vladimir.belkin@usa.net)
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: High resolution clock
  1997-07-25 18:23   ` High resolution clock Joerg Lepler
@ 1997-07-26  0:36     ` root
  1997-07-26  0:36     ` Vladimir belkin
  1997-08-04  9:43     ` Gerhard G. Thallinger
  2 siblings, 0 replies; 9+ messages in thread
From: root @ 1997-07-26  0:36 UTC (permalink / raw)
  To: Joerg Lepler; +Cc: gnu-win32

> 
>    Presently I am trying to do fine grain network performance measurments.
> Therefore I would need some functions for high resolution clocks. I
> remember that on a SUN or a SGI there were sw clocks with a resolution as
> low as 108 nanoseconds. As I have to deal with latencies of 2-3
> milliseconds, I need a clock with a resolution of at least one
> millisecond. 
> 
> Does anyone know about such clock functions for the win32 environment?
> 

If you are using a pentium, the best clock is the time stamp counter of the
CPU. This clock is incremented every clock cycle. If you are using a new
CPU at, say 200MHZ, you have a clock that is incremented 200 millions times
each second!

If you use the 'lcc-package', you can use the 'rdtsc' intrinsic that will
generate a floating point number containing the 64 bit rdtsc value. Under
GNU you will have to code that in assembler. I do not know for sure if the gnu
assembler supports rdtsc, but I believe it does.
	rdtsc leaves a 64 bit value in EAX EDX.
regards

-- 
Jacob Navia	Logiciels/Informatique
41 rue Maurice Ravel			Tel 01 48.23.51.44
93430 Villetaneuse 			Fax 01 48.23.95.39
France
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: High resolution clock
  1997-07-26  0:36     ` Vladimir belkin
@ 1997-07-26  4:42       ` Valery Fine
  0 siblings, 0 replies; 9+ messages in thread
From: Valery Fine @ 1997-07-26  4:42 UTC (permalink / raw)
  To: joerg, gnu-win32

On 26 Jul 97 at 10:49, Vladimir belkin wrote:

> At 21:22 25.07.97 -0400, Joerg Lepler <joerg@std.saic.com> wrote:
> >
> > As I have to deal with latencies of 2-3
> >milliseconds, I need a clock with a resolution of at least one
> >millisecond. 

 If the functions used for performance monitoring. 

 RegConnectRegistry
 RegQueryValueEx
 QueryPerformanceCounter
 QueryPerformanceFrequency 

doesn't work (because of your hardware) try

  "... GetTickCount function retrieves the number of milliseconds 
that have elapsed since Windows was started. 

   DWORD GetTickCount(VOID)

"

  Best regards,
                        VAlery

=================================================================
Dr. Valery Fine                  Telex : 911621 dubna su
    -----------
LCTA/Joint Inst.for NuclearRes   Phone : +7 09621 6 40 80
141980 Dubna, Moscow region      Fax   : +7 09621 6 51 45
Russia                           mailto:fine@main1.jinr.dubna.su                              

Dr. Valeri Faine
    ------------                 Phone: +41 22 767 6468
CERN                             FAX  : +41 22 767 7910
CH-1211 Geneva, 23               mailto:fine@mail.cern.ch 
Switzerland                      http://nicewww.cern.ch/~fine
                                 
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: High resolution clock
  1997-07-25 18:23   ` High resolution clock Joerg Lepler
  1997-07-26  0:36     ` root
  1997-07-26  0:36     ` Vladimir belkin
@ 1997-08-04  9:43     ` Gerhard G. Thallinger
  2 siblings, 0 replies; 9+ messages in thread
From: Gerhard G. Thallinger @ 1997-08-04  9:43 UTC (permalink / raw)
  To: gnu-win32

On Fri, 25 Jul 1997, Joerg Lepler wrote:

> 
> Hi,
> 
> Does anyone know about such clock functions for the win32 environment?
> 
There is the (undocumented) function NtQueryPerformanceCounter which
returns a 64 bit counter value and the frequency of the counter update.

I use this function on a Everex Dual Pentium Pro with 200 MHz. On this
computer the call to this function takes about 14 microseconds and the
counter has a resolution of 5 ns (= 1 / 200 MHz).  
On single processor machines calls may take significantly longer and
the resolution is much less, so your mileage may vary. See the recent
discussion on comp.os.ms-windows.programmer.nt.kernel-mode for details.

I attach an example how to use this function.

BTW: Which functions did you use on SUN and SGI ?

HTH

Gerhard G. Thallinger
Vexcel Imaging GmbH

---------------------------Start of program profile.c -------------------------
/*
 * This code is supplied 'as is', no warranty whatsoever implied.
 * Use at your own risk.
 */

#include <stdio.h>
#include <stdlib.h>

#include <windows.h>

typedef LONG NTSTATUS;
typedef NTSTATUS WINBASEAPI (WINAPI *NtQPC)(LARGE_INTEGER* pCounter,
                                            LARGE_INTEGER* pFrequency);

#undef __FUNC__
#define __FUNC__ "GetFuncAddress()"
NtQPC GetFuncAddress()
{
   NtQPC pTemp = NULL;
   NTSTATUS result = 0;
   int loadLib = 0;
   HMODULE hNtDll = NULL;

   hNtDll = GetModuleHandle("ntdll");
   if (hNtDll == NULL) {
      hNtDll = LoadLibrary("ntdll");
      loadLib = 1;
   }
   if (hNtDll != NULL) {
      pTemp = (NtQPC) GetProcAddress(hNtDll, "NtQueryPerformanceCounter");
      if (loadLib != 0) {
         FreeLibrary(hNtDll);
      }
   }
   return(pTemp);
}

#undef __FUNC__
#define __FUNC__ "main()"
main(int argc, char* argv[])
{
   NTSTATUS       result = 0;
   int            iLoop;
   LARGE_INTEGER  llCount;
   LARGE_INTEGER  llFrequency;
   NtQPC          NtQueryPerformanceCounter = NULL;

   NtQueryPerformanceCounter = GetFuncAddress();
   if (NtQueryPerformanceCounter != NULL) {
      for (iLoop = 0; iLoop < 1000000;iLoop++) {
         result = NtQueryPerformanceCounter(&llCount,&llFrequency);
      }
   } else {
      fprintf(stderr,"Could not determine function address");
   }
   return(0);
}
---------------------------End   of program profile.c -------------------------



-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~1997-08-04  9:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-07-25  3:27 API info Bardley09
1997-07-25  9:56 ` Michael Hirmke
1997-07-25 11:33 ` Eric Britten
1997-07-25 12:27 ` Mikey
1997-07-25 18:23   ` High resolution clock Joerg Lepler
1997-07-26  0:36     ` root
1997-07-26  0:36     ` Vladimir belkin
1997-07-26  4:42       ` Valery Fine
1997-08-04  9:43     ` Gerhard G. Thallinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).