Results 1 to 16 of 16

Thread: how can create user control to store big file?

Threaded View

  1. #16
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    10,918

    Re: how can create user control to store big file?

    I now see what is wanted: A self-modifying executable. I suspect Dilettante will chime in and talk about how that'll be a flag for virus scanners, and he'll be correct.

    But just continuing to think about it, I do store several large files within the resources of my primary project. However, I've never attempted to modify these files after the project was compiled, but it may be possible. It sounds like you need to be looking at resource hacker code. You need some code that can directly read/modify/write/expand the resources in an executable. You might start by exploring the UpdateResource API function.

    But again, my suggestions have nothing to do with OCX files. In fact, changing the properties (i.e., changing any binary data) in an OCX control isn't going to be permanently stored in the EXE file. Once your program ends, those property settings are going to be thrown out.

    As another idea, you might play around with just tacking stuff onto the end of the EXE file. However, that's certainly not guaranteed to work, and it'll almost certainly flag virus scanners. Basically, that's what an EXE's resources are doing, but in a documented/sanctioned way.

    Good Luck,
    Elroy

    EDIT1: I played around with this a bit more, and here's a C++ example of how to modify the resources of an EXE file. At this time, I'm not up for converting that code to VB6, but there's no doubt in my mind that it could be done.
    Last edited by Elroy; Jan 2nd, 2018 at 12:19 PM.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

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