Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/63.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Loadrunner C代码动态函数调用_C_Loadrunner - Fatal编程技术网

Loadrunner C代码动态函数调用

Loadrunner C代码动态函数调用,c,loadrunner,C,Loadrunner,我正在针对第三方库(HP/Mercury Loadrunner)使用C编程。我正在尝试编写动态调用另一个函数所需的代码。见下面的例子。有人能帮助编写代码来实现这一点吗 HomePage() { // Load Runner code to conduct home page call } SearchResults() { // Load Runner code to conduct some search results call } **FunctionCall(char fun

我正在针对第三方库(HP/Mercury Loadrunner)使用C编程。我正在尝试编写动态调用另一个函数所需的代码。见下面的例子。有人能帮助编写代码来实现这一点吗

HomePage() {
  // Load Runner code to conduct home page call
}

SearchResults() {
  // Load Runner code to conduct some search results call
}

**FunctionCall(char function[]) {
// Conduct a remote call to another function based on what was passed in???
function;
}**

Main() {

FunctionCall(HomePage);
FunctionCall(SearchResults);

}

如果要查找指向函数的指针:

FunctionCall(void(*function)(void))
{
    function();
}

Main()
{

    FunctionCall(HomePage);
    FunctionCall(SearchResults);

}

好的,我只是想澄清一下。。。。。您是在尝试(a)在LoadRunner内部使用LoadRunner功能和组件之外的功能和组件,还是(b)设计将在LoadRunner内部使用的代码(使用您的附加代码)


一条路径将导致成功,另一条则不然。

此代码正在loadrunner代码中使用,现在正在根据示例工作


你的意见是什么?

我不清楚你的问题。你想解决的问题是什么?请发布您的所有代码和问题。谢谢,这正是我所需要的。在LoadRunner内部使用上下文中,您的代码在结构上没有意义。基于LoadRunner C的虚拟用户不包含main()函数,基于C的DLL类型的虚拟用户也不会有这样的结构(请参阅高级概念,基于Visual Studio的虚拟用户)。您能否明确说明如何、在何处以及为什么使用LoadRunner库?