473,396 Members | 2,068 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,396 software developers and data experts.

Referencing a non-self-registering DLL

ian
Hi All

I have a DLL (nahd.dll) that has been supplied to me will a PBX phone
system. According to the documentation it is to allow developers to write
there own applications to monitor the system.

Now when I try to register this DLL I get an error.
“DLL RegisterServer entry point not found”
According to Microsoft this means it is not a DLL. I can view it using
Dependency Walker and it has all the events mentioned in the documentation.
And I have downloaded a new copy of the DLL so it can not be corrupt.

I think that this is a non-self-registering DLL.

So my problem is that I have never worked with one of these before and I
don’t know how to. I am used to using DLL’s that you register and use as COM
objects.

I have tried to reference it as I would a standard COM object from CSharp
but I got an error saying that it is not a COM Object.

I am at a bit of a loss cos I have looked round the net and can’t seem to
find any samples dealing with this problem. Even VB samples would do.

This is the Webpage for the company that supplies the DLL
http://www.avaya.co.uk/Support/Techn...on/default.asp

If you look down the page to the VoiceMail Pro section there is a link to
the Hotel DLL.
Down load that and unzip it and that has the nahd.dll and the documentation
in it. You can see for your self what I mean.

Please any help on how I have to use this would be great.

--

Thanks Heaps

Ian
Nov 16 '05 #1
6 4122
Ian,

There is no such thing as a non-self-registering DLL. If you are
refering to an in-process COM server, then it will export the functions
necessary to register itself.

Also, DLLs can contain a number of different things, exporting them all
in different ways. They can export regular functions, be a COM in process
server, a MFC dll, a .NET dll, the list goes on and on.

Based on the documentation (sorry, I won't run the EXE from the site),
what kind of functionality does it export? My guess is that it is not a COM
in process server, but something else.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"ian" <Do**@Bother.com> wrote in message
news:97**********************************@microsof t.com...
Hi All

I have a DLL (nahd.dll) that has been supplied to me will a PBX phone
system. According to the documentation it is to allow developers to write
there own applications to monitor the system.

Now when I try to register this DLL I get an error.
"DLL RegisterServer entry point not found"
According to Microsoft this means it is not a DLL. I can view it using
Dependency Walker and it has all the events mentioned in the
documentation.
And I have downloaded a new copy of the DLL so it can not be corrupt.

I think that this is a non-self-registering DLL.

So my problem is that I have never worked with one of these before and I
don't know how to. I am used to using DLL's that you register and use as
COM
objects.

I have tried to reference it as I would a standard COM object from CSharp
but I got an error saying that it is not a COM Object.

I am at a bit of a loss cos I have looked round the net and can't seem to
find any samples dealing with this problem. Even VB samples would do.

This is the Webpage for the company that supplies the DLL.
http://www.avaya.co.uk/Support/Techn...on/default.asp

If you look down the page to the VoiceMail Pro section there is a link to
the Hotel DLL.
Down load that and unzip it and that has the nahd.dll and the
documentation
in it. You can see for your self what I mean.

Please any help on how I have to use this would be great.

--

Thanks Heaps

Ian

Nov 16 '05 #2
This file is not a COM object, but it is a valid DLL. All a DLL is, is a
block of code, which must have some interface exposed via some sort of
definition file. A COM object is a technology and set of standards that
happen to sit inside of DLL files.

If you look at the "Nahd.Def" file, you'll see the methods that this DLL
exports.

You'll need to do a few things here:

1. Create the LIB
The lib is created by running the "lib" command from the command prompt
in the folder containing the unzipped files. The batch file puts it like
this: lib /DEF:nahd.def /OUT:nahdcoff.lib

2. Extract the header file
The .H file is found in the document that comes with this package (last
two pages or so). Cut and paste this into a new text file called
"nahdcoff.h"

3.1. Use PInvoke to late bind to the dll from c#
Read up on this here:
http://msdn.microsoft.com/library/de...lfunctions.asp
[beware line breaks]

OR

3.2 Create a new unmanaged C++ COM project that simply references the .H
file, and links to the .Lib file to produce a COM DLL, which you can then
reference via C#.
The final alternative is to ask the manufacturer for an updated module (and
hope that one exists), with a COM, or event better, .Net interface.

"ian" <Do**@Bother.com> wrote in message
news:97**********************************@microsof t.com...
Hi All

I have a DLL (nahd.dll) that has been supplied to me will a PBX phone
system. According to the documentation it is to allow developers to write
there own applications to monitor the system.

Now when I try to register this DLL I get an error.
"DLL RegisterServer entry point not found"
According to Microsoft this means it is not a DLL. I can view it using
Dependency Walker and it has all the events mentioned in the
documentation.
And I have downloaded a new copy of the DLL so it can not be corrupt.

I think that this is a non-self-registering DLL.

So my problem is that I have never worked with one of these before and I
don't know how to. I am used to using DLL's that you register and use as
COM
objects.

I have tried to reference it as I would a standard COM object from CSharp
but I got an error saying that it is not a COM Object.

I am at a bit of a loss cos I have looked round the net and can't seem to
find any samples dealing with this problem. Even VB samples would do.

This is the Webpage for the company that supplies the DLL.
http://www.avaya.co.uk/Support/Techn...on/default.asp

If you look down the page to the VoiceMail Pro section there is a link to
the Hotel DLL.
Down load that and unzip it and that has the nahd.dll and the
documentation
in it. You can see for your self what I mean.

Please any help on how I have to use this would be great.

--

Thanks Heaps

Ian

Nov 16 '05 #3
Hi ian!

i suggest you read these articles for a good start on p/invoke (lets you
call extern DLLs from .NET).

calling Win32 DLLs in C# using p/invoke
http://msdn.microsoft.com/msdnmag/issues/03/07/NET/

p/invoke revisited
http://msdn.microsoft.com/msdnmag/issues/04/10/NET/

--
Best Regards
Yanick
"ian" <Do**@Bother.com> a crit dans le message de
news:97**********************************@microsof t.com...
Hi All

I have a DLL (nahd.dll) that has been supplied to me will a PBX phone
system. According to the documentation it is to allow developers to write
there own applications to monitor the system.

Now when I try to register this DLL I get an error.
"DLL RegisterServer entry point not found"
According to Microsoft this means it is not a DLL. I can view it using
Dependency Walker and it has all the events mentioned in the documentation. And I have downloaded a new copy of the DLL so it can not be corrupt.

I think that this is a non-self-registering DLL.

So my problem is that I have never worked with one of these before and I
don't know how to. I am used to using DLL's that you register and use as COM objects.

I have tried to reference it as I would a standard COM object from CSharp
but I got an error saying that it is not a COM Object.

I am at a bit of a loss cos I have looked round the net and can't seem to
find any samples dealing with this problem. Even VB samples would do.

This is the Webpage for the company that supplies the DLL.
http://www.avaya.co.uk/Support/Techn...on/default.asp
If you look down the page to the VoiceMail Pro section there is a link to
the Hotel DLL.
Down load that and unzip it and that has the nahd.dll and the documentation in it. You can see for your self what I mean.

Please any help on how I have to use this would be great.

--

Thanks Heaps

Ian

Nov 16 '05 #4
ian
Thanks Dan

I thought it was something strange. But i never would have figured all that
out.

I assume that this is because it is from the oldy days

Ian


"Dan Bass" wrote:
This file is not a COM object, but it is a valid DLL. All a DLL is, is a
block of code, which must have some interface exposed via some sort of
definition file. A COM object is a technology and set of standards that
happen to sit inside of DLL files.

If you look at the "Nahd.Def" file, you'll see the methods that this DLL
exports.

You'll need to do a few things here:

1. Create the LIB
The lib is created by running the "lib" command from the command prompt
in the folder containing the unzipped files. The batch file puts it like
this: lib /DEF:nahd.def /OUT:nahdcoff.lib

2. Extract the header file
The .H file is found in the document that comes with this package (last
two pages or so). Cut and paste this into a new text file called
"nahdcoff.h"

3.1. Use PInvoke to late bind to the dll from c#
Read up on this here:
http://msdn.microsoft.com/library/de...lfunctions.asp
[beware line breaks]

OR

3.2 Create a new unmanaged C++ COM project that simply references the .H
file, and links to the .Lib file to produce a COM DLL, which you can then
reference via C#.
The final alternative is to ask the manufacturer for an updated module (and
hope that one exists), with a COM, or event better, .Net interface.

"ian" <Do**@Bother.com> wrote in message
news:97**********************************@microsof t.com...
Hi All

I have a DLL (nahd.dll) that has been supplied to me will a PBX phone
system. According to the documentation it is to allow developers to write
there own applications to monitor the system.

Now when I try to register this DLL I get an error.
"DLL RegisterServer entry point not found"
According to Microsoft this means it is not a DLL. I can view it using
Dependency Walker and it has all the events mentioned in the
documentation.
And I have downloaded a new copy of the DLL so it can not be corrupt.

I think that this is a non-self-registering DLL.

So my problem is that I have never worked with one of these before and I
don't know how to. I am used to using DLL's that you register and use as
COM
objects.

I have tried to reference it as I would a standard COM object from CSharp
but I got an error saying that it is not a COM Object.

I am at a bit of a loss cos I have looked round the net and can't seem to
find any samples dealing with this problem. Even VB samples would do.

This is the Webpage for the company that supplies the DLL.
http://www.avaya.co.uk/Support/Techn...on/default.asp

If you look down the page to the VoiceMail Pro section there is a link to
the Hotel DLL.
Down load that and unzip it and that has the nahd.dll and the
documentation
in it. You can see for your self what I mean.

Please any help on how I have to use this would be great.

--

Thanks Heaps

Ian


Nov 16 '05 #5
not that old, it makes me feel old! ;o)

That's how we C++ programmer's did things before .Net arrived. COM from C++
(and in general) is very complicated, wrapping up a simple DLL with the
intention of exposing a few methods is far simpler.

We're just spoilt with the interop work that goes on under the hood when
adding references to out .Net projects...

"ian" <Do**@Bother.com> wrote in message
news:31**********************************@microsof t.com...
Thanks Dan

I thought it was something strange. But i never would have figured all
that
out.

I assume that this is because it is from the oldy days

Ian


"Dan Bass" wrote:
This file is not a COM object, but it is a valid DLL. All a DLL is, is a
block of code, which must have some interface exposed via some sort of
definition file. A COM object is a technology and set of standards that
happen to sit inside of DLL files.

If you look at the "Nahd.Def" file, you'll see the methods that this DLL
exports.

You'll need to do a few things here:

1. Create the LIB
The lib is created by running the "lib" command from the command
prompt
in the folder containing the unzipped files. The batch file puts it like
this: lib /DEF:nahd.def /OUT:nahdcoff.lib

2. Extract the header file
The .H file is found in the document that comes with this package
(last
two pages or so). Cut and paste this into a new text file called
"nahdcoff.h"

3.1. Use PInvoke to late bind to the dll from c#
Read up on this here:
http://msdn.microsoft.com/library/de...lfunctions.asp
[beware line breaks]

OR

3.2 Create a new unmanaged C++ COM project that simply references the .H
file, and links to the .Lib file to produce a COM DLL, which you can then
reference via C#.
The final alternative is to ask the manufacturer for an updated module
(and
hope that one exists), with a COM, or event better, .Net interface.

"ian" <Do**@Bother.com> wrote in message
news:97**********************************@microsof t.com...
> Hi All
>
> I have a DLL (nahd.dll) that has been supplied to me will a PBX phone
> system. According to the documentation it is to allow developers to
> write
> there own applications to monitor the system.
>
> Now when I try to register this DLL I get an error.
> "DLL RegisterServer entry point not found"
> According to Microsoft this means it is not a DLL. I can view it using
> Dependency Walker and it has all the events mentioned in the
> documentation.
> And I have downloaded a new copy of the DLL so it can not be corrupt.
>
> I think that this is a non-self-registering DLL.
>
> So my problem is that I have never worked with one of these before and
> I
> don't know how to. I am used to using DLL's that you register and use
> as
> COM
> objects.
>
> I have tried to reference it as I would a standard COM object from
> CSharp
> but I got an error saying that it is not a COM Object.
>
> I am at a bit of a loss cos I have looked round the net and can't seem
> to
> find any samples dealing with this problem. Even VB samples would do.
>
> This is the Webpage for the company that supplies the DLL.
> http://www.avaya.co.uk/Support/Techn...on/default.asp
>
> If you look down the page to the VoiceMail Pro section there is a link
> to
> the Hotel DLL.
> Down load that and unzip it and that has the nahd.dll and the
> documentation
> in it. You can see for your self what I mean.
>
> Please any help on how I have to use this would be great.
>
> --
>
> Thanks Heaps
>
> Ian


Nov 16 '05 #6
ian
Hi

Ok... I can from a VB6 background and am now learning C# so i have never
done any C++.

I have only been developing for 4 years.

Thanks for all your help

Ian

"Dan Bass" wrote:
not that old, it makes me feel old! ;o)

That's how we C++ programmer's did things before .Net arrived. COM from C++
(and in general) is very complicated, wrapping up a simple DLL with the
intention of exposing a few methods is far simpler.

We're just spoilt with the interop work that goes on under the hood when
adding references to out .Net projects...

"ian" <Do**@Bother.com> wrote in message
news:31**********************************@microsof t.com...
Thanks Dan

I thought it was something strange. But i never would have figured all
that
out.

I assume that this is because it is from the oldy days

Ian


"Dan Bass" wrote:
This file is not a COM object, but it is a valid DLL. All a DLL is, is a
block of code, which must have some interface exposed via some sort of
definition file. A COM object is a technology and set of standards that
happen to sit inside of DLL files.

If you look at the "Nahd.Def" file, you'll see the methods that this DLL
exports.

You'll need to do a few things here:

1. Create the LIB
The lib is created by running the "lib" command from the command
prompt
in the folder containing the unzipped files. The batch file puts it like
this: lib /DEF:nahd.def /OUT:nahdcoff.lib

2. Extract the header file
The .H file is found in the document that comes with this package
(last
two pages or so). Cut and paste this into a new text file called
"nahdcoff.h"

3.1. Use PInvoke to late bind to the dll from c#
Read up on this here:
http://msdn.microsoft.com/library/de...lfunctions.asp
[beware line breaks]

OR

3.2 Create a new unmanaged C++ COM project that simply references the .H
file, and links to the .Lib file to produce a COM DLL, which you can then
reference via C#.
The final alternative is to ask the manufacturer for an updated module
(and
hope that one exists), with a COM, or event better, .Net interface.

"ian" <Do**@Bother.com> wrote in message
news:97**********************************@microsof t.com...
> Hi All
>
> I have a DLL (nahd.dll) that has been supplied to me will a PBX phone
> system. According to the documentation it is to allow developers to
> write
> there own applications to monitor the system.
>
> Now when I try to register this DLL I get an error.
> "DLL RegisterServer entry point not found"
> According to Microsoft this means it is not a DLL. I can view it using
> Dependency Walker and it has all the events mentioned in the
> documentation.
> And I have downloaded a new copy of the DLL so it can not be corrupt.
>
> I think that this is a non-self-registering DLL.
>
> So my problem is that I have never worked with one of these before and
> I
> don't know how to. I am used to using DLL's that you register and use
> as
> COM
> objects.
>
> I have tried to reference it as I would a standard COM object from
> CSharp
> but I got an error saying that it is not a COM Object.
>
> I am at a bit of a loss cos I have looked round the net and can't seem
> to
> find any samples dealing with this problem. Even VB samples would do.
>
> This is the Webpage for the company that supplies the DLL.
> http://www.avaya.co.uk/Support/Techn...on/default.asp
>
> If you look down the page to the VoiceMail Pro section there is a link
> to
> the Hotel DLL.
> Down load that and unzip it and that has the nahd.dll and the
> documentation
> in it. You can see for your self what I mean.
>
> Please any help on how I have to use this would be great.
>
> --
>
> Thanks Heaps
>
> Ian


Nov 16 '05 #7

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

Similar topics

5
by: Ney Andr de Mello Zunino | last post by:
Hello. I am developing a project in managed C++ for the first time. Things were going fine up until the point I had the need to mix managed and non-managed code. More specifically, what I am...
3
by: MattB | last post by:
Is there any way to reference a cell in a datagrid's ItemDataBound event by it's DataItem column name (e.item.DataItem("colname")). I need to set a cell's text to "" based on the contents of it's...
6
by: Mikey_Doc | last post by:
Hi We are running cms 2002, Framework 1.0 with Visual studio 2002. We have just upgraded to Framework 1.1 and visual studio 2003. All of our database connection strings are stored within the...
9
by: Brett Romero | last post by:
Say I have a library (A.dll) with a method that accepts a collection of a specific type. The type is defined in B.dll. In A.dll, I need to loop through this collection and reference fields of...
10
by: rshepard | last post by:
While working with lists of tuples is probably very common, none of my five Python books or a Google search tell me how to refer to specific items in each tuple. I find references to sorting a list...
5
by: =?Utf-8?B?U3RlZmFuIEJhcmxvdw==?= | last post by:
I am experiencing a lot of speed issues on initial app loads where we are referencing 3rd party 1.1 assemblies from 2.0 code. Those 1.1 assemblies reference things like System.Windows.Forms...
1
by: Earl | last post by:
I have some crappy Intuit sample code that I'm trying to clean up and turn into something useful. They reference a non-CLS compliant Interop class. Do I have any options besides marking the entire...
3
by: Torsten Wiebesiek | last post by:
Hi folks, currently I'm writing image classes for easier handling of Intel's IPP library. My idea is to have to different classes. One class that represents a complete image and deals with all...
1
by: Dave Anson | last post by:
What is the recommended practice for referencing assemblies in a project from other solutions? I am using Visual Studio 2005 Team System. I have several assemblies in another solution which will...
28
by: rahul | last post by:
#include <stdio.h> int main (void) { char *p = NULL; printf ("%c\n", *p); return 0; } This snippet prints 0(compiled with DJGPP on Win XP). Visual C++ 6.0
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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
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 projectplanning, coding, testing,...

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.