Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/139.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
在VB6中,我是否需要对使用SysAllocString分配的字符串调用SysFreeString? 我有一个VB6应用程序,使用C++ COM DLL,BSTRs在两者之间传递。从C++ DLL返回BSTRS,使用返回::SysLoScRoad(L)示例;代码>_C++_Dll_Com_Memory Leaks_Vb6 - Fatal编程技术网

在VB6中,我是否需要对使用SysAllocString分配的字符串调用SysFreeString? 我有一个VB6应用程序,使用C++ COM DLL,BSTRs在两者之间传递。从C++ DLL返回BSTRS,使用返回::SysLoScRoad(L)示例;代码>

在VB6中,我是否需要对使用SysAllocString分配的字符串调用SysFreeString? 我有一个VB6应用程序,使用C++ COM DLL,BSTRs在两者之间传递。从C++ DLL返回BSTRS,使用返回::SysLoScRoad(L)示例;代码>,c++,dll,com,memory-leaks,vb6,C++,Dll,Com,Memory Leaks,Vb6,在下面的示例中,是否需要对这样的字符串调用SysFreeString Sub-Main() 将自己的字符串设置为字符串 Dim dll_str作为字符串 own_str=“我自己的字符串” dll_str=DllComObj.FunctionReturningString() '离开范围时: “不需要解放自己的力量, '我需要释放dll_str吗? 端接头 不,你没有。VB6将释放它们,因为BSTR是其本机字符串格式。+1另请参见Microsoft的

在下面的示例中,是否需要对这样的字符串调用
SysFreeString

Sub-Main()
将自己的字符串设置为字符串
Dim dll_str作为字符串
own_str=“我自己的字符串”
dll_str=DllComObj.FunctionReturningString()
'离开范围时:
“不需要解放自己的力量,
'我需要释放dll_str吗?
端接头

不,你没有。VB6将释放它们,因为BSTR是其本机字符串格式。

+1另请参见Microsoft的