指针的问题!!!!!!
我遇到一个问题,详细代码如下:
[DllImport("LClientDll.dll",EntryPoint="LClientStartDemo",ExactSpelling=false,CallingConvention=CallingConvention.Cdecl)]
public static extern unsafe int LClientStartDemo(string host, string port, string oper, string ch, int flag);
[DllImport("LClientDll.dll",EntryPoint="LClientRcvDemo",ExactSpelling=false,CallingConvention=CallingConvention.Cdecl)]
public static extern unsafe int LClientRcvDemo(char *data);
[DllImport("LClientDll.dll",EntryPoint="LClientStop",ExactSpelling=false,CallingConvention=CallingConvention.Cdecl)]
public static extern int LClientStop();
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int r = LClientStartDemo("127.0.0.1", "7628", "801", "0", 0);
}
LClientRcvDemo(char *data)参数是指针我希望将值传递给一个变量然后进行进一步处理方案可行吗?具体如何操作?
[DllImport("LClientDll.dll",EntryPoint="LClientStartDemo",ExactSpelling=false,CallingConvention=CallingConvention.Cdecl)]
public static extern unsafe int LClientStartDemo(string host, string port, string oper, string ch, int flag);
[DllImport("LClientDll.dll",EntryPoint="LClientRcvDemo",ExactSpelling=false,CallingConvention=CallingConvention.Cdecl)]
public static extern unsafe int LClientRcvDemo(char *data);
[DllImport("LClientDll.dll",EntryPoint="LClientStop",ExactSpelling=false,CallingConvention=CallingConvention.Cdecl)]
public static extern int LClientStop();
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int r = LClientStartDemo("127.0.0.1", "7628", "801", "0", 0);
}
LClientRcvDemo(char *data)参数是指针我希望将值传递给一个变量然后进行进一步处理方案可行吗?具体如何操作?
...全文
相关推荐
C++在函数中给类的指针变量赋值问题
在函数中给C++指针变量赋值,分析了指针变量的特性,并追踪了给指针变量赋值的过程。
关于C语言指针赋值的问题详解
本篇文章是对C语言指针赋值的问题进行了详细的分析介绍,需要的朋友参考下
函数参数的传递问题(一级指针和二级指针)
深入阐述一级指针和二级指针的概念,解决函数传递时值传递和引用传递带来的困惑
适合小白的python算法-双指针问题
python算法-双指针问题一、数组合并1. 使用模拟指针和并两个有序数组2.模拟指针说明:二、二分法(折半查找法)1.有序数组的二分法查找2. 二分法说明三、链表(双链表和单链表区别) 一、数组合并 1. 使用模拟指针和并两个有序数组 # 使用指针合并两个数组 arr1 = [1,3,4,6,7] arr2 = [2,5,8,9,10] #定义两个有序数组,并初始化赋值 ind = 0 # ans比较时的角标 ans = arr1.copy() #ans 排序结果初始化为arr1 for i in range(0,len(arr2)): while ind < len(arr1): i
野指针问题
野指针问题



