![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | acquiring machine name from inside an object library Hello everyone, I am writing to discover if there is a way, through System libraries or some other method, to acquire the name of the local machine from within an object library DLL. In case it is relevant, I have an object library DLL that performs a generic "error handling" process for each exception that is thrown by either itself, or by an application that is using the DLL. One of the pieces of information that the generic error handling process expects is the name of the machine that threw the exception. I have found that machine name can easily be provided by the consuming application reporting the exception. For example an ASP.NET website can use the current HttpContext Server.MachineName property. However, I'm not sure if there is a similar way to discover the local machine name to report when the exception happens within the DLL itself, where it may or may not have access to any of the HttpContext or configuration settings that any particular subscribing application can provide. Thanks for any help, Jason |
My System Specs![]() |
| | #2 (permalink) |
| | Re: acquiring machine name from inside an object library Look into System.Environment namespace. "jason" <iaesun@xxxxxx> wrote in message news:bb46d53c-f05c-4dee-8d94-adda167e0c94@xxxxxx Quote: > Hello everyone, > > I am writing to discover if there is a way, through System libraries > or some other method, to acquire the name of the local machine from > within an object library DLL. > > In case it is relevant, I have an object library DLL that performs a > generic "error handling" process for each exception that is thrown by > either itself, or by an application that is using the DLL. One of the > pieces of information that the generic error handling process expects > is the name of the machine that threw the exception. > > I have found that machine name can easily be provided by the consuming > application reporting the exception. For example an ASP.NET website > can use the current HttpContext Server.MachineName property. However, > I'm not sure if there is a similar way to discover the local machine > name to report when the exception happens within the DLL itself, where > it may or may not have access to any of the HttpContext or > configuration settings that any particular subscribing application can > provide. > > Thanks for any help, > > Jason |
My System Specs![]() |
| | #3 (permalink) |
| | Re: acquiring machine name from inside an object library There it is! Thanks very much, Norman. |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| What's inside an object? | VB Script | |||
| Help "Getting an Object Inside of an Object" | PowerShell | |||
| Microsoft Speech Object Library compiler warnings | .NET General | |||
| Lotus domino Object Library | PowerShell | |||
| Adding canonical aliases for Compare-Object, Measure-Object, New-Object | PowerShell | |||