RE: Use DLL in Windows app problem
From: Tor Bådshaug (TorBdshaug_at_discussions.microsoft.com)
Date: 11/17/04
- Next message: Tor Bådshaug: "RE: How to access C# library from a C++ client."
- Previous message: Tor Bådshaug: "RE: Use DLL in Windows app problem"
- In reply to: Eric: "Use DLL in Windows app problem"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 17 Nov 2004 14:07:04 -0800
It seems to me you are mixing namespaces and classes.
Based on your descriptions and code, I will assume that
"Solution6.Cio.FileOpening" refers to the namespace you wish to use.
It does not make sense to instantiate a namespace (which is what it seems
like you attempt to do in your "...As New..." code).
You need to identify the class within the "Solution6.Cio.FileOpening"
namespace
you want to use. When you have done so, you can instantiate it using "...As
New MyClass".
There is no need to explicitly qualify the class with
"Solution6.Cio.FileOpening" -
the imports is simply a means to avoid the hassle of having to fully qualify
classes all over the place.
Hope this helps.
"Eric" wrote:
> I have a "Sol6.dll" that I am trying to use from a windows app. I added the
> DLL as a reference and included the namespace with "Imports" as seen below.
> The problem is far below where the "Dim Sol6 As New
> Solution6.Cio.FileOpening". I get a code error with the definition of "Type
> Expected". I simply wish to use a public method like "Sol6.GetNames()" . Code
> is below. thanks
>
> Imports Solution6.Cio.FileOpening
> Public Class Form1
.... Dim Sol6 As New Solution6.Cio.FileOpening
- Next message: Tor Bådshaug: "RE: How to access C# library from a C++ client."
- Previous message: Tor Bådshaug: "RE: Use DLL in Windows app problem"
- In reply to: Eric: "Use DLL in Windows app problem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|