Hi:
Can anyone shed any light on the <[In](), Out()> tags sometimes associated with DLL calls?
For example, look at the hypothetical call below...in many of the examples I see on the internet, I see these in/out tags. I know that they specify the direction of the variable, but how do you determine whether the argument for a dll is in/out or some variation of both?
<DllImport("file.dll", EntryPoint:="#1")> _
Private Shared Function DSMparent(<[In](), Out()> _
ByVal arg1 As String, _
ByVal arg2 As String, _
ByVal arg3 As String, _
<[In](), Out()> ByVal arg4 As String) As String
End Function
A real example is
<DllImport("gdiplus.dll", ExactSpelling:=True, CharSet:=CharSet.Unicode)>
Friend Shared Function GdipSaveImageToFile(
ByVal image As IntPtr,
ByVal filename As String,
<[In]()> ByRef clsid As Guid,
ByVal encparams As IntPtr)
As Integer
End Function
Can anyone shed any light on the <[In](), Out()> tags sometimes associated with DLL calls?
For example, look at the hypothetical call below...in many of the examples I see on the internet, I see these in/out tags. I know that they specify the direction of the variable, but how do you determine whether the argument for a dll is in/out or some variation of both?
<DllImport("file.dll", EntryPoint:="#1")> _
Private Shared Function DSMparent(<[In](), Out()> _
ByVal arg1 As String, _
ByVal arg2 As String, _
ByVal arg3 As String, _
<[In](), Out()> ByVal arg4 As String) As String
End Function
A real example is
<DllImport("gdiplus.dll", ExactSpelling:=True, CharSet:=CharSet.Unicode)>
Friend Shared Function GdipSaveImageToFile(
ByVal image As IntPtr,
ByVal filename As String,
<[In]()> ByRef clsid As Guid,
ByVal encparams As IntPtr)
As Integer
End Function