Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Converting an Octet string into a string

Converting an Octet string into a string

Scheduled Pinned Locked Moved C#
helpquestionlounge
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lane0p2
    wrote on last edited by
    #1

    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

    C L 2 Replies Last reply
    0
    • L lane0p2

      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

      C Offline
      C Offline
      Curtis Schlak
      wrote on last edited by
      #2

      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

      L 1 Reply Last reply
      0
      • L lane0p2

        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

        L Offline
        L Offline
        Luc Pattyn
        wrote on last edited by
        #3

        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


        1 Reply Last reply
        0
        • C Curtis Schlak

          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

          L Offline
          L Offline
          lane0p2
          wrote on last edited by
          #4

          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

          C 1 Reply Last reply
          0
          • L lane0p2

            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

            C Offline
            C Offline
            Curtis Schlak
            wrote on last edited by
            #5

            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

            L 1 Reply Last reply
            0
            • C Curtis Schlak

              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

              L Offline
              L Offline
              lane0p2
              wrote on last edited by
              #6

              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

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups