1. throamvb. dll file
2. Run the following command in the Visual Studio 2005 Command Prompt:
Tlbimp D: \ portal \ throam. dll/out: mythroam. dll/namespace: mythroam
Generate the mythroamvb. dll file in the c: \ Program Files \ Microsoft Visual Studio 8 \ Vc directory.
3. Add DLL reference in the project and select the generated DLL file
4,
String ticket = request. querystring ["ticket"];
If (ticket = "" | ticket = NULL)
Return;
Mythroamvb. roamclass T = new mythroamvb. roamclass ();
String ret = T. chkticket (ticket, "invalid CCX", request. userhostaddress );
String [] info = ret. Split (':');
If (info. length! = 7)
{
Alert Al = new alert ("an error occurred. Please log on again! ");
Al. Show ();
Return;
}
If (info [0]. Trim ()! = "Code = 0 ")
{
Alert Al = new alert ("an error occurred. Please log on again! ");
Al. Show ();
Return;
}
// User ID, 1
String id = info [1]. substring (info [1]. indexof ("=") + 1 );
// Query the user category, 4
String userclass = info [4]. Trim (); // student yhlb = x0031, instructor j0000