Converting an Octet string into a string
-
Hi, im trying to convert the octet string (msExchSmtpRelayIpList) and convert into a list of IP addresses. i have tried various things but just get random numbers that don't relate to IP addresses!! can anyone help me? Many Thanks, Phil
If you're looking to just convert them, then you should follow the Microsoft support article How to use the IPsec.vbs program to export an SMTP relay list from a computer that is running Exchange Server 2003[^]. If you want to do it from within your code, I would recommend looking at the IPSec.vbs script and reproducing the steps in your program.
"we must lose precision to make significant statements about complex systems." -deKorvin on uncertainty
-
Hi, im trying to convert the octet string (msExchSmtpRelayIpList) and convert into a list of IP addresses. i have tried various things but just get random numbers that don't relate to IP addresses!! can anyone help me? Many Thanks, Phil
Hi, wouldn't IPAddress.Parse() take care of it? :)
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google - the quality and detail of your question reflects on the effectiveness of the help you are likely to get - use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
-
If you're looking to just convert them, then you should follow the Microsoft support article How to use the IPsec.vbs program to export an SMTP relay list from a computer that is running Exchange Server 2003[^]. If you want to do it from within your code, I would recommend looking at the IPSec.vbs script and reproducing the steps in your program.
"we must lose precision to make significant statements about complex systems." -deKorvin on uncertainty
-
Hi Curtis, this is just what i'm looking for. although the VB script calls the dll. do you know how i could use DLLImport to make calls this this dll? sorry for the questions, i'm a newbie at this!! thanks is advance! Phil
I haven't actually downloaded the software, just know of its abilities. Microsoft has a tutorial on Platform Invoke at Platform Invoke Tutorial (C#)[^] If you think that the official Microsoft tutorials don't tutor well (and I'd mostly agree with you), then Jason Clark wrote a pretty good piece for MSDN called Calling Win32 DLLs in C# with P/Invoke[^]. Either way that you learn, you'll need the signature of the method; you can get that from the VB script file.
"we must lose precision to make significant statements about complex systems." -deKorvin on uncertainty
-
I haven't actually downloaded the software, just know of its abilities. Microsoft has a tutorial on Platform Invoke at Platform Invoke Tutorial (C#)[^] If you think that the official Microsoft tutorials don't tutor well (and I'd mostly agree with you), then Jason Clark wrote a pretty good piece for MSDN called Calling Win32 DLLs in C# with P/Invoke[^]. Either way that you learn, you'll need the signature of the method; you can get that from the VB script file.
"we must lose precision to make significant statements about complex systems." -deKorvin on uncertainty
Hi Curtis, this has been a great help, and even though i understand it all much better. i still can't find the Entrypoints for the Dll. i have tried using Link /dump /exports dllname.dll and this doesn't return anything that is used in the VB script. i have used COM browser and this shows more details, but when i use these details in the C# code it return a unable to find an entry point exception. sorry to be a pain, could you help further? Many Thanks, Phil