| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Semaphores (16 & 32) |
Hello Thomas! 01 Jun 96 16:32, Thomas Seeling wrote to Darin McBride: TS> Hallo, Darin! TS> *** Am Dienstag 28. Mai 1996 um 22:12 schrieb Darin McBride an TS> Doug Nazar: DM>>> I'm trying to block Sq386p.exe which uses DM>>> \SEM\SQUISH\DEFAULT, however the Semaphores included in the DM>>> Warp toolkit want me to use \SEM32\ to start. Can I just DM>>> use \SEM\ anyway? TS> I have written a small tool to accomplish this some time ago; it TS> is called sqisem11.zip (also contained in the TTick distribution TS> archive) and can create arbitrary 16- and 32-bit-semaphores. It TS> is compiled with emx 0.9b. I now have working 16/32 semaphores, but thanks anyway. :-) I have simple C++ classes that wrap the entire functionality the way I want to do it. :-) TS> Since Gnu C only generates 32-bit code, you have to thunk TS> manually (this consists of awkward macros and messing with TS> selectors and strange pointers into the stack :-) ). Watcom thunks mostly automatically. :-) DM>> somehow somewhere. So, I found SMSERIAL.DLL, and a bit of DM>> investigation DN>>> void _Far16 _Pascal BbsSemSerialize(char * semaphoreName, DN>>> char* dontKnow); TS> Is this the prototype for smserial.dll? I experimented with TS> smserial.dll some time ago. implib and emximp tell me: Yes - the char* dontKnow is the name of the environment variable that can override the semaphore name. :-) TS> It does not buy you anything, since it seems to be a 16-bit-DLL, Yup. TS> too. So either you create a thunked call to this function, or TS> call the 16-bit semaphore functions directly. You might want to TS> check for the environment variable BBSSEM which is used by Squish Got that. :-) TS> USHORT _THUNK_PASCAL_FUNCTION(Dos16CreateSem) (USHORT, PHSEM, TS> PSZ); Uck! That looks _awful_. Am I glad Watcom does it for me. :-) Thanks, Darin McBride --- GoldED/2 2.42.G0614* Origin: Tanktalus' Tower BBS/RPGs Galore! (1:342/5015) SEEN-BY: 50/99 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 @PATH: 342/5015 61 3615/50 396/1 270/101 712/515 711/808 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™.