NOTE: For more information on the meaning of each field see the SNA Server
LUA Programmer's Reference included on the SNA Server compact disk.
- The following is sample bind validation callback code:
typedef VOID FAR PASCAL BindValidation( LUA_VERB_RECORD FAR * )
{
pVerb->common.lua_prim_rc = LUA_STATE_CHECK;
}
Note: For vc++ 4.0 the typedef should be:
typedef VOID _STDCall BindValidation(LUA_VERB_RECORD FAR*)
The BIND routine has access to the LUA VCB passed to it. The BIND routine
should validate the BIND and indicate the appropriate SLI primary and
secondary return code in the LUA verb record. Also, the routine may
indicate the primary and secondary RU sizes supported by the SLI program
by setting byte 10 and 11 in the common.lua_data_ptr field (where the
BIND command is indicated).
- The following are the compiler options for the module containing the
callback:
/FA -c -Zle -W3 -WX -Ge -Gy -Gz -Ox -Zd
-DCONDITION_HANDLING -DSTD_CALL
-Di386=1 -D_X86_ -DNT_UP -DWIN32 -DDEVL
-D_DLL -D_MT -DWIN32_SUPPORT
- The following is the code generated for the callback:
PUBLIC _BindValidation@4
; COMDAT _BindValidation@4
_TEXT SEGMENT
_pVerb$ = 8
_BindValidation@4 PROC NEAR ; COMDAT
// pVerb->common.lua_prim_rc = LUA_STATE_CHECK;
mov eax, DWORD PTR _pVerb$[esp-4]
mov WORD PTR [eax+4], 512 ; 00000200H
ret 4
_BindValidation@4 ENDP
_TEXT ENDS
- The following is the code generated by SLI to call this callback:
; Line 658
// (*aSCB->bind_rtn)(sliVCB);
push ebp
call DWORD PTR [ebx+188]
// N.B. there is no ADD ESP,4 following the call
- The following is the client internal trace showing WINSLI detecting the
user provided bind validation callback:
|00000157.000000f7 OUDMD Opening User DLL Modules
|00000157.000000f7 OUDMD Opening a Bind Routine
|00000157.000000f7 OUDMD Opening DLL = WINSLI32
|00000157.000000f7 OUDMD Loading Routine = BindValidation
- The following is client internal trace showing the bind validation
callback:
|00000157.0000015c CLUAD Calling BIND Routine
|00000157.0000015c CLUAD Return from BIND routine, prc=512
|00000157.0000015c CLUAD Returned With Error From Routine
|00000157.0000015c FrRUI Freeing RUI vcb = 0x14E424
|00000157.0000015c BINDP USER BIND ROUTINE FAILED
- The following is an API trace to show the bind validation error:
000015c SLI ---------------------------------------------- 11:11:52.28
000015c SLI SLI_OPEN post
000015c SLI SESSION_FAILURE - NEG_RSP_FROM_BIND_ROUTINE
000015c SLI ---- Verb Parameter Block at address 00405150 ----
000015c SLI 52004900 000F0000 00000039 01000000 <R.I........9....>
000015c SLI 00000000 4C553220 20202020 48000000 <....LU2 H...>
000015c SLI 88E01400 00000400 C0904000 F4000000 <h.........@.4...>
000015c SLI 00000000 00000000 00000040 00000000 <...........@....>
000015c SLI 00000000 02000000 0157494E 534C4933 <.........WINSLI3>
000015c SLI 32004269 6E645661 6C696461 74696F6E <2.BindValidation>
000015c SLI 00000000 00000000 00000000 00000000 <................>
000015c SLI 00000000 00000000 00000000 00000000 <................>
000015c SLI 00000000 00000000 00000000 00000000 <................>
000015c SLI 00000000 00000000 00000000 00000000 <................>
000015c SLI 00000000 00000000 00000000 00000000 <................>
000015c SLI 00000000 00000000 00000000 00000000 <................>
000015c SLI 00000000 00000000 0000 <.......... >
000015c SLI ---- Data at address 004090C0 ----
000015c SLI 86998584 <fred >