Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews Application Program Interviews:AutoCADBEA WeblogicBioinformaticsBizTalk ServerBug Tracking ToolsBugzillaClarify CRMCoding StandardsComputer Aided Design (CAD) DesignerCVSGIMPJMXLINQLoadRunnerMagentoMATLABMicrosoft AccessMicrosoft ExcelMicrosoft OfficeMicrosoft OutlookMicrosoft WordModel View Controller (MVC)OLAPOOADQuickbookRational RobotRDFSchemaSiebelSilkTestSVGTest PlanTesting ToolsUnity 3D DeveloperVRMLWCF SDKWPFXML DOMXPointer
Copyright © 2018. All Rights Reserved
SilkTest Interview Question:
Problem in calling DLL functions.
Submitted by: Administrator[I have a DLL which contains simple functions
function1 is just returning a char value
function2 returns a Long value
function3 returns a int value
function4 returns a double value
function5 returns a float value
but when I assign a 4test variable by calling all above functions or printing the returned value it creates a problem.
Problem:
1. Not able to return the correct "char" value from dll function. it gives garbage. same problem is with function returning float . working fine for the function returning int,double.DLL is loaded properly. Using "SilkTest 6.5 International", windows-xp. Dll was created in .NET framework . Also the functions are wrapped into "C" wrapper
Above all function gives correct values when call in a .NET framework.]
Used proper SilkTest DataType ie. String corresponding to C Char type But this time Agents crashes giving error *** Error: The Agent has abnormally exited when Aborted and silk test hangs on the statement calling Dll function returning char .
Please see the sample code
[+] dll "C:partnerTEST70FrameXPressVishnu1.dll"
[ ] String ReturnChar()
[ ] float ReturnFloat()
[ ] double ReturnDouble()
[ ] long ReturnLong()
[ ] int ReturnInt()
[+] testcase DllTest()
[ String str=ReturnChar()
// hangs for ever at above statement and agent crashes
[ ] Print(ReturnInt())
[ ] Print(ReturnChar())
[ ] Print(ReturnFloat())
[ ] Print(ReturnDouble())
[ ] Print(ReturnLong())
in Dll definition of ReturnChar()
Char ReturnChar()
{
Char a='h' ;
return a;
}
Submitted by: Administrator
function1 is just returning a char value
function2 returns a Long value
function3 returns a int value
function4 returns a double value
function5 returns a float value
but when I assign a 4test variable by calling all above functions or printing the returned value it creates a problem.
Problem:
1. Not able to return the correct "char" value from dll function. it gives garbage. same problem is with function returning float . working fine for the function returning int,double.DLL is loaded properly. Using "SilkTest 6.5 International", windows-xp. Dll was created in .NET framework . Also the functions are wrapped into "C" wrapper
Above all function gives correct values when call in a .NET framework.]
Used proper SilkTest DataType ie. String corresponding to C Char type But this time Agents crashes giving error *** Error: The Agent has abnormally exited when Aborted and silk test hangs on the statement calling Dll function returning char .
Please see the sample code
[+] dll "C:partnerTEST70FrameXPressVishnu1.dll"
[ ] String ReturnChar()
[ ] float ReturnFloat()
[ ] double ReturnDouble()
[ ] long ReturnLong()
[ ] int ReturnInt()
[+] testcase DllTest()
[ String str=ReturnChar()
// hangs for ever at above statement and agent crashes
[ ] Print(ReturnInt())
[ ] Print(ReturnChar())
[ ] Print(ReturnFloat())
[ ] Print(ReturnDouble())
[ ] Print(ReturnLong())
in Dll definition of ReturnChar()
Char ReturnChar()
{
Char a='h' ;
return a;
}
Submitted by: Administrator
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.