I presume the user function you were looking for was "UnicodeStringGet", where I was able to find the copy below that wraps StrPtr as Jan suggested.
'-----------------------------------------------------------------------+
'
' name UnicodeStringGet
'
' author BSI 10/2003
'
'-----------------------------------------------------------------------+
Function UnicodeStringGet(strValue As String) As Long
If strValue <> "" Then
UnicodeStringGet = StrPtr(strValue)
End If
End Function
If you have a need to pass pointers (longs or otherwise) between MDL/C and VBA the help topic Jan recommends is a good read first, and you can find more code snips in this sample project:
e.g. C:\ProgramData\Bentley\MicroStation CONNECT Edition\Configuration\WorkSpaces\Example\WorkSets\MetroStation\Standards\Macros\NativeCodeUtilities.mvba
HTH,
Bob
'-----------------------------------------------------------------------+
'
' name UnicodeStringGet
'
' author BSI 10/2003
'
'-----------------------------------------------------------------------+
Function UnicodeStringGet(strValue As String) As Long
If strValue <> "" Then
UnicodeStringGet = StrPtr(strValue)
End If
End Function
If you have a need to pass pointers (longs or otherwise) between MDL/C and VBA the help topic Jan recommends is a good read first, and you can find more code snips in this sample project:
e.g. C:\ProgramData\Bentley\MicroStation CONNECT Edition\Configuration\WorkSpaces\Example\WorkSets\MetroStation\Standards\Macros\NativeCodeUtilities.mvba
HTH,
Bob