Results 1 to 6 of 6
  1. #1
    JLSSindac's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Posts
    0
    Reputation
    10
    Thanks
    0

    Exclamation C++ DLL to Visual Basic

    example i have this code in c++ DLL:

    int give = 100;


    question: how can i read "give" and get its value "100" using VISUAL BASIC???

    please give some sample code... thanks...

  2. #2
          ( ° ͜ʖ͡°)╭∩╮
    Former Staff
    MarkHC's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    127.0.0.1
    Posts
    2,750
    Reputation
    66
    Thanks
    14,529
    My Mood
    Angelic
    I think you might want to read some VB and C++ books...


    CoD Minion from 09/19/2012 to 01/10/2013

  3. The Following User Says Thank You to MarkHC For This Useful Post:

    kolexz (08-04-2012)

  4. #3
    jkbeast's Avatar
    Join Date
    Jul 2012
    Gender
    male
    Posts
    15
    Reputation
    10
    Thanks
    318
    Well, you would want to try something like this:

    In this order:
    --In c++, use the * pointers to get the memory address of the 'give' variable
    --Save the memory address into a .txt file
    ----(Note: ) the memory address may change every time you run the program, so you would need to re-save the memory address again each time you run the program
    ----(Note: ) aka, just don't get the memory address and assume that it will be constant. Because it won't. Just add a line of code that gets & saves it each time.
    --In the VB program, open up that text file so you can read the memory address
    --Save the information at that memory address (which is the memory address of the 'give' variable) into a new variable in the VB program.

    This should solve your problem in the simplest way possible.

    I will not give you code samples, because it is quite simple to do this with both VB and C++. I know both of them rather well, and I can tell you that it is very easy. If you really don't get it, use Google to look up something like "how to read a .txt file in VB" or something. I taught myself both languages almost entirely in this way.

  5. #4
    flameswor10's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    12,528
    Reputation
    981
    Thanks
    10,409
    My Mood
    In Love
    You can use an external function so you can grab the variable through VB.net.
    This requires you to declare the function using the extern method, and then compiling it as a .DLL file.

    If this is not what you required, then you can reverse engineer your own .dll file and read the memory inside of the file after loading it or what ever.
    You can also save the variable which your VB.net application will then read. This can be done in a variety of ways, either by registry or a Settings file.

    I hope you can manage to do this yourself, If you need help research on.
    GetPrivateProfileInt

    Regards,
    Steven
    No I do not make game hacks anymore, please stop asking.

  6. #5
    JLSSindac's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Posts
    0
    Reputation
    10
    Thanks
    0
    Thanks for helping me through this problem guys... ^_^

    I made it already... In C++ DLL, I simply make a function that logs the variable and its value into a txtfile..
    then simply open the txtfile content in VB form then show into the multiline textbox.... GOT IT!!! ^_~

  7. #6
    Thyke's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    7
    Reputation
    10
    Thanks
    0
    Define and use it as a lib

Similar Threads

  1. Writing your own Visual Basics (v5 or v6) Trainer
    By TheRedEye in forum Game Hacking Tutorials
    Replies: 29
    Last Post: 12-09-2013, 09:56 AM
  2. [Help]Call .dll From Visual Basic
    By GameTrainerMaker in forum Visual Basic Programming
    Replies: 7
    Last Post: 09-06-2010, 11:46 PM
  3. problem with the visual basic tut
    By Elliwood in forum WarRock - International Hacks
    Replies: 5
    Last Post: 05-30-2007, 12:45 AM
  4. [Help] Atom API with Visual Basic 6.0 or .NET
    By Bull3t in forum Visual Basic Programming
    Replies: 5
    Last Post: 07-23-2006, 09:21 AM
  5. Packets & Visual Basic
    By BadBob in forum Hack Requests
    Replies: 5
    Last Post: 07-20-2006, 09:28 PM