473,403 Members | 2,183 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

unmanaged dll

I have wrapped up an unmanaged dll with the System.Runtime.InteropServices
using [DllImport], etc., and turned it to an assembly dll to be used in C#.
It has been well-tested in a Windows Form application. It works fine there.
However, when I try to call this same dll in a ASP.Net code behind
environment, it gives me the following error:

The type or namespace name 'ZZZ' could not be found (are you missing a using
directive or an assembly reference?)

I have "Add Reference" to this dll and I have checked the path and file,
access right, etc., and I cound not find any settings that are not correct.
But the error persists and the web page does not compile.

Any one knows if there is special setting I need to be aware of to add a
custom-made dll to work with an ASP.Net page?

Thanks!
Jack
Nov 19 '05 #1
2 1605
Does your code source file contain a using ZZZ clause (where ZZZ is the full
namespace that the assembly resides in)?

"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:13**********************************@microsof t.com...
I have wrapped up an unmanaged dll with the System.Runtime.InteropServices
using [DllImport], etc., and turned it to an assembly dll to be used in
C#.
It has been well-tested in a Windows Form application. It works fine
there.
However, when I try to call this same dll in a ASP.Net code behind
environment, it gives me the following error:

The type or namespace name 'ZZZ' could not be found (are you missing a
using
directive or an assembly reference?)

I have "Add Reference" to this dll and I have checked the path and file,
access right, etc., and I cound not find any settings that are not
correct.
But the error persists and the web page does not compile.

Any one knows if there is special setting I need to be aware of to add a
custom-made dll to work with an ASP.Net page?

Thanks!
Jack

Nov 19 '05 #2
D'oh...you're a genius. :)

I stuck for 3 days wondering why the Windows Form app runs but the ASP.Net
page doesn't. Now I know it's because the Windows Form app is under the same
namespace so it doesn't need to insert the "using..." statement.

Many Thanks.

"Kevin Frey" wrote:
Does your code source file contain a using ZZZ clause (where ZZZ is the full
namespace that the assembly resides in)?

"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:13**********************************@microsof t.com...
I have wrapped up an unmanaged dll with the System.Runtime.InteropServices
using [DllImport], etc., and turned it to an assembly dll to be used in
C#.
It has been well-tested in a Windows Form application. It works fine
there.
However, when I try to call this same dll in a ASP.Net code behind
environment, it gives me the following error:

The type or namespace name 'ZZZ' could not be found (are you missing a
using
directive or an assembly reference?)

I have "Add Reference" to this dll and I have checked the path and file,
access right, etc., and I cound not find any settings that are not
correct.
But the error persists and the web page does not compile.

Any one knows if there is special setting I need to be aware of to add a
custom-made dll to work with an ASP.Net page?

Thanks!
Jack


Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bob Rock | last post by:
Hello, in the last few days I've made my first few attempts at creating mixed C++ managed-unmanaged assemblies and looking aftwerwards with ILDASM at what is visible in those assemblies from a...
2
by: Paul Kenny | last post by:
Hi, I am trying to expose the functionality of an unmanaged C++ class to the other languages available in the .NET Framework. I have decided to do this by wrapping the unmanaged C++ class in a...
4
by: Rachel Suddeth | last post by:
What is the difference between a managed/unmanaged resource, and how do you tell which is which? I'm trying to understand how to write some Dispose() methods, and we are supposed to put code that...
3
by: zhphust | last post by:
I want to convert a object of a managed class to a unmanaged structure that has the same member with that managed class. Can anybody tell me how i can do it? Thanks in advance. -- zhphust...
1
by: Sparhawk | last post by:
Hi, my company is going to migrate a large VC++ application to .NET to make use of Windows Forms (the old class library is not updated any more). We are not planning to migrate the rest of the...
6
by: marek | last post by:
Hello All, we are doing a quite a big project that contains at the lowest level an unmenaged c++ classes. Above it there are managed wrappers and at the top there are ASP.NET pages. Can anyone...
6
by: Stephen Walch | last post by:
Our application environment consists of three basic layers: 1. Third-party unmanaged DLLs that were written before the CLR was invented and maintain a significant amount of information (including...
9
by: Amit Dedhia | last post by:
Hi All I have a VC++ 2005 MFC application with all classes defined as unmanaged classes. I want to write my application data in xml format. Since ADO.NET has buit in functions available for...
5
by: akash | last post by:
I'm having problems calling an unmanaged class from a managed wrapper. I suspect I'm missing something obvious, as I'm unfamiliar with C++ and classes are very simple. My unmanaged class is as...
2
by: Jon Slaughter | last post by:
How difficult is it for one to integrate unmanaged C++ into C#? I know for functions one can use DLLimport but how does one go about doing it for classes? Do I have to completely reimplement the...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.