Results 1 to 2 of 2

Thread: A problem with forwarding an exported function in a DLL

Hybrid View

  1. #1

    A problem with forwarding an exported function in a DLL

    I am forwarding an exported function of a DLL to another function in my DLL. I use ExpX64 for editing the export table of the DLL.
    (for example I forward the ?MyFunc@MyClass@@SAJJAEAUMyStruct@@@Z to myDLL.?MyFunc@MyClass@@SAJJAEAUMyStruct@@@Z)
    My problem is that my target function is a member of a class and in runtime, forwarding that generates a COMException ("attempted to use an object that has ceased to exist")
    What do you think I'm doing wrong? (Calling conventions? And there should be a difference between forwarding a regular function and a class-member one.)
    I implement MyFunc like this:

    __declspec(dllexport) LONG MyClass::MyFunc (long a,struct MyStruct& b)
    ps: I can also use a DLL proxy (create a proxy DLL that implements the target function I want and forward all other functions to the original DLL, but the problem that my function is part of a class, still remains)

    I promise that I have read the FAQ and tried to use the Search to answer my question.

  2. #2
    as in your other post
    export forwarding is not a cause of this error

Similar Threads

  1. Strange problem when hotpatching function..
    By BanMe in forum Advanced Reversing and Programming
    Replies: 6
    Last Post: July 21st, 2009, 14:46
  2. implicit link with DLL's exported function by ordinal
    By dion in forum The Newbie Forum
    Replies: 2
    Last Post: February 22nd, 2009, 11:39
  3. Replies: 3
    Last Post: April 1st, 2008, 04:01
  4. Looking for exported function. The way?
    By babar0ga in forum Advanced Reversing and Programming
    Replies: 17
    Last Post: October 21st, 2005, 07:30
  5. OllyDbg can only see one NtXxx function exported f
    By 1bitshort in forum OllyDbg Support Forums
    Replies: 1
    Last Post: April 26th, 2004, 23:10

Tags for this Thread


Posting Permissions

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