DLL function by ordinal

This is a discussion on DLL function by ordinal within the Tech Board forums, part of the Community Boards category; Hello everyone, Just confused about DLL function by ordinal concept. Ordinal should be on the other part of by name. ...

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    1,579

    DLL function by ordinal

    Hello everyone,


    Just confused about DLL function by ordinal concept. Ordinal should be on the other part of by name.

    But to use DLL function by ordinal technique, we need,

    1. Write a .DEF file and write down function ordinal (index);
    2. Use LoadLibrary and GerProcAddress to get the function pointer than use the function.

    In (2), we still need to use function name as input parameter to GetProcAddress. So, my question is, DLL function by ordinal technique is not pure by ordinal, still need function name information?


    thanks in advance,
    George

  2. #2
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,473
    Read documentation carefully
    lpProcName
    [in] Pointer to a null-terminated string containing the function or variable name, or the function's ordinal value. If this parameter is an ordinal value, it must be in the low-order word; the high-order word must be zero.
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  3. #3
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Thanks vart!


    You mean this?

    lpProcName
    [in] Pointer to a null-terminated string that specifies the function or variable name, or the function's ordinal value. If this parameter is an ordinal value, it must be in the low-order word; the high-order word must be zero.

    http://msdn2.microsoft.com/en-us/library/ms683212.aspx

    Quote Originally Posted by vart View Post
    Read documentation carefully

    regards,
    George

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 05-13-2011, 08:28 AM
  2. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  3. Seg Fault in Compare Function
    By tytelizgal in forum C Programming
    Replies: 1
    Last Post: 10-25-2008, 03:06 PM
  4. Problem in exporting static function in win32 dll
    By dattaforit in forum Windows Programming
    Replies: 4
    Last Post: 12-04-2006, 11:03 AM
  5. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 01:53 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21