home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
dosapi.zip
/
DOSAPI.C
next >
Wrap
C/C++ Source or Header
|
1994-08-16
|
3KB
|
166 lines
#include "dosapi.h"
unsigned int Dos32CreateEventSem( char far *Crt_Sem_Name,
unsigned long far *Crt_Sem_Handle, unsigned int Crt_Sem_Attr,
unsigned char Crt_Sem_State )
{
unsigned return_code;
asm {
mov ah, 0x64
mov bx, 0x0144
mov cx, 0x636C
push ds
mov dx, Crt_Sem_Attr
mov al, Crt_Sem_State
les di, Crt_Sem_Name
lds si, Crt_Sem_Handle
int 0x21
pop ds
mov return_code, ax
}
return( return_code );
}
unsigned int Dos32OpenEventSem( char far *Opn_Sem_Name,
unsigned long far *Opn_Sem_Handle )
{
unsigned return_code;
asm {
mov ah, 0x64
mov bx, 0x0145
mov cx, 0x636C
push ds
les di, Opn_Sem_Name
lds si, Opn_Sem_Handle
int 0x21
pop ds
mov return_code, ax
}
return( return_code );
}
unsigned int Dos32CloseEventSem( unsigned long Cls_Sem_Handle )
{
unsigned return_code;
asm {
mov ah, 0x64
mov bx, 0x0146
mov cx, 0x636C
les si, Cls_Sem_Handle
push es
pop dx
int 0x21
mov return_code, ax
}
return( return_code );
}
unsigned int Dos32PostEventSem( unsigned long Pst_Sem_Handle )
{
unsigned return_code;
asm {
mov ah, 0x64
mov bx, 0x0148
mov cx, 0x636C
les si, Pst_Sem_Handle
push es
pop dx
int 0x21
mov return_code, ax
}
return( return_code );
}
unsigned int Dos32ResetEventSem( unsigned long Rst_Sem_Handle,
unsigned int far *Rst_Sem_Count )
{
unsigned return_code;
asm {
mov ah, 0x64
mov bx, 0x0147
mov cx, 0x636C
les si, Rst_Sem_Handle
push es
pop dx
les di, Rst_Sem_Count
int 0x21
mov return_code, ax
}
return( return_code );
}
unsigned int Dos32QueryEventSem( unsigned long Qry_Sem_Handle,
unsigned int far *Qry_Sem_Count )
{
unsigned return_code;
asm {
mov ah, 0x64
mov bx, 0x014A
mov cx, 0x636C
les si, Qry_Sem_Handle
push es
pop dx
les di, Qry_Sem_Count
int 0x21
mov return_code, ax
}
return( return_code );
}
unsigned int Dos32WaitEventSem( unsigned long Wat_Sem_Handle,
unsigned char Wat_Sem_Seconds )
{
unsigned return_code;
asm {
mov ah, 0x64
mov bx, 0x0149
mov cx, 0x636C
les si, Wat_Sem_Handle
push es
pop dx
mov al, Wat_Sem_Seconds
int 0x21
mov return_code, ax
}
return( return_code );
}
unsigned int DosStartSession( Session_Data *Sess_Pointer )
{
unsigned return_code;
asm {
mov ah, 0x64
mov bx, 0x0025
mov cx, 0x636C
push ds
lds si, Sess_Pointer
int 0x21
pop ds
mov return_code, ax
}
return( return_code );
}