473,322 Members | 1,736 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,322 software developers and data experts.

How do I register and non .net dll in a .net enviroment?

Hello,

How do I register and non .net dll(with the OS) in a .net enviroment? I
have a third party dll I need to register(REGSVR32.EXE). What is the best
approach to this in a .Net enviroment. I appreciate any help.
--
Thanks,
Todd Manchester
Chronicle Technologies Inc.

Nov 9 '05 #1
6 2817
Todd wrote:
Hello,

How do I register and non .net dll(with the OS) in a .net enviroment?
I have a third party dll I need to register(REGSVR32.EXE). What is
the best approach to this in a .Net enviroment. I appreciate any
help.


We need more information.

You say that it is a non-.NET DLL, so that means it may be a COM server,
or it may be a DLL. If it is a COM server then regsvr32 will register it
with the system and if you have a type library for this server
(typically it is bound as a resource to the DLL) you'll be able to use
COM interop to call it from .NET.

If the DLL is not a COM server then you cannot 'register' it. Instead
you have to put it in the PATH, or better, put it in your application's
folder. To call the functions in such a DLL you have to use platform
invoke in .NET.

To tell if it is a COM server use dumpbin /exports or depends to see if
the DLL exports the GetClassObject function. If it doesn't, then it is
not a COM server.

Richard
--
http://www.grimes.demon.co.uk/workshops/fusionWS.htm
http://www.grimes.demon.co.uk/workshops/securityWS.htm
Nov 9 '05 #2
You can invoke regsvr32.exe and pass the dll as the command line parameter.
Use Process.Start to invoke regsvr32

----------------
-Atul, Sky Software http://www.ssware.com
Shell MegaPack For .Net & ActiveX
Windows Explorer GUI Controls
&
Quick-Launch Like Appbars, MSN/Office2003 Style Popups,
System Tray Icons and Shortcuts/Internet Shortcuts
----------------
"Todd" <To**@discussions.microsoft.com> wrote in message
news:9B**********************************@microsof t.com...
Hello,

How do I register and non .net dll(with the OS) in a .net enviroment? I
have a third party dll I need to register(REGSVR32.EXE). What is the best
approach to this in a .Net enviroment. I appreciate any help.
--
Thanks,
Todd Manchester
Chronicle Technologies Inc.

Nov 10 '05 #3
Richard,

It is a Com Server and I was looking for a code example of how to register
it in .Net. I am new to .Net .
--
Thanks,
Todd Manchester
Chronicle Technologies Inc.

"Richard Grimes" wrote:
Todd wrote:
Hello,

How do I register and non .net dll(with the OS) in a .net enviroment?
I have a third party dll I need to register(REGSVR32.EXE). What is
the best approach to this in a .Net enviroment. I appreciate any
help.


We need more information.

You say that it is a non-.NET DLL, so that means it may be a COM server,
or it may be a DLL. If it is a COM server then regsvr32 will register it
with the system and if you have a type library for this server
(typically it is bound as a resource to the DLL) you'll be able to use
COM interop to call it from .NET.

If the DLL is not a COM server then you cannot 'register' it. Instead
you have to put it in the PATH, or better, put it in your application's
folder. To call the functions in such a DLL you have to use platform
invoke in .NET.

To tell if it is a COM server use dumpbin /exports or depends to see if
the DLL exports the GetClassObject function. If it doesn't, then it is
not a COM server.

Richard
--
http://www.grimes.demon.co.uk/workshops/fusionWS.htm
http://www.grimes.demon.co.uk/workshops/securityWS.htm

Nov 10 '05 #4
Atul,

Would you have a code example of how to do that?

--
Thanks,
Todd Manchester
Chronicle Technologies Inc.

"Atul" wrote:
You can invoke regsvr32.exe and pass the dll as the command line parameter.
Use Process.Start to invoke regsvr32

----------------
-Atul, Sky Software http://www.ssware.com
Shell MegaPack For .Net & ActiveX
Windows Explorer GUI Controls
&
Quick-Launch Like Appbars, MSN/Office2003 Style Popups,
System Tray Icons and Shortcuts/Internet Shortcuts
----------------
"Todd" <To**@discussions.microsoft.com> wrote in message
news:9B**********************************@microsof t.com...
Hello,

How do I register and non .net dll(with the OS) in a .net enviroment? I
have a third party dll I need to register(REGSVR32.EXE). What is the best
approach to this in a .Net enviroment. I appreciate any help.
--
Thanks,
Todd Manchester
Chronicle Technologies Inc.


Nov 10 '05 #5
Process.Start(Path.Combine(Environment.SystemDirec tory ,
"regsvr32.exe"),"{Path to COM dll file}");

----------------
-Atul, Sky Software http://www.ssware.com
Shell MegaPack For .Net & ActiveX
Windows Explorer GUI Controls
&
Quick-Launch Like Appbars, MSN/Office2003 Style Popups,
System Tray Icons and Shortcuts/Internet Shortcuts
----------------

"Todd" <To**@discussions.microsoft.com> wrote in message
news:EF**********************************@microsof t.com...
Atul,

Would you have a code example of how to do that?

--
Thanks,
Todd Manchester
Chronicle Technologies Inc.

"Atul" wrote:
You can invoke regsvr32.exe and pass the dll as the command line
parameter.
Use Process.Start to invoke regsvr32

----------------
-Atul, Sky Software http://www.ssware.com
Shell MegaPack For .Net & ActiveX
Windows Explorer GUI Controls
&
Quick-Launch Like Appbars, MSN/Office2003 Style Popups,
System Tray Icons and Shortcuts/Internet Shortcuts
----------------
"Todd" <To**@discussions.microsoft.com> wrote in message
news:9B**********************************@microsof t.com...
> Hello,
>
> How do I register and non .net dll(with the OS) in a .net enviroment?
> I
> have a third party dll I need to register(REGSVR32.EXE). What is the
> best
> approach to this in a .Net enviroment. I appreciate any help.
> --
> Thanks,
> Todd Manchester
> Chronicle Technologies Inc.
>


Nov 11 '05 #6
Perfect!!
--
Thanks,
Todd Manchester
Chronicle Technologies Inc.

"Atul" wrote:
Process.Start(Path.Combine(Environment.SystemDirec tory ,
"regsvr32.exe"),"{Path to COM dll file}");

----------------
-Atul, Sky Software http://www.ssware.com
Shell MegaPack For .Net & ActiveX
Windows Explorer GUI Controls
&
Quick-Launch Like Appbars, MSN/Office2003 Style Popups,
System Tray Icons and Shortcuts/Internet Shortcuts
----------------

"Todd" <To**@discussions.microsoft.com> wrote in message
news:EF**********************************@microsof t.com...
Atul,

Would you have a code example of how to do that?

--
Thanks,
Todd Manchester
Chronicle Technologies Inc.

"Atul" wrote:
You can invoke regsvr32.exe and pass the dll as the command line
parameter.
Use Process.Start to invoke regsvr32

----------------
-Atul, Sky Software http://www.ssware.com
Shell MegaPack For .Net & ActiveX
Windows Explorer GUI Controls
&
Quick-Launch Like Appbars, MSN/Office2003 Style Popups,
System Tray Icons and Shortcuts/Internet Shortcuts
----------------
"Todd" <To**@discussions.microsoft.com> wrote in message
news:9B**********************************@microsof t.com...
> Hello,
>
> How do I register and non .net dll(with the OS) in a .net enviroment?
> I
> have a third party dll I need to register(REGSVR32.EXE). What is the
> best
> approach to this in a .Net enviroment. I appreciate any help.
> --
> Thanks,
> Todd Manchester
> Chronicle Technologies Inc.
>


Nov 11 '05 #7

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

Similar topics

2
by: Nikhil Barthwal | last post by:
Hi, I have a Java program that needs to access the value of variable PATH (Set in Unix enviroment by setenv or DOS enviroment by PATH statement). How do I access it in Java? Thanks in...
2
by: Steve Juranich | last post by:
If this is a FAQ, please let me know where the answer is. I have in some code an 'eval', which I hate, but it's the shortest path to where I need to get at this point. I thought that one way I...
1
by: G Kannan | last post by:
Hey all! I have written a perl script to retrieve information from a HTML Form and insert the data into an Oracle database table. I am gettting the the following error message: "Use of...
0
by: Mariano Abdala | last post by:
Hi! My name is Mariaro, I was wondering how to create a fully operational development enviroment for .net web App's?? I would like to know for example, hard you would use, OSs, like Win2003 for...
1
by: Andy Stuart | last post by:
I have been asked to provide a .NET enviroment to run SQL based .NET applications across the web. Am I correct in assuming that all is required is Microsoft Server 2003 and SQL Server 2000 and the...
3
by: TWJohnson | last post by:
Can anyone tell me how to run the Access2k wizards from code in the Runtime enviroment? I need to do Address labels..perhaps there is another way to approach to this besides the wizards. Can anyone...
3
by: Informer | last post by:
Does any one know any website that I can find examples of C code in Unix Enviroment? Thanks
4
by: Benne Smith | last post by:
In our company, i have three servers; 1) a development server (mine only - here i make daily changes and test my stuff) 2) a test server (for the users to test milestone builds - changes weekly)...
6
by: Todd | last post by:
Hello, How do I register and non .net dll(with the OS) in a .net enviroment? I have a third party dll I need to register(REGSVR32.EXE). What is the best approach to this in a .Net enviroment. ...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.