ah well, whim of the languages
From: smith (rcsTAKEOUT_at_smithvoiceTAKEOUT.com)
Date: 03/21/04
- Next message: Selecta of JAMRID: "Re: Controlling an instance of WMP"
- Previous message: smith: "Re: Is this the right group for this?"
- In reply to: smith: "Is this the right group for this?"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 21 Mar 2004 08:38:22 GMT
Eh, the heck with it, I coded the 20k dll with the two functions in C# and
am calling into it from VB.net. It just seems strange to me that by just
doing the exact same thing in C# the call to AddAttribute and
ModifyAttribute both work without a hiccup. Same exact values & types in
all variables in the Locals Windows of both languages... exact same.
And we do nothing at all with the parameters from the VB.net call to the
dll, just pass in the same values as we were with the VB.net code. So again
the Locals Windows look exactly the same.
I just don't get the difference:
C#:
uint AddAttribute(
[In] ushort wStreamNum,
[In,MarshalAs(UnmanagedType.LPWStr)] string pszName,
[Out] out ushort pwIndex,
[In] WMT_ATTR_DATATYPE Type,
[In] ushort wLangIndex,
[In, MarshalAs(UnmanagedType.LPArray)] byte[] pValue,
[In] uint dwLength );
VB.net port attempts:
Function AddAttribute(ByVal wStreamNum As UInt16, _
ByVal pszName As String, _
ByRef pwIndex As UInt16, _
ByVal Type As WMT_ATTR_DATATYPE, _
ByVal wLangIndex As UInt16, _
ByVal pValue As Byte(), _
ByVal dwLength As UInt32) As UInt32
or
Function AddAttribute(ByVal wStreamNum As UInt16, _
<MarshalAs(UnmanagedType.LPWStr)> ByVal pszName As String, _
ByRef pwIndex As UInt16, _
ByVal Type As WMT_ATTR_DATATYPE, _
ByVal wLangIndex As UInt16, _
<MarshalAs(UnmanagedType.LPArray)> ByVal pValue As Byte(), _
ByVal dwLength As UInt32) As UInt32
thanks anyway.
-s
- Next message: Selecta of JAMRID: "Re: Controlling an instance of WMP"
- Previous message: smith: "Re: Is this the right group for this?"
- In reply to: smith: "Is this the right group for this?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|