AnsweredAssumed Answered

vrf Vrf - Calling a "WINAPI Sleep Function from VEE 5.01

Question asked by VRFuser on Nov 28, 1999
Hello!

> How do you call the "Sleep" function
> (I think that is what it is called)

It is indeed.

> in order to make VEE be less processor
> intensive. I recall some discussion on
> this a while back.

Well, unfortunately that won't really work. The best way I've found to get
the rest of the system running fairly decently is to right click My Computer
and select Properties... Go to the Performance tab, and pull the Application
Performance slider all the way left (to None) to give the foreground app no
performance boost (assuming that VEE will be the foreground application).

The basic problem with sleep is that it sleeps. Sure, you can call
Sleep(250) and everything else can have up to a quarter second to execute,
but for that quarter second your VEE user interface will be completely dead.
This can cause users undue angst. Things look and feel "choppy".

At any rate, all you need to call externally is a code repository (a dll)
and a definition file to tell VEE what function you want to use in the dll,
what it returns and what parameters it needs. For sleep, the definition is:

void Sleep(int dwMillisec);

Check in the Advanced Programming manual starting on page 33.

Almost all Windows functions are in the SDK documentation. If you want a
peek at what's available, go to your system32 directory and right click
kernel32.dll and select Quick View. All the functions contained in that dll
are listed under the Export Table section.

Shawn Fessenden
Mgr., Technical Support
Oswego Software, Inc.
mailto:shawn@oswegosw.com
http://www.oswegosw.com

---------------------------------------------------------------------
This is the "vrf" maillist, managed by Majordomo.  To send messages to
this maillist, just email to "vrf@lvld.hp.com".  Subscriptions and
unsubscriptions are done through the address "vrf-request@lvld.hp.com".
If you need details, just send a message containing the text "help"
to "vrf-request@lvld.hp.com".
---------------------------------------------------------------------

Outcomes