Microsoft KB Archive/160714

= How To Do BIND Checking in an SLI_OPEN. =

Article ID: 160714

Article Last Modified on 2/22/2007

-

APPLIES TO


 * Microsoft SNA Server 4.0
 * Microsoft Host Integration Server 2000 Standard Edition
 * Microsoft Host Integration Server 2000 Service Pack 1

-



This article was previously published under Q160714



SUMMARY
A call to SLI_OPEN is used to open an SSCP-LU as well as an LU-LU session. A developer may wish to check the incoming BIND image by taking advantage of several SLI_OPEN fields.



MORE INFORMATION
1. The following are the SLI_OPEN vcb fields specific to bind checking:
 * other_verb.common.lua_extension_list_offset = 0x48; // should use offsetof
 * other_verb.specific.open.lua_open_extension[0].lua_routine_type = LUA_ROUTINE_TYPE_BIND;
 * strcpy(other_verb.specific.open.lua_open_extension[0].lua_module_name, "WINSLI32");
 * strcpy(other_verb.specific.open.lua_open_extension[0].lua_procedure_name, "BindValidation");
 * other_verb.specific.open.lua_open_extension[1].lua_routine_type = LUA_ROUTINE_TYPE_END;

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.

2. 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). 3. 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 4. 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 5. 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 6. 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 7. 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 8. 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        000015c SLI   00000000 4C553220 20202020 48000000       <....LU2     H...> 000015c SLI   88E01400 00000400 C0904000 F4000000        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

Additional query words: HIS 2000

Keywords: kbhowto KB160714

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.