home *** CD-ROM | disk | FTP | other *** search
/ Network Support Encyclopedia 96-1 / novell-nsepro-1996-1-cd2.iso / download / netware / cinfo.exe / CONINFO.ASM < prev    next >
Assembly Source File  |  1995-04-25  |  2KB  |  100 lines

  1. ;****************************************************************************
  2. ;**    File:    CONINFO.C
  3. ;**
  4. ;**    Desc:     Demonstrates how to get connection information using
  5. ;**        assembly calls.
  6. ;**          
  7. ;**          
  8. ;**          
  9. ;**          
  10. ;**
  11. ;**        DISCLAIMER
  12. ;**
  13. ;**    Novell, Inc. makes no representations or warranties with respect to
  14. ;**    any NetWare software, and specifically disclaims any express or
  15. ;**    implied warranties of merchantability, title, or fitness for a
  16. ;**    particular purpose.  
  17. ;**
  18. ;**    Distribution of any NetWare software is forbidden without the
  19. ;**    express written consent of Novell, Inc.  Further, Novell reserves
  20. ;**    the right to discontinue distribution of any NetWare software.
  21. ;**    
  22. ;**    Novell is not responsible for lost profits or revenue, loss of use
  23. ;**    of the software, loss of data, costs of re-creating lost data, the
  24. ;**    cost of any substitute equipment or program, or claims by any party
  25. ;**    other than you.  Novell strongly recommends a backup be made before
  26. ;**    any software is installed.   Technical support for this software
  27. ;**    may be provided at the discretion of Novell.
  28. ;**
  29. ;**    Programmers:
  30. ;**
  31. ;**        Ini    Who                        Firm
  32. ;**        -----------------------------------------------------------------------
  33. ;**        KLB    Karl Bunnell                Novell Developer Support.
  34. ;**
  35. ;**    History:
  36. ;**
  37. ;**        When        Who    What
  38. ;**        -----------------------------------------------------------------------
  39. ;**        01-25-95    klb    First code.
  40. ;*
  41.  
  42.  
  43.  
  44.     Ideal
  45.     Model    Tiny
  46.     P286
  47.     CodeSeg
  48.     Org    100h
  49.  
  50. Start:    jmp    INIT_CODE
  51.  
  52. ;** Structure definitions and Variable declarations
  53.  
  54. Struc        requestBuffStruc
  55.         buffLength    dw    ?
  56.         function    db    ?
  57.         lConnNumber    db    ?
  58. EndS        requestBuffStruc
  59.  
  60. Struc        replyBuffStruc
  61.         buffLength    dw    ?
  62.         objectID    dd    ?
  63.         objectType    dw    ?
  64.         objectName    db    48 dup (?)
  65.         loginTime    db    8  dup (?)
  66. EndS        replyBuffStruc
  67.  
  68.     
  69. request        requestBuffStruc    ?
  70. reply        replyBuffStruc        ?
  71.  
  72.  
  73.         
  74.         Assume ds:DGROUP
  75.  
  76.  
  77. INIT_CODE:    mov    ah, 0DCh    ;Get connection number
  78.         int    21h
  79.         
  80.         ;** Set up request header
  81.  
  82.         mov    [request.buffLength], 2
  83.         mov    [request.function], 016h
  84.         mov    [request.lConnNumber], al
  85.         mov    si, offset request
  86.         
  87.         mov    [reply.buffLength], 64
  88.  
  89.         mov    di, offset reply
  90.  
  91.         mov    ah, 0E3h
  92.         int    21h
  93.          
  94. terminate:    mov    ah, 04Ch    ;Return mem. used back to DOS 
  95.         mov    al, 01h        ;And terminate program.
  96.         int    21h
  97.     
  98.  
  99.         End    Start
  100.