home *** CD-ROM | disk | FTP | other *** search
- ;/*
- ;** getmanam.asm
- ;** contains: getmanam()
- ;*/
-
- GETMACHINENAME equ 05e00h ;Get Machine Name function number
- DOSCALL equ 021h ;DOS Software Interrupt
-
- include model.h
- include prologue.h
-
- pseg cgetmanam
-
-
- ;/*
- ;** int
- ;** getmanam(char *name,int *namenumind, int *namenumber)
- ;**
- ;** ARGUMENT(s)
- ;** name - pointer to a buffer of at least 16 bytes in length to
- ;** receive the name (terminated with 0)
- ;** namenumind - pointer to a Name/number indicator flag. After
- ;** calling GetComputerName() if namenumind == 0
- ;** the name is not defined. If namenumind != 0
- ;** the name and number are valid.
- ;** namenumber - NETBIOS name number for the name.
- ;**
- ;** DESCRIPTION
- ;** Returns the character identifier of the local computer. The IBM PC
- ;** Network Program must be loaded for the function call to execute
- ;** properly.
- ;**
- ;**
- ;** RETURNS
- ;** 0 if successful, else a DOS error code.
- ;**
- ;** AUTHOR
- ;** "" Fri 11-Nov-1988 16:01:57
- ;** Copyright (C)1988-1990 Greenleaf Software Inc. All Rights Reserved.
- ;**
- ;** MODIFICATIONS
- ;**
- ;*/
- cproc getmanam
- if _LDATA
- push ds
- lds dx,parm1_
- else
- mov dx,parm1_
- endif
- mov ax,GETMACHINENAME
- int DOSCALL
- jc getcompexit
- if _LDATA
- lds bx,parm3_
- else
- mov bx,parm2_
- endif
- xor ah,ah
- mov al,ch
- mov [bx],ax ;save indicator
- if _LDATA
- lds bx,parm5_
- else
- mov bx,parm3_
- endif
- mov al,cl
- mov [bx],al ;save namenumber
- xor ax,ax ;indicate success
- getcompexit:
- if _LDATA
- pop ds
- endif
- cproce
-
- endps
- end
-