How can I return a PChar from a DLL function to a VB6 application without risking crashes or memory leaks?

前端 未结 7 1503
花落未央
花落未央 2020-12-19 05:37

I have to create a DLL which is used by a VB6 application. This DLL has to provide several functions, some of them must return strings.

This is the VB6 declaration:<

7条回答
  •  误落风尘
    2020-12-19 06:16

    Combining Sharptooth and Lars D's answer; aren't widestrings already allocated via windows and BSTR?

提交回复
热议问题