Results 1 to 7 of 7

Thread: [RESOLVED] DLL Injection [DLLMain in VB6] Help with .DEF File [HELP!]

  1. #1

    Thread Starter
    Member henriqueshb's Avatar
    Join Date
    Jun 2010
    Posts
    59

    Resolved [RESOLVED] DLL Injection [DLLMain in VB6] Help with .DEF File [HELP!]

    Hello guys!

    I need some help in here, actually i need any help you could give me.

    The thing is, I do know how to make an attached dll made in c++ startup, but in vb 6 I don't.

    The only thing I know is that i need to create a file (that I DON'T EVEN KNOW HOW SHOULD BE NAMED) with the extension ".def".
    It should hold some configurations about the linker and stuff...

    One of that stuff is the "Exports" properties. There i should put the "DLLMain" function declared in my dll and then the magic will happen.
    At list, thats what people say in some forums...

    Basically i need to know how to create an injectable Dll, the porpouse is to run it in mine "Lost Source Code" .exe. I added a new window that do some cool stuff that i wanted to be shown there.

    Any tip of the name? content? anithing?

    And sorry for the POOR ENGLISH!

    Thanks in advance.
    Did you like?
    Rate it!
    by SHB

  2. #2
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,600

    Re: DLL Injection [DLLMain in VB6] Help with .DEF File [HELP!]

    a .DEF file is simply a file you use for the compiler to export unmangled names. Without it functions are exported from C++ DLLs with their names mangled. I.e. It adds numbers and non-alphanumeric characters. You may name the .DEF file anything you want so long as it has an "EXPORTS" header and the .DEF extension.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  3. #3

    Thread Starter
    Member henriqueshb's Avatar
    Join Date
    Jun 2010
    Posts
    59

    Re: DLL Injection [DLLMain in VB6] Help with .DEF File [HELP!]

    THANKS MAN! Helped a lot!

    I'll try it out.
    Did you like?
    Rate it!
    by SHB

  4. #4

    Thread Starter
    Member henriqueshb's Avatar
    Join Date
    Jun 2010
    Posts
    59

    Re: DLL Injection [DLLMain in VB6] Help with .DEF File [HELP!]

    I am tring the following

    "C:\Program Files\Microsoft Visual Studio\VB98\VB6.EXE" /make "C:\Users\myuser\Desktop\manager\Project1.vbp" /D DEF="C:\Users\myuser\Desktop\manager\Config.DEF"

    But still does not work.

    What am I doing wrong?

    Any help would be GREATE!
    Did you like?
    Rate it!
    by SHB

  5. #5
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,600

    Re: DLL Injection [DLLMain in VB6] Help with .DEF File [HELP!]

    A DEF file is used by the VS C++ compiler not the VB6 compiler.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  6. #6

    Thread Starter
    Member henriqueshb's Avatar
    Join Date
    Jun 2010
    Posts
    59

    Re: DLL Injection [DLLMain in VB6] Help with .DEF File [HELP!]

    Quote Originally Posted by Niya View Post
    A DEF file is used by the VS C++ compiler not the VB6 compiler.
    Oh!
    Question Answerd!

    Thanks at all.
    Did you like?
    Rate it!
    by SHB

  7. #7
    New Member
    Join Date
    Feb 2013
    Posts
    1

    Re: DLL Injection [DLLMain in VB6] Help with .DEF File [HELP!]

    Quote Originally Posted by henriqueshb View Post
    Oh!
    Question Answerd!

    Thanks at all.
    I just ran across this VERY excellent code that WILL allow you to create a STANDARD .DLL using VB6!

    http://planet-source-code.com/vb/scr...54190&lngWId=1

    I followed the step-by-step instructions (created VB6 Add-In), and copied files to make a "Standard DLL" project template.

    Works perfectly (and it's FREE)!

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
  •  



Click Here to Expand Forum to Full Width