home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-11-21 | 27.9 KB | 1,749 lines |
- .de }n
- .bp
- .sp .5i
- ..
- .wh -.8i }n
- .sp .5i
- .po -.4i
- .ll 7.5i
- .ps 9
- .vs 9
- .in 0i
- .ta 1.63265i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_ENDCAP() Cancel a specific NetWare print queue capture
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_ENDCAP()
- Cancel a specific NetWare print queue capture
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_ENDCAP( [ <nLPTPortNumber> ] ) -> lResult
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- \fB<nLPTPortNumber>\fR is the captured LPT port to cancel\. If the
- parameter is omitted, the default port of LPT1: is used\.
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- \.T\. if successful
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.32i
- This routine is used to close a specific capture on the specified LPT
- port\. When this command is issued, the LPT port is no longer redirected
- to the print queue, and any information waiting in queue to be printed
- will be printed\.
- .sp
- This routine was designed and written for Advanced NetWare 286 v 2\.1 or
- NetWare 386 v 3\.0 or better\. It has been tested on Advanced NetWare 286
- v 2\.15 rev A & C and NetWare 386 v 3\.0\.
- .sp
- This source code was written for Microsoft Macro Assembler v 5\.1\. It
- should work with any assembler with minor modifications\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.32i
- .br
- (in DOS)
- .br
- F:>CAPTURE S=ServerName Q=PrintQueueName T=0 L=2
- .br
- Device LPT2: re-routed to queue PrintQueueName on server ServerName\.
- .br
- F:>CAPTURE S=ServerName Q=PrintQueueName T=0 L=1
- .br
- Device LPT1: re-routed to queue PrintQueueName on server ServerName\.
- .sp
- .br
- (in your Clipper application)
- .br
- FT_ENDCAP(2) // Closes LPT2: capture, and flushes print buffer
- .br
- \.\.\.
- .br
- \.\.\.
- .ta 1.04i
- .br
- FT_ENDCAP() // Closes LPT1: (default) capture, and flushes
- .br
- .ta
- .in 1.36i
- .ta 0.48i
- .br
- // print buffer
- .br
- .ta
- .sp
- .in 0.08i
- \fBSource:\fR ENDCAP\.ASM
- .sp
- \fBAuthor:\fR James R\. Zack
- .in 0i
- .ta 1.63265i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_LOGOUT() Logout from all currently connected NetWare file servers
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_LOGOUT()
- Logout from all currently connected NetWare file servers
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_LOGOUT() -> NIL
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- None
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- NIL
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.32i
- This routine is used to log the current user out of all connected file
- servers and return control back to Clipper\. This is handy for writing
- your own login screens in Clipper\. After the FT_LOGOUT() function is
- called, you could have a login screen come up, and the users would
- never see the DOS prompt again!
- .sp
- This routine was designed and written for Advanced NetWare 286 v 2\.0 or
- NetWare 386 v 3\.0 or better\. It has been tested on Advanced NetWare 286
- v 2\.15 rev A & C, NetWare 386 v 3\.0\.
- .sp
- Written in Microsoft MASM v5\.1
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.32i
- .br
- FT_LOGOUT()
- .br
- DO LOGINPRG
- .sp
- .in 0.08i
- \fBSource:\fR LOGOUT\.ASM
- .sp
- \fBAuthor:\fR James R\. Zack
- .in 0i
- .ta 1.63265i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_NOVDMP2() Determine Novell server\'s dynamic memory area 2 availability
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_NOVDMP2()
- Determine Novell server\'s dynamic memory area 2 availability
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.32i
- \fBFT_NOVDMP2() -> nDMP2
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.32i
- None
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.32i
- The total available dynamic memory area 2 on current server, in bytes\.
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.24i
- This function is used primarily on Novell 2\.15 TTS Servers\. Dynamic
- Memory area 2 is where the transaction tracking takes place\. This
- function allows you to query the ability of the server to handle any
- transactions you may wish to start\. (I personally don\'t let the area
- fall below 8K)\. It is generally only useful in large batch situations
- and if you are using NETLIB\'s TTS capability\.
- .sp
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.24i
- .ta 1.44i
- .br
- t_trans(ON) // Netlib function
- .br
- .ta
- .br
- DO WHILE FT_NOVDMP2() > 8000 \.AND\. ! Eof()
- .sp
- .in 0.48i
- .br
- REPLACE foo WITH \'bar\'
- .br
- SKIP
- .sp
- .in 0.24i
- .br
- ENDDO
- .br
- t_trans(OFF)
- .sp
- .sp
- .in 0.08i
- \fBSource:\fR NOVDMP2\.ASM
- .sp
- \fBAuthor:\fR David Minter
- .in 0i
- .ta 1.63265i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_NOVPURGE() Purge all deleted files on a Novell server
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_NOVPURGE()
- Purge all deleted files on a Novell server
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.32i
- \fBFT_NOVPURGE() -> lTemp
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.32i
- None
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.32i
- \.T\. if successful, otherwise \.F\.
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.24i
- This function is to purge those files that a workstation has
- previously deleted\. This function only works on a Novell network\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.24i
- .br
- ERASE FILE foo\.bar
- .br
- ERASE FILE foo2\.bar
- .br
- ERASE FILE foo3\.bar
- .br
- ? FT_NOVPURGE()
- .sp
- .in 0.08i
- \fBSource:\fR NOVPURGE\.ASM
- .sp
- \fBAuthor:\fR David Minter
- .in 0i
- .ta 1.63265i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_NWLSTAT() Return the current Novell NetWare logical station number
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_NWLSTAT()
- Return the current Novell NetWare logical station number
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_NWLSTAT() -> nStatNum
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- None
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- A numeric corresponding to the current logical station number
- assigned by NetWare\.
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- In order to find out information about a particular node logged
- in to a NetWare server, you will need the logical
- .ta 4.32i
- station number, also known as a "connection number\." This
- .br
- .ta
- function will return that number\. This will be a number from 1 to 100
- under NetWare 286, or from 1 to 250 under NetWare 386\. This is *not*
- the same as a physical station number\.
- .sp
- This function requires FT_INT86()\.
- .sp
- This function does NOT test for the existence of the NetWare shell\.
- The behavior is undefined if no shell is loaded\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.4i
- QOut( "Logical station: " + str( FT_NWLSTAT() ) )
- .sp
- .in 0.08i
- \fBSource:\fR NWLSTAT\.PRG
- .sp
- \fBAuthor:\fR Glenn Scott
- .in 0i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_NWSEMCLOSE() Close a NetWare semaphore
- .br
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_NWSEMCLOSE()
- Close a NetWare semaphore
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- .ta 2.24i
- \fBFT_NWSEMCLOSE( <nHandle> ) -> nRc
- .br
- .ta
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- \fB<nHandle>\fR is the semaphore handle, returned from a previous call
- to FT_NWSEMOPEN()\.
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- nRc, a numeric, as follows:
- .sp
- .in 0.96i
- 0 - success
- .in 0.8i
- 255 - invalid semaphore handle
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- Call FT_NWSEMCLOSE() when the app is finished\. This decrements
- the open count for the semaphore\. If the open count hits zero,
- the semaphore is deleted by NetWare\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.4i
- QOUT( "Close returns: " + STR( FT_NWSEMCLOSE( nHandle ) ) )
- .sp
- .in 0.08i
- \fBSource:\fR NWSEM\.PRG
- .sp
- \fBAuthor:\fR Glenn Scott
- .in 0i
- .sp
- .in 1.5i
- .ti -1.5i
- .ta 1.5i
- .ft B
- See Also:
- .ft R
- FT_NWSEMOPEN()
- , FT_NWSEMEX()
- , FT_NWSEMWAIT()
- , FT_NWSEMSIG()
- , FT_NWSEMLOCK()
- .ta 1.63265i
- .in 0i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_NWSEMEX() Examine a NetWare semaphore\'s value and open count
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_NWSEMEX()
- Examine a NetWare semaphore\'s value and open count
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.48i
- \fBFT_NWSEMEX( <nHandle>, <@nValue>, <@nOpenCnt> ) -> nRc
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.48i
- \fB<nHandle>\fR is the semaphore handle, returned from a previous call
- to FT_NWSEMOPEN()\.
- .sp
- \fB<@nValue>\fR will get the current semaphore value\. THIS NUMERIC
- ARGUMENT MUST BE PASSED BY REFERENCE!
- .sp
- \fB<@nOpenCnt>\fR will get the current number of workstations
- that have opened the semaphore\. THIS NUMERIC ARGUMENT MUST BE
- PASSED BY REFERENCE!
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.48i
- nRc, a numeric, as follows:
- .sp
- .in 0.96i
- 0 - success
- .in 0.8i
- 255 - invalid semaphore handle
- .sp
- .in 0.48i
- In addition, nValue will be set to the semaphore\'s current value,
- and nOpenCnt will be set to the number of stations that have
- opened the semaphore\.
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.48i
- See the description for FT_NWSEMOPEN()\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.32i
- .br
- nInitVal := 2
- .ta 0.72i
- .br
- nHandle := 0
- .br
- .ta
- .br
- nOpenCnt := 0
- .sp
- .br
- FT_NWSEMOPEN( "Semaphore Test", nInitVal, @nHandle, @nOpenCnt )
- .sp
- .br
- nRc := FT_NWSEMWAIT( nHandle )
- .in 0.64i
- .br
- IF nRc == 254
- .in 0.56i
- .br
- QOUT( "All slots for this resource are currently in use" )
- .br
- QUIT
- .in 0.32i
- .br
- ENDIF
- .sp
- .br
- FT_NWSEMEX( nHandle, @nValue, @nOpenCnt )
- .br
- QOUT( "Semaphore test -> Open at [" + ;
- .in 0.8i
- .ta 2.4i
- .br
- ALLTRIM(STR(nOpenCnt)) + ;
- .br
- .ta
- .ta 2.4i
- .br
- "] stations, value is [" + ;
- .br
- .ta
- .br
- ALLTRIM(STR(nValue)) + "]" )
- .sp
- .in 0.08i
- \fBSource:\fR NWSEM\.PRG
- .sp
- \fBAuthor:\fR Glenn Scott
- .in 0i
- .sp
- .in 1.5i
- .ti -1.5i
- .ta 1.5i
- .ft B
- See Also:
- .ft R
- FT_NWSEMOPEN()
- , FT_NWSEMWAIT()
- , FT_NWSEMSIG()
- , FT_NWSEMCLOSE()
- , FT_NWSEMLOCK()
- .ta 1.63265i
- .in 0i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_NWSEMLOCK() Perform a semaphore "lock"
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_NWSEMLOCK()
- Perform a semaphore "lock"
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_NWSEMLOCK ( <cSemaphore> ) -> lRet
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- \fB<cSemaphore>\fR is the name of a semaphore you want to "lock\."
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- lRet == \.t\. if you get the lock, \.f\. if you don\'t\.
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- FT_NWSEMLOCK() uses the Nanforum Toolkit\'s NetWare Semaphore API functions
- in order to provide a general purpose "lock" you can use in
- a NetWare environment\.
- .sp
- An interesting byproduct of NetWare\'s semaphore functions is
- the "open count" which tells you how many connections have this
- semaphore open\. This is different from the semaphore\'s _value_,
- which is set when the semaphore is opened and changed with
- signal() and wait()\.
- .sp
- The point of semaphores is that you don\'t care how many users
- are using the resource; you merely wait on a semaphore until
- the resource becomes available or you give up\. When you\'re done,
- you signal it and off you go\.
- .sp
- Back to the open count\. FT_NWSEMLOCK() opens the semaphore
- as named in <cSemaphore>\. After it is opened, the open count
- is checked\. If it is anything other than 1, that means someone
- else has it (or you failed in your open) so the semaphore is
- closed and the "lock" is refused\. If the value is 1, then your
- app is that 1 station so the "lock" is granted\.
- .sp
- You can use a semaphore lock to control access to anything
- that Clipper\'s RLOCK() and FLOCK() can\'t help you with, such
- as text files written with the low level file i/o functions,
- etc\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.4i
- .br
- IF FT_NWSEMLOCK( "k:\\apps\\error\.log" )
- .in 0.72i
- .br
- // Note, you aren\'t actually LOCKING this file, you are
- .br
- // just locking a semaphore by the same name\. As long as
- .br
- // all apps that might be using this file are cooperating
- .br
- // with the same kind of semaphore lock, you can effectively
- .br
- // control access to the file\.
- .in 0.56i
- .br
- ELSE
- .in 0.72i
- .br
- QOUT("Couldn\'t lock file\.")
- .in 0.56i
- .br
- ENDIF
- .sp
- .in 0.08i
- \fBSource:\fR NWSEM\.PRG
- .sp
- \fBAuthor:\fR Glenn Scott
- .in 0i
- .sp
- .in 1.5i
- .ti -1.5i
- .ta 1.5i
- .ft B
- See Also:
- .ft R
- FT_NWSEMOPEN()
- , FT_NWSEMEX()
- , FT_NWSEMWAIT()
- , FT_NWSEMSIG()
- .ta 1.63265i
- .in 0i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_NWSEMOPEN() Open or create a NetWare semaphore
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_NWSEMOPEN()
- Open or create a NetWare semaphore
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.48i
- \fBFT_NWSEMOPEN( <cName>, <nInitVal>, <@nHandle>, <@nOpenCnt> ) -> nRc
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.48i
- \fB<cName>\fR is the semaphore name, maximum length is 127 characters\.
- .sp
- \fB<nInitVal>\fR is the initial value for the semaphore\. It must start
- as a positive number, to a maximum of 127\.
- .sp
- \fB<@nHandle>\fR is the semaphore handle\. THIS MUST BE PASSED BY
- .ta 0.96i
- REFERENCE! On exit, \fB<nHandle>\fR will contain a numeric value that
- .br
- .ta
- refers to the opened semaphore\. You will need it to pass to
- .ta 2.24i
- other semaphore functions! PASS IT BY REFERENCE!
- .br
- .ta
- .sp
- \fB<@nOpenCnt>\fR is the number of stations that have opened the
- semaphore\. THIS MUST BE PASSED BY REFERENCE! On exit, \fB<nOpenCnt>
- will contain a numeric value\.
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.48i
- nRc, a numeric result code, as follows:
- .sp
- .in 0.96i
- .br
- 0 - success
- .in 0.8i
- .br
- 254 - Invalid semaphore name length
- .br
- 255 - Invalid semaphore value
- .sp
- .in 0.48i
- <nHandle> will contain the semaphore handle, and
- <nOpenCnt> will contain the number of stations that have opened
- the semaphore\.
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.48i
- A semaphore is simply a label that indirectly controls network
- activity\. There is a semaphore name, which can be up to 127
- characters, and an associated value, which can range from 0 to
- 127\.
- .sp
- A semaphore can be used for many things, but is most often used
- to limit the number of users in an application, and to control
- access to a network resource\.
- .sp
- A semaphore essentially allows you to place locks on resources
- other than files\.
- .sp
- An application begins the process by calling FT_NWSEMOPEN()\.
- If the semaphore doesn\'t exist, NetWare will create it\.
- FT_NWSEMOPEN() returns a handle that is used in other semaphore
- calls\.
- .sp
- Applications use FT_NWSEMWAIT() to wait for a semaphore to
- become available\. FT_NWSEMWAIT() decrements the semaphore\'s
- value by 1\. If the value > 0, then the application should
- be allowed to access the semaphore\'s resource\. If the value
- goes negative, then the application is placed in a queue\.
- How long your app is in the queue is determined by how you
- set the timeout parameter\. If you can\'t get the resource in
- the time you allot, you\'re let out of the queue and the
- value increments by 1 again\.
- .sp
- When an application finishes with a semaphore, it should
- call FT_NWSEMSIG() to increment the value, and then
- FT_NWSEMCLOSE() to close the semaphore\. When the semaphore\'s
- open count goes to 0, NetWare deletes it\.
- .sp
- FT_NWSEMEX() can be used to examine the value and open count
- without affecting them\.
- .sp
- For an interesting discussion on the operating system aspects
- of semaphores, check "Operating Systems Design and Implementation"
- by A\. Tanenbaum, page 60\. For more details on NetWare\'s
- semaphore facilities, refer to Charles Rose\'s "Programmer\'s
- Guide to NetWare"\. The "Programmer\'s Guide" will make an
- excellent companion guide to the source code for all NetWare
- functions in the Nanforum Toolkit\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.48i
- .br
- LOCAL nInitVal, nRc, nHandle, nOpenCnt
- .sp
- .br
- nInitVal := 2
- .ta 0.72i
- .br
- nRc := FT_NWSEMOPEN( "Semaphore Test", nInitVal, ;
- .br
- .ta
- .in 2.56i
- .br
- @nHandle, @nOpenCnt )
- .sp
- .in 0.48i
- .br
- IF nRc != 0
- .in 0.64i
- .br
- QOUT =: "Error: " + STR( nRc ) )
- .br
- QUIT
- .in 0.48i
- .br
- ENDIF
- .sp
- .in 0.08i
- \fBSource:\fR NWSEM\.PRG
- .sp
- \fBAuthor:\fR Glenn Scott
- .in 0i
- .sp
- .in 1.5i
- .ti -1.5i
- .ta 1.5i
- .ft B
- See Also:
- .ft R
- FT_NWSEMEX()
- , FT_NWSEMWAIT()
- , FT_NWSEMSIG()
- , FT_NWSEMCLOSE()
- , FT_NWSEMLOCK()
- .ta 1.63265i
- .in 0i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_NWSEMSIG() Signal a NetWare semaphore (increment)
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_NWSEMSIG()
- Signal a NetWare semaphore (increment)
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_NWSEMSIG( nHandle ) -> nRc
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- \fB<nHandle>\fR is the semaphore handle, returned from a previous call
- to FT_NWSEMOPEN()\.
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- nRc, a numeric, as follows
- .sp
- .in 0.8i
- .br
- 0 - success
- .br
- 1 - semaphore overflow ( value > 127 )
- .in 0.64i
- .br
- 255 - invalid semaphore handle
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.48i
- Use FT_NWSEMSIG() when your app has finished with the resource
- locked by a semaphore\. This will increase the value (thus
- making a slot available to another app)\.
- .sp
- For more information, see the description under FT_NWSEMOPEN()\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.48i
- QOUT( "Signal returns: " + STR( FT_NWSEMSIG( nHandle ) ) )
- .sp
- .in 0.08i
- \fBSource:\fR NWSEM\.PRG
- .sp
- \fBAuthor:\fR Glenn Scott
- .in 0i
- .sp
- .in 1.5i
- .ti -1.5i
- .ta 1.5i
- .ft B
- See Also:
- .ft R
- FT_NWSEMOPEN()
- , FT_NWSEMEX()
- , FT_NWSEMWAIT()
- , FT_NWSEMCLOSE()
- , FT_NWSEMLOCK()
- .ta 1.63265i
- .in 0i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_NWSEMWAIT() Wait on a NetWare semaphore (decrement)
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_NWSEMWAIT()
- Wait on a NetWare semaphore (decrement)
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_NWSEMWAIT( <nHandle> [, nTimeout ] ) -> nRc
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- \fB<nHandle>\fR is the semaphore handle, returned from a previous call
- to FT_NWSEMOPEN()\.
- .sp
- \fB<nTimeOut>\fR is an optional parameter telling how long you wish to
- wait on this semaphore\. This is a numeric indicating the number
- of clock ticks (approx 1/18 sec ) to wait\. A zero (the default)
- means "don\'t wait\."
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- nRc, a numeric, as follows:
- .sp
- .in 0.88i
- .br
- 0 - success
- .in 0.72i
- .br
- 254 - timeout failure
- .br
- 255 - invalid semaphore handle
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- See the description for the FT_NWSEMOPEN() function\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.32i
- .br
- FT_NWSEMOPEN( "Semaphore Test", nInitVal, @nHandle, @nOpenCnt )
- .sp
- .br
- nRc := FT_NWSEMWAIT( nHandle )
- .br
- IF nRc == 254
- .in 0.56i
- .br
- QOUT( "All slots for this resource are currently in use" )
- .br
- QUIT
- .in 0.32i
- .br
- ENDIF
- .sp
- .in 0.08i
- \fBSource:\fR NWSEM\.PRG
- .sp
- \fBAuthor:\fR Glenn Scott
- .in 0i
- .sp
- .in 1.5i
- .ti -1.5i
- .ta 1.5i
- .ft B
- See Also:
- .ft R
- FT_NWSEMOPEN()
- , FT_NWSEMEX()
- , FT_NWSEMSIG()
- , FT_NWSEMCLOSE()
- , FT_NWSEMLOCK()
- .ta 1.63265i
- .in 0i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_NWUID() Return the current Novell NetWare User ID
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_NWUID()
- Return the current Novell NetWare User ID
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_NWUID( [ <nConnection> ] ) -> cUid
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- \fB<nConnection>\fR is a connection number, or logical station number,
- to find a userid for\. Under NetWare 286, this number can be from
- 1 to 100\. Under NetWare 386, 1-250\. If not supplied, FT_NWUID()
- defaults to the current connection (i\.e\., the connection running
- the application)\.
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- A string containing the userid, or "login name\."
- The maximum length of this string, as defined by current
- versions of Novell NetWare, is 48 characters\.
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- FT_NWUID() returns the current NetWare userid, or "login
- .ta 0.64i
- name\." This is useful for implementing security or audit
- .br
- .ta
- trail procedures within your programs\.
- .sp
- There is no simple way a user can "fool" this function into
- retrieving an incorrect value, provided a NetWare shell is loaded\.
- .sp
- This function requires FT_INT86() and FT_NWLSTAT()
- .sp
- This function does NOT test for the existence of the NetWare shell\.
- The behavior is undefined if no shell is loaded\. You\'ll usually get
- garbage\. This function has not been tested on NetWare 386\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.4i
- .br
- QOut( "I am: " + FT_NWUID() )
- .sp
- .br
- FOR x := 1 TO 100
- .in 0.56i
- .br
- cUid := FT_NWUID( x )
- .br
- IF \.NOT Empty( cUid )
- .in 0.72i
- .br
- QOut( Str( x, 3 ) + Space(3) + cUid )
- .in 0.56i
- .br
- ENDIF
- .in 0.4i
- .br
- NEXT
- .sp
- .in 0.08i
- \fBSource:\fR NWUID\.PRG
- .sp
- \fBAuthor:\fR Glenn Scott
- .in 0i
- .ta 1.63265i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_PFLUSH() Flush a NetWare capture buffer
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_PFLUSH()
- Flush a NetWare capture buffer
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_PFLUSH( [ <nLPTPortNumber> ] ) -> NIL
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- \fB<nLPTPortNumber>\fR is the captured LPT port number to flush\. If the
- parameter is omitted, the default port or LPT1: is used\.
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- NIL
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.32i
- This routine is used to force a Novell NetWare capture buffer to print
- it\'s contents\. This is useful for printing reports with a filter set
- and you don\'t know how long it will be between print statements\. With
- a FT_PFLUSH() function at the end of any printing, you can have the
- timeout value for any capture set to 0 (zero)\.
- .sp
- This routine was designed and written for Advanced NetWare 286 v 2\.0 or
- NetWare 386 v 3\.0 or better\. It has been tested on Advanced NetWare 286
- v 2\.15 rev A & C, NetWare 386 v 3\.0\.
- .sp
- This source code was written for Microsoft Macro Assembler v5\.1\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.32i
- .br
- (in DOS)
- .br
- F:>CAPTURE S=ServerName Q=PrintQueueName TI=0 L=1
- .sp
- .br
- (in your Clipper application)
- .br
- SET FILTER TO Left( FONELIST->PHONENUM, 3 ) == "415"
- .br
- GO TOP
- .br
- SET PRINT ON
- .br
- DO WHILE \.NOT\. Eof()
- .in 0.48i
- .br
- ? fonelist->lastname\.\.\.
- .br
- SKIP
- .in 0.32i
- .br
- ENDDO
- .ta 1.36i
- .br
- FT_PFLUSH(1) && I could just say FT_PFLUSH() here as well\.
- .br
- .ta
- .sp
- .in 0.08i
- \fBSource:\fR FLUSHCAP\.ASM
- .sp
- \fBAuthor:\fR James R\. Zack
- .in 0i
- .ta 1.63265i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_TTSABORT() Abort explicit and implicit NetWare TTS transactions
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_TTSABORT()
- Abort explicit and implicit NetWare TTS transactions
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_TTSABORT() -> nResult
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- None
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.56i
- .br
- 0 - Abort Successful (backout completed)
- .in 0.4i
- .br
- 253 - Transaction Tracking disabled (no backout performed)
- .br
- 254 - Transaction ended, records locked (No backout performed)
- .br
- 255 - No explicit transactions active
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.32i
- Consult your NetWare documentation for details on the NetWare
- Transaction Tracking System\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.32i
- .br
- nResult := FT_TTSABORT()
- .br
- DO CASE
- .in 0.56i
- .br
- CASE nResult == 0
- .in 0.8i
- .br
- ? "TTS aborted"
- .in 0.56i
- .br
- CASE nResult == 253
- .in 0.8i
- .br
- ? "Transction tracking, no backout performed"
- .in 0.56i
- .br
- CASE nResult == 254
- .in 0.8i
- .br
- ? "Transaction ended, records locked, no backout performed"
- .in 0.56i
- .br
- CASE nResult == 255
- .in 0.8i
- .br
- ? "No transactions active"
- .in 0.56i
- .br
- OTHERWISE
- .in 0.8i
- .br
- ? "Unknown result"
- .in 0.32i
- .br
- ENDCASE
- .sp
- .in 0.08i
- \fBSource:\fR NWTTS2\.ASM
- .sp
- \fBAuthor:\fR James R\. Zack
- .in 0i
- .sp
- .in 1.5i
- .ti -1.5i
- .ta 1.5i
- .ft B
- See Also:
- .ft R
- FT_TTSAVAIL()
- , FT_TTSBEGIN()
- , FT_TTSEND()
- , FT_TTSSTAT()
- .ta 1.63265i
- .in 0i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_TTSAVAIL() Check whether default Novell file server supports TTS
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_TTSAVAIL()
- Check whether default Novell file server supports TTS
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_TTSAVAIL() -> nResult
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- None
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.64i
- .br
- 0 - TTS unavailable or not supported\.
- .br
- 1 - TTS is installed and available\.
- .in 0.48i
- .br
- 253 - TTS is disabled\.
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.32i
- This routine is used to check the default NetWare file server for TTS
- availability\. You must have Novell NetWare SFT Level II or above to
- use these functions\. Using these functions on a non SFT II file server
- will return unsuccessful values\. You must have TTS installed on your
- file server\.
- .sp
- This routine was designed and written for Novell Advanced NetWare 2\.15
- SFT Level II and Novell NetWare 386 v 3\.0 and above\.
- .sp
- This source code was written for Microsoft Macro Assembler v5\.1\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.32i
- .ta 1.92i
- .br
- IF FT_TTSAVAIL() == 1 // If TTS is available
- .br
- .ta
- .in 0.48i
- .ta 1.76i
- .br
- FT_TTSBEGIN() // Begin transaction
- .br
- .ta
- .in 0.32i
- .br
- ENDIF
- .sp
- .in 0.08i
- \fBSource:\fR NWTTS1\.ASM
- .sp
- \fBAuthor:\fR James R\. Zack
- .in 0i
- .sp
- .in 1.5i
- .ti -1.5i
- .ta 1.5i
- .ft B
- See Also:
- .ft R
- FT_TTSABORT()
- , FT_TTSBEGIN()
- , FT_TTSEND()
- , FT_TTSSTAT()
- .ta 1.63265i
- .in 0i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_TTSBEGIN() Begin explicit transaction under NetWare\'s TTS
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_TTSBEGIN()
- Begin explicit transaction under NetWare\'s TTS
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_TTSBEGIN() -> nResult
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- None
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.56i
- 0 - Success (transaction begun)
- .in 0.4i
- .br
- 150 - Out of dynamic workspace (not begun)
- .br
- 254 - Implicit Transaction already active
- .in 1.12i
- (active implicit transaction now converted to
- explicit transaction)
- .in 0.4i
- 255 - Explicit transaction already active
- .in 1.12i
- (existing explicit transaction continues normally)
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.32i
- See your NetWare documentation for further information about the
- Transaction Tracking System (TTS)\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.32i
- .br
- nResult := FT_TTSBEGIN()
- .br
- DO CASE
- .in 0.56i
- .br
- CASE nResult == 0
- .in 0.8i
- .br
- ? "Transaction begun"
- .in 0.56i
- .br
- CASE nResult == 150
- .in 0.8i
- .br
- ? "Out of dynamic workspace, transaction not begun"
- .in 0.56i
- .br
- CASE nResult == 254
- .in 0.8i
- .br
- ? "Implicit transaction already active"
- .in 0.56i
- .br
- CASE nResult == 255
- .in 0.8i
- .br
- ? "Explicit transaction already active"
- .in 0.56i
- .br
- OTHERWISE
- .in 0.8i
- .br
- ? "Unknown result"
- .in 0.32i
- .br
- ENDCASE
- .sp
- .in 0.08i
- \fBSource:\fR NWTTS3\.ASM
- .sp
- \fBAuthor:\fR James R\. Zack
- .in 0i
- .sp
- .in 1.5i
- .ti -1.5i
- .ta 1.5i
- .ft B
- See Also:
- .ft R
- FT_TTSABORT()
- , FT_TTSAVAIL()
- , FT_TTSEND()
- , FT_TTSSTAT()
- .ta 1.63265i
- .in 0i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_TTSEND() End explicit or implicit transaction under NetWare\'s TTS
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_TTSEND()
- End explicit or implicit transaction under NetWare\'s TTS
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_TTSEND() -> nResult
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- None
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.72i
- .br
- 0 - Transaction tracking finished (Success)
- .in 0.56i
- .br
- 253 - Transaction tracking disabled
- .br
- 254 - Transaction ended, records locked
- .br
- 255 - No explicit transactions active
- .in 0.4i
- .br
- > 255 - Transaction number
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.32i
- For further information on NetWare\'s Transaction Tracking System (TTS),
- consult your NetWare manuals\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.32i
- .br
- nResult := FT_TTSEND()
- .br
- DO CASE
- .in 0.56i
- .br
- CASE nResult == 0
- .in 0.8i
- .br
- ? "Transaction ended"
- .in 0.56i
- .br
- CASE nResult == 253
- .in 0.8i
- .br
- ? "Transaction tracking disabled"
- .in 0.56i
- .br
- CASE nResult == 254
- .in 0.8i
- .br
- ? "Transaction ended, records locked"
- .in 0.56i
- .br
- CASE nResult == 255
- .in 0.8i
- .br
- ? "No explicit transactions active"
- .in 0.56i
- .br
- OTHERWISE
- .in 0.8i
- .br
- ? "Transaction number " + Ltrim(Str(nResult))
- .in 0.32i
- .br
- ENDCASE
- .sp
- .in 0.08i
- \fBSource:\fR NWTTS4\.ASM
- .sp
- \fBAuthor:\fR James R\. Zack
- .in 0i
- .sp
- .in 1.5i
- .ti -1.5i
- .ta 1.5i
- .ft B
- See Also:
- .ft R
- FT_TTSABORT()
- , FT_TTSAVAIL()
- , FT_TTSBEGIN()
- , FT_TTSSTAT()
- .ta 1.63265i
- .in 0i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_TTSSTAT() Verify if TTS transaction has been written to disk
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_TTSSTAT()
- Verify if TTS transaction has been written to disk
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.32i
- \fBFT_TTSSTAT( <nTransNumber> ) -> nResult
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.32i
- \fB<nTransNumber>\fR is the transaction number, returned from FT_TTSEND()\.
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.48i
- 0 - Success, transaction written to disk
- .in 0.32i
- 255 - Transaction not yet written to disk
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.32i
- For further information on NetWare\'s Transaction Tracking System (TTS),
- consult Novell\'s documentation\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.32i
- .br
- nResult := FT_TTSSTAT()
- .br
- DO CASE
- .in 0.56i
- .br
- CASE nResult == 0
- .in 0.8i
- .br
- ? "Transaction wrttten to disk"
- .in 0.56i
- .br
- CASE nResult == 255
- .in 0.8i
- .br
- ? "Transaction not yet written to disk"
- .in 0.56i
- .br
- OTHERWISE
- .in 0.8i
- .br
- ? "Unknown result code"
- .in 0.32i
- .br
- ENDCASE
- .sp
- .in 0.08i
- \fBSource:\fR NWTTS5\.ASM
- .sp
- \fBAuthor:\fR James R\. Zack
- .in 0i
- .sp
- .in 1.5i
- .ti -1.5i
- .ta 1.5i
- .ft B
- See Also:
- .ft R
- FT_TTSABORT()
- , FT_TTSAVAIL()
- , FT_TTSBEGIN()
- , FT_TTSEND()
-