CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2011
    Posts
    32

    Thumbs up Retriving RtlIpv4StringToAddress fails

    Code:
    HMODULE hMod=LoadLibrary("ntdll.dll")
    if(hMod!=NULL)
    {
        ret=(RTLIP4TOSTRING)GetProcAddress(hMod,"RtlIpv4StringToAddress");
        if(ret==NULL)
        {
             //error
        } 
    }

    Could someone tell me why I always get "ret" as NULL ? I am using Vista SP1. Thank you

  2. #2
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,234

    Re: Retriving RtlIpv4StringToAddress fails

    It always returns NULL because there is no "RtlIpv4StringToAddress" exported by ntdll.dll. Not even in Windows Vista or Windows 7.
    Instead, use "RtlIpv4StringToAddressA" or "RtlIpv4StringToAddressW" if you want the ANSI or UNICODE version, respectively.
    Last edited by ovidiucucu; April 17th, 2011 at 11:31 AM.
    Ovidiu
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured