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

Best way to get MX record from C#

Hi, I would like to know what's the best way to get a DNS MX record from C#.
The Win32 DnsQuery() API seams to do the job but is there a C# (.Net
framework) equivalent? If not, is P/Invoke my only solution? I'm not that
familiar with P/Invoke... and DnsQuery has a lot of structures (in C). If
P/Invoke is my only solution, is there a tool that can generate the C#
(structures, static method, etc.). If no such tool exists, does someone have
an example of how to invoke DnsQuery using P/Invoke in C#? Is it simpler to
use a COM object?

Thank you for your help.

C. Levasseur
Nov 3 '06 #1
1 7779

Hi,

See:
http://www.lumisoft.ee/lswww/downloa...oads/Examples/

There is dnsquery managed implementation + example app, maybe this suits
you.
"C.Levasseur" <cl********@newsgroup.nospamwrote in message
news:OU**************@TK2MSFTNGP02.phx.gbl...
Hi, I would like to know what's the best way to get a DNS MX record from
C#. The Win32 DnsQuery() API seams to do the job but is there a C# (.Net
framework) equivalent? If not, is P/Invoke my only solution? I'm not that
familiar with P/Invoke... and DnsQuery has a lot of structures (in C). If
P/Invoke is my only solution, is there a tool that can generate the C#
(structures, static method, etc.). If no such tool exists, does someone
have an example of how to invoke DnsQuery using P/Invoke in C#? Is it
simpler to use a COM object?

Thank you for your help.

C. Levasseur

Nov 3 '06 #2

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

Similar topics

1
by: James E | last post by:
I have a question about best practices of how to deal with lookup data from my C# apps. On a couple of occasions I have come across a problem where I have to automate inserting a record into a...
1
by: Chris Uwins | last post by:
Hi there, i know theres a number of ways I can achieve this but want to know the best, (but still quite simple). Up until a year ago I never used Access but have designed a few databases for...
0
by: Patrick | last post by:
I'm working on a contact management application, and need a hand with one aspect... Here's what I want to create: ------------------------------------ A form split into two parts. There is a...
12
by: Aaron Smith | last post by:
What is the best way to handle data in a multiple user environment? We have forms that will allow users to add edit and delete data from a table on SQL server. The data could be edited on multiple...
2
by: Bob | last post by:
I got three related datagrid views one parent and two children of the same. The two child tables contain many thousands of records and some of the contents are bitmap files in a sql server...
6
by: bill | last post by:
I am about to start on a module that will accept a location from a user, use Google geolocation services to get the lat/lon and then compute the distance from the site visitor to about 100 kennels...
1
by: Muchach | last post by:
Hello, Ok so what I've got going on is a form that is populated by pulling info from database then using php do{} to create elements in form. I have a text box in each table row for the user to...
12
by: Jeff | last post by:
I need to read about 100 lines of a csv file into memory. Each line contains 6 fields. What is the best way to store this into memory and then read it back. Is a array of a multi- dimsion...
6
by: kamsmartx | last post by:
I'm new to programming and need some help figuring out an algorithm. I need to design some kind of algorithm which will help us define capacity for one of our portfolios....here's the problem...
4
by: trullock | last post by:
Hi, Can anyone suggest the best way to go about the following... I'm tracking clicks (mouse down x,y coordinates) on a web page by using some javascript to create an XHR which sends the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
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
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
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
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,...

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.