Exporting aliased functions

This is a discussion on Exporting aliased functions within the C++ Programming forums, part of the General Programming Boards category; I have a function foo(), which I am aliasing like this - Code: #define foo blah _declspec(dllexport) void foo(void){ // ...

  1. #1
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189

    Exporting aliased functions

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

    Code:
    #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
    Code:
    Foo* FooTheFooInTheFoo(Foo* Foo){};
    and an enumerated functon name like this -
    Code:
    void* Function_0001(void*){};
    Anyone have an idea how to do this?
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

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

    --
    Mats
    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, 02: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, 05:46 PM
  5. functions - please help!!!!
    By linkies in forum C Programming
    Replies: 1
    Last Post: 08-21-2002, 07:53 AM

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