VB Decompiler Forum Index VB Decompiler
Hosted by TheAutomaters.com
 
  MemberlistMemberlist
 

Export Wrapper Problem MSVBVM60.dll

 
   VB Decompiler Forum Index -> The Code
Author Message
nade
New User


Joined: 08 Oct 2007
Posts: 2

Posted: Thu Oct 11, 2007 4:25 pm     Post subject: Export Wrapper Problem MSVBVM60.dll

I am not sure where to ask this question.

I have written a few wrappers in c++ for applications also written in c++.

I wanted to see if I could hook some functions in a visual basic executable.

Here is how my hook works:

You make a dll and include all the exports (msvbvm60.dll) has. Like in my def file below. Now for hooking I do what I always do and in this case it would be something like
Code:

rtcMsgBox = myBox


The def file looks like this:
Code:

LIBRARY nadewrap.dll
EXPORTS

rtcMsgBox = MSVBVM60.rtcMsgBox
EXPORTSBASIC_CLASS_AddRef = MSVBVM60.BASIC_CLASS_AddRef
BASIC_CLASS_GetIDsOfNames = MSVBVM60.BASIC_CLASS_GetIDsOfNames
BASIC_CLASS_Invoke = MSVBVM60.BASIC_CLASS_Invoke
..


I tried only to put in the functions that the program needs. The program didn't start up.

My error:


I tried putting all the functions that msvbvm60 has and I still get the same error.

I tried removing the hook so it just 'forwards' the exact functions to msvbvm60.dll

Putting all the in depth stuff aside. Does msvbvm60.dll serve more purpose than just exporting functions?
Back to top
sarge
Moderator


Joined: 24 Sep 2002
Posts: 194

Posted: Sun Oct 14, 2007 6:11 pm     Post subject:

1. Hooking into VB executables has been around a long time, you should be able to find some "secrets" using a search engine on the 'net.

2. I'm sure you know that DLL's themselves don't "execute" by themselves, they are just libraries that the executable makes use of.

3. The "VM" in "MSVBVM..." stands for VirtualMachine. This implies that it is more than just a library of exported functions. So...

4. Yes, based on item #3 above, msvbvm60.dll does a lot more than provide exported functions, it is the "engine" for VB code that actually executes the code in the executable. Even for a DLL, whose functions are called by the exectuable, the VM is required to execute those functions.

Sarge
Back to top
nade
New User


Joined: 08 Oct 2007
Posts: 2

Posted: Sun Dec 30, 2007 11:08 pm     Post subject:

I don't think you understand. Detouring functions in vb programs is not a problem.

There is nothing on the internet about a "proxy" dll for this kind of project.

It doesn't matter that it does more then export functions - all calls are redirected back to the original dll.

I just thought a wrapper would be a cleaner solution then hooking 124809 times.
Back to top
sarge
Moderator


Joined: 24 Sep 2002
Posts: 194

Posted: Wed Jan 02, 2008 3:53 pm     Post subject:

Yup, you're right...
"I don't think you understand."

I interpreted your post to mean, "How do I hook into a VB function?", or, more loosely, as something like "How can I intercept the VB messagebox (or whatever) function to make it call my own messagebox function?". That is, you are both redirecting the link, and sub-classing the existing VB message box.

It appears now, as I read your second post, that you want to wrap the entire VM, not just a few functions here-and-there (or am I wrong again?). I've not done that, so I can't comment with authority, but two thoughts:
1. You put in " the functions that the program needs". Are you sure you got them all, whatever they may be?
2. The VM has it's own dependencies on other dll's. Have you made sure to include/link them into your hook?

Other than that......???

Sarge
Back to top
   VB Decompiler Forum Index -> The Code All times are GMT
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group