IDownloadManager ??!!??

  • Thread starter Thread starter .:: MaStErDoN ::.
  • Start date Start date
M

.:: MaStErDoN ::.

Hi,
I'm still trying to implement the IDownloadManager interface in VB.net but i
can't. I tried on C# with the following code and it works fine! (it's not
underlined):

Public class DownloadManager : IDownloadManager
{
}

But when i transfer it to VB.Net like:

Public class DownloadManager
Implements IDownloadManager

End class

"IDownloadManager" gets underlined and it says that its not defined. What's
happend?? why it is supported by C# and not by VB.NET

Thanks!
 
Andrés,
Have you referenced the assembly where IDownloadManager is defined?

Have you included the necessary Imports at the top of your VB.NET source
file?

Have you implemented all the methods of IDownloadManager in your VB.NET
class? (although this would actually be a slightly different error message.

Hope this helps
Jay
 
You will need to include a definition of the interface as follows (watch for
wrapping):

<code>
Public Enum HRESULT
S_OK = 0
S_FALSE = 1
E_NOTIMPL = &H80004001
E_INVALIDARG = &H80070057
E_NOINTERFACE = &H80004002
E_FAIL = &H80004005
E_UNEXPECTED = &H8000FFFF
End Enum

' IDownloadManager interface
<ComVisible(True), ComImport(),
Guid("988934A4-064B-11D3-BB80-00104B35E7F9"), _
InterfaceType(ComInterfaceType.InterfaceIsIUnknown)> _
Public Interface IDownloadManager
<PreserveSig()> Function Download(ByRef pmk As UCOMIMoniker, ByRef pbc
As UCOMIBindCtx, ByVal dwBindVerb As Integer, ByVal grfBINDF As Integer,
ByVal pBindInfo As BINDINFO, ByVal pszHeaders As String, ByVal pszRedir As
String, ByVal uiCP As Int16) As HRESULT
End Interface
</code>

HTH

Charles
 
Check your imports statement (the using statement in C#) and make sure your
importing that namespace, otherwise you have to type in the full name.
 
Back
Top