VB call c + + DLL return how to implement such as wchart_t wchart_t * * TagName (); Release calls when FreeString (wchart_t * pVal) Not vb.net How to call the DLL in vb
CodePudding user response:
Wchart_t * is "wide byte character pointer"!!!! Should be a string of 16 utf-8 encoded string data, This API is also a return parameter represents the number of characters?
VB6 statement should be like this: Private Declare Function TagName Lib "XXXX. DLL () as" long Call, receive a Long variable with the return value, To get the data, then use a byte array or String type variable, through the API copymemory () to copy, If there is no "length" return parameter, or function of the interface, so it must be in the vbNullChar to mark the end of the (wchart_t should be used for two consecutive bytes 0), Anyway, you should pay attention to in the copymemory () before the byte array or String variable, to "create a large enough data area!" " Receive TagName () returns the value of the variable, is to use Byval form passed to copymemory,
CodePudding user response:
There is a problem of the operating system filetime in VB how to display in the text box