Re: Convert C# 'ComImport' to VB
- From: Mattias Sjögren <mattias.dont.want.spam@xxxxxxxx>
- Date: Wed, 22 Aug 2007 06:59:59 +0200
Basically, my problem is that the ComImport attribute cannot be used in VB
(as documented in KB313506:
http://support.microsoft.com/kb/313506/en-us?spid=7796&sid=global).
That's only true for classes, the article doesn't apply for
interfaces.
/// But I cannot figure out how to convert parts of this where I say
"<--this bit":
[ComImport] <--this bit
[Guid("89BCB740-6119-101A-BCB7-00DD010655AF")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IFilter
{
void Init([MarshalAs(UnmanagedType.U4)]
IFILTER_INIT grfFlags, <--this bit
uint cAttributes,
[MarshalAs(UnmanagedType.LPArray, SizeParamIndex=1)]
FULLPROPSPEC[] aAttributes, <--this bit
ref uint pdwFlags);
[PreserveSig]
int GetChunk(out STAT_CHUNK pStat); <--this bit
[PreserveSig]
int GetText(ref uint pcwcBuffer,
[MarshalAs(UnmanagedType.LPWStr)]
StringBuilder buffer
);
void GetValue(ref UIntPtr ppPropValue);
void BindRegion([MarshalAs(UnmanagedType.Struct)]
FILTERREGION origPos, <--this bit
ref Guid riid,
ref UIntPtr ppunk);
}
.... , ByVal grfFlags As IFILTER_INIT, ...
.... (<Out> ByRef pStat As STAT_CHUNK)
Sub BindRegion(ByVal origPos As FILTERREGION, ...
Mattias
--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
.
- Prev by Date: Re: How to use DataReader with DataGridView in Visual Basic 2005?
- Next by Date: AutoCompleteSource
- Previous by thread: Handling frozen OPOS driver
- Next by thread: AutoCompleteSource
- Index(es):
Relevant Pages
|