473,545 Members | 2,715 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(REGSVR 32.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 2845
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(REGSVR 32.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**@discussio ns.microsoft.co m> wrote in message
news:9B******** *************** ***********@mic rosoft.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(REGSVR 32.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(REGSVR 32.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**@discussio ns.microsoft.co m> wrote in message
news:9B******** *************** ***********@mic rosoft.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(REGSVR 32.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(P ath.Combine(Env ironment.System Directory ,
"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**@discussio ns.microsoft.co m> wrote in message
news:EF******** *************** ***********@mic rosoft.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**@discussio ns.microsoft.co m> wrote in message
news:9B******** *************** ***********@mic rosoft.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(REGSVR 32.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(P ath.Combine(Env ironment.System Directory ,
"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**@discussio ns.microsoft.co m> wrote in message
news:EF******** *************** ***********@mic rosoft.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**@discussio ns.microsoft.co m> wrote in message
news:9B******** *************** ***********@mic rosoft.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(REGSVR 32.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
5149
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 advance, Nikhil
2
1901
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 could harden the enviroment against malicious code would be to temporarily disable the import statement by overloading __import__, but I tried what...
1
14129
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 uninitialized value in concatenation (.) at register.pl line 38, <STDIN> line 10." The PERL code is as follows:
0
1829
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 the QA server, but W2K for development workstations, etc. Thank you all very much.
1
1423
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 free download of the ..NET framework or is any other software required? As I understand they are developing the applications in Visual Studio. ...
3
1779
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 help? Thanks, Terry
3
5591
by: Informer | last post by:
Does any one know any website that I can find examples of C code in Unix Enviroment? Thanks
4
2416
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) 3) production server (for when a new build is fully tested, and stable) The problem is that the connectionstring in the web.config, should be...
6
393
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. I appreciate any help. -- Thanks, Todd Manchester Chronicle Technologies Inc.
0
7689
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7456
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6022
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5359
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5076
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3490
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1919
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1044
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.