Giter Club home page Giter Club logo

gagniuc / binary-files-inside-excel-vba Goto Github PK

View Code? Open in Web Editor NEW
22.0 22.0 4.0 3.63 MB

This application converts any executable file to VBA source code that can be included as a '.bas' module in an EXCEL file. Once inserted into the EXCEL file, the VBA code can be used to completely restore the executable file to disk in the same directory as the EXCEL file.

License: MIT License

BASIC 51.07% Visual Basic 6.0 48.93%
automation binary excel excel-vba files filesystem hex hexadecimal hexadecimal-converter md5-hash vb6 vba vba-excel xlsm

binary-files-inside-excel-vba's Issues

IDEAS - Library future

Saw this library on vbforums - great stuff and something I always wanted also. It may be worthwhile instead making these objects with predeclared IDs:

VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "resIconHouse"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private pData(476) as Byte()
Private pInitialised as boolean

Attibute Data.VB_UserMemId = 0
Public Property Get Data() as Byte()
   if !pInitialised then Call init
   Data = pData
End Property

Public Property Get Name() as string
   Name = "IconHouse"
End Property 

Public Property Get AsFile() as string
  static sPath as string
  if sPath = "" then
    'if not save as temporary file if file doesn't already exist...
  end if
  AsFile = sPath
End Property

Public Property Get AsPicture() as IPictureDisp
  static pic as IPictureDisp: if pic is nothing then set pic = LoadPicture(AsFile) 'perhaps there is a better way
  set AsPicture = pic
End Property

Public Function CallFunction(ByVal sFuncName as string, aParamTypes as vbVarType(), aParamValues as vbVarType(), RetType as vbVarType) as variant
   'use DispCallFunc ...
End Function

Private sub init()
  pData(1) = ...
  pData(2) = ...
  '...
End Sub

or better still exporting specific functions directly, which calls CallFunction internally.

This would highly abstract usage of the binary:

set image1.Picture = resIconHouse.asPicture()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.