| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | DosStartTimer |
Was following this thread a while ago, and found the answer to your problem:
DM> I had a look at this but I have the same problem (error DM>
323 invalid semaphore handle). Using what function would I DM> asign a
semaphore for use by this call? (sorry I'm not DM> using "C"
and don't have the sample code you mentioned DM> above).
Try this:
APIRET rc;
HTIMER Timer;
HEV SemHandle;
// Create event semaphore
rc=DosCreateEventSem((PSZ)NULL,&SemHandle,DC_SEM_SHARED,FALSE);if (rc!=0) {
ThreadRC=1;
_endthread();
};
// Set up timer to activate semaphore every 2 clock ticks
DosQuerySysInfo(QSV_TIMER_INTERVAL,QSV_TIMER_INTERVAL, &tms,
sizeof(tms));rc=DosStartTimer(tms*2/100,(HSEM)SemHandle,&Timer);
if (rc!=0) {
DosCloseEventSem(SemHandle);
ThreadRC=2;
_endthread();
};
--- Maximus/2 3.01
* Origin: Frog Hollow Port Moody BC 604-469-0264/0284 (1:153/290)SEEN-BY: 50/99 78/0 270/101 620/243 711/401 409 410 413 430 808 809 934 955 SEEN-BY: 712/407 515 517 628 713/888 800/1 7877/2809 @PATH: 153/290 2 716 920 270/101 712/515 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.