Welcome
Username or Email:

Password:


Missing Code




[ ]
[ ]
Online
  • Guests: 25
  • Members: 0
  • Newest Member: omjtest
  • Most ever online: 396
    Guests: 396, Members: 0 on 12 Jan : 12:51
Members Birthdays:
No birthdays today

Next birthdays
05/04 Matthew T. (35)
05/04 Amrit Deshmukh (60)
05/05 Alexandre (32)
Contact
If you need assistance, please send an email to forum at 4hv dot org. To ensure your email is not marked as spam, please include the phrase "4hv help" in the subject line. You can also find assistance via IRC, at irc.shadowworld.net, room #hvcomm.
Support 4hv.org!
Donate:
4hv.org is hosted on a dedicated server. Unfortunately, this server costs and we rely on the help of site members to keep 4hv.org running. Please consider donating. We will place your name on the thanks list and you'll be helping to keep 4hv.org alive and free for everyone. Members whose names appear in red bold have donated recently. Green bold denotes those who have recently donated to keep the server carbon neutral.


Special Thanks To:
  • Aaron Holmes
  • Aaron Wheeler
  • Adam Horden
  • Alan Scrimgeour
  • Andre
  • Andrew Haynes
  • Anonymous000
  • asabase
  • Austin Weil
  • barney
  • Barry
  • Bert Hickman
  • Bill Kukowski
  • Blitzorn
  • Brandon Paradelas
  • Bruce Bowling
  • BubeeMike
  • Byong Park
  • Cesiumsponge
  • Chris F.
  • Chris Hooper
  • Corey Worthington
  • Derek Woodroffe
  • Dalus
  • Dan Strother
  • Daniel Davis
  • Daniel Uhrenholt
  • datasheetarchive
  • Dave Billington
  • Dave Marshall
  • David F.
  • Dennis Rogers
  • drelectrix
  • Dr. John Gudenas
  • Dr. Spark
  • E.TexasTesla
  • eastvoltresearch
  • Eirik Taylor
  • Erik Dyakov
  • Erlend^SE
  • Finn Hammer
  • Firebug24k
  • GalliumMan
  • Gary Peterson
  • George Slade
  • GhostNull
  • Gordon Mcknight
  • Graham Armitage
  • Grant
  • GreySoul
  • Henry H
  • IamSmooth
  • In memory of Leo Powning
  • Jacob Cash
  • James Howells
  • James Pawson
  • Jeff Greenfield
  • Jeff Thomas
  • Jesse Frost
  • Jim Mitchell
  • jlr134
  • Joe Mastroianni
  • John Forcina
  • John Oberg
  • John Willcutt
  • Jon Newcomb
  • klugesmith
  • Leslie Wright
  • Lutz Hoffman
  • Mads Barnkob
  • Martin King
  • Mats Karlsson
  • Matt Gibson
  • Matthew Guidry
  • mbd
  • Michael D'Angelo
  • Mikkel
  • mileswaldron
  • mister_rf
  • Neil Foster
  • Nick de Smith
  • Nick Soroka
  • nicklenorp
  • Nik
  • Norman Stanley
  • Patrick Coleman
  • Paul Brodie
  • Paul Jordan
  • Paul Montgomery
  • Ped
  • Peter Krogen
  • Peter Terren
  • PhilGood
  • Richard Feldman
  • Robert Bush
  • Royce Bailey
  • Scott Fusare
  • Scott Newman
  • smiffy
  • Stella
  • Steven Busic
  • Steve Conner
  • Steve Jones
  • Steve Ward
  • Sulaiman
  • Thomas Coyle
  • Thomas A. Wallace
  • Thomas W
  • Timo
  • Torch
  • Ulf Jonsson
  • vasil
  • Vaxian
  • vladi mazzilli
  • wastehl
  • Weston
  • William Kim
  • William N.
  • William Stehl
  • Wesley Venis
The aforementioned have contributed financially to the continuing triumph of 4hv.org. They are deserving of my most heartfelt thanks.
Forums
4hv.org :: Forums :: Computer Science
« Previous topic | Next topic »   

Packing dll into single exe file

Move Thread LAN_403
Linas
Sun Feb 01 2015, 08:47AM Print
Linas Registered Member #1143 Joined: Sun Nov 25 2007, 04:55PM
Location: Vilnius, Lithuania
Posts: 721
Hello, not too long ago i started to program in Visual Basic, because i want to make lightweight application for DSP flash programming
Rignt now i am using labview, but in few days time i was able to remake it in windows form application

Problem is, that FTCSPI.dll is not included into exe file, is it possible to make my applications in a single exe program ?
]debug.zip[/file]
1422780464 1143 FT0 Untitled
Back to top
Andy
Sun Feb 01 2015, 05:15PM
Andy Registered Member #4266 Joined: Fri Dec 16 2011, 03:15AM
Location:
Posts: 874
Depeding on the size you could put it in a array then create a file and copy, the normal way is at the bottom of your program put a marker say 41414141 then in the program use a egg hunter find the marker and cipy from the exe to another file, or just download a questioable packer program.If you need basic C code which you can convert to Vb will write it up.

Edit
It would be easyer to dynamic load the dll before use with Loadlibary(path,settings), then the program shouldnt complain until its called, just extract it beforehand, otherwise you need to right code the goes in just after its setup the seh and before calling main and loading dlls, but after kernel32 got loaded, then seach for the marker, create a file copy it to that, the jmp to or carrying after the hunter.
Back to top
Linas
Sun Feb 01 2015, 06:41PM
Linas Registered Member #1143 Joined: Sun Nov 25 2007, 04:55PM
Location: Vilnius, Lithuania
Posts: 721
Andy wrote ...

Depeding on the size you could put it in a array then create a file and copy, the normal way is at the bottom of your program put a marker say 41414141 then in the program use a egg hunter find the marker and cipy from the exe to another file, or just download a questioable packer program.If you need basic C code which you can convert to Vb will write it up.

Edit
It would be easyer to dynamic load the dll before use with Loadlibary(path,settings), then the program shouldnt complain until its called, just extract it beforehand, otherwise you need to right code the goes in just after its setup the seh and before calling main and loading dlls, but after kernel32 got loaded, then seach for the marker, create a file copy it to that, the jmp to or carrying after the hunter.
As i stated, i just started to work with windows programming , so it will take some time for me to understand what you just said.
it looks like where is source code for dll file, does that helps my purpose ?

it looks like c++ program, just question, how can i add this to my vb program ? Link2

Back to top
Shrad
Sun Feb 01 2015, 08:09PM
Shrad Registered Member #3215 Joined: Sun Sept 19 2010, 08:42PM
Location:
Posts: 780
for what I see this is .NET 4.0

you should be able to configure the project to include assemblies and resources in the compiled .exe file

this is from the set of parameters found when you right click the root of your project in the project explorer (or from the assembly itself I don't recall very well)

If needed I can check tomorrow at work where all my gear is
Back to top
Linas
Sun Feb 01 2015, 10:32PM
Linas Registered Member #1143 Joined: Sun Nov 25 2007, 04:55PM
Location: Vilnius, Lithuania
Posts: 721
I was searching for nay options that will do just that, but was unable to

If any one want to give a go, project for VisualStudio 2013 is attached, this is simple SPI Flash programmer via ft2232 chip
]d2xxaccess.zip[/file]
Back to top
Andy
Mon Feb 02 2015, 01:42AM
Andy Registered Member #4266 Joined: Fri Dec 16 2011, 03:15AM
Location:
Posts: 874
Linas, its easy to write in charts.


Pe header
Seh code
Dll loader(kernel32,ntdll)
Egg humter and file creation with memcpy to file from exe to file created.
Dll loader continue
Main call
Program
End of program
Mark
Dll program

You will need pe explorer to fix the header checksum and other stuff can be done, pretty much I was saying above but the egg hunter line I will write in asm, and a second program that will search your exe and load the asm, you just need to run pe explorer to fix the checksum.
Back to top
Shrad
Mon Feb 02 2015, 10:56AM
Shrad Registered Member #3215 Joined: Sun Sept 19 2010, 08:42PM
Location:
Posts: 780
it should be a right click on your assembly in the project explorer view, properties, and setting Embed Interop Types to true,

that should include what you use from the assembly in the target assembly (your .exe) on compilation
Back to top

Moderator(s): Chris Russell, Noelle, Alex, Tesladownunder, Dave Marshall, Dave Billington, Bjørn, Steve Conner, Wolfram, Kizmo, Mads Barnkob

Go to:

Powered by e107 Forum System
 
Legal Information
This site is powered by e107, which is released under the GNU GPL License. All work on this site, except where otherwise noted, is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. By submitting any information to this site, you agree that anything submitted will be so licensed. Please read our Disclaimer and Policies page for information on your rights and responsibilities regarding this site.