Thread: Exporting aliased functions

  1. #1
    Malum in se abachler's Avatar
    Join Date
    Apr 2007

    Exporting aliased functions

    I have a function foo(), which I am aliasing like this -

    #define foo blah
    _declspec(dllexport) void foo(void){
       // some code
    such that the dll contains the function blah, rather than foo. now what I want to do is to have the dll contain a reference to both foo and blah, even though both references would point to the same entry point. The reason for this is I want to export both a friendly name like
    Foo* FooTheFooInTheFoo(Foo* Foo){};
    and an enumerated functon name like this -
    void* Function_0001(void*){};
    Anyone have an idea how to do this?

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Farncombe, Surrey, England
    I have never looked into it, but I'm 99% sure that you can "alias" functions in the .def file.

    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. calling functions within functions
    By edd1986 in forum C Programming
    Replies: 3
    Last Post: 03-29-2005, 03:35 AM
  2. Factory Functions HOWTO
    By GuardianDevil in forum Windows Programming
    Replies: 1
    Last Post: 05-01-2004, 01:41 PM
  3. Shell functions on Win XP
    By geek@02 in forum Windows Programming
    Replies: 6
    Last Post: 04-19-2004, 05:39 AM
  4. Inline functions and inheritance
    By hpy_gilmore8 in forum C++ Programming
    Replies: 3
    Last Post: 01-14-2004, 06:46 PM
  5. functions - please help!!!!
    By linkies in forum C Programming
    Replies: 1
    Last Post: 08-21-2002, 07:53 AM