Results 1 to 16 of 16

Thread: What are my options

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2002
    Location
    Oregon
    Posts
    64

    What are my options

    Here's the dealio, I need to write a program that will remove a text file from the end of itself, and also read/change a few registry settings. In VB I have a program that does this quite easily. My only problem now is that I only want/CAN distribute a single .EXE for this. Now VB is out of the question due to the .dll's that are required. What out there can make just a single .EXE? Will Visual C++ do it? TIA

  2. #2
    PowerPoster
    Join Date
    Aug 2001
    Location
    new jersey
    Posts
    2,904
    VC++ has no run-time requirements beyond what always comes w/ windows itself (assuming, of course that you don't include any 3rd party components), so yes, VC++ will do it for you. Or BC++.

    VB is different because it is not a programming language, it is a development environment and some of the environment is required at run-time.

    VB's package & deployment wizard (or other installation package) will take care of making sure you pack up all the needed stuff, so why can't you use it?

  3. #3

  4. #4
    Frenzied Member Microbasic's Avatar
    Join Date
    Mar 2001
    Posts
    1,402
    Originally posted by phinds
    VC++ has no run-time requirements beyond what always comes w/ windows itself (assuming, of course that you don't include any 3rd party components), so yes, VC++ will do it for you. Or BC++.

    VB is different because it is not a programming language, it is a development environment and some of the environment is required at run-time.

    VB's package & deployment wizard (or other installation package) will take care of making sure you pack up all the needed stuff, so why can't you use it?
    I have to correct you on a lot of things.

    First, Visual C++ NEEDS runtime files. There are the MFC/OWL runtimes and are needed for end computers without these libraries installed. It's VISUAL C that doesn't need runtimes due to the fact that it only uses the API (unless if you want to redistribute user32, kernel32, etc, which is not recommended). Visual C++ is MFC/OWL. Don't confuse the two.

    Next, VB IS a programming language. It DOES NOT distribute parts of its ENVIRONMENT but DLLS that are needed for the VB functions like CInt, Var, Str, Abs, etc. If you've noticed, the VB DLLs are referenced in the References section - that's why you need the Vb dlls (MSVBVM60 and STDOLE)

    Finally, if he wants only one file, then P&D won't do it for him because it creates cabinet file(s), a setup file, AND a .lst file.


    MicroBasic
    Dragon Shadow Trainer

    There is no good or evil in the world...only programmers and fools .

  5. #5
    Frenzied Member Microbasic's Avatar
    Join Date
    Mar 2001
    Posts
    1,402
    Basically, if you want to make a program without worrying about dependencies, then you can use Visual C (API VC) to make the program.


    MicroBasic
    Dragon Shadow Trainer

    There is no good or evil in the world...only programmers and fools .

  6. #6
    Jimbothegreat
    Guest
    Hey MicroBasic, is every function in VB in a .dll? coz if it was only some of them then would it be possible to write the other ones in VB and the uncheck the references some how? (This is all just wishful thinking really )

  7. #7

  8. #8
    Frenzied Member Microbasic's Avatar
    Join Date
    Mar 2001
    Posts
    1,402
    Yes...EVERY intruistic Form, UserControl, Control, and Function is either in MSVBSM60 or stdole. If you want to see proof, look in your object browser. EVERYTHING in VB, VBRUN, and VBA is in MSVBVM60 and EVERYTHING in stdole in in STDOLE.

    So there is no way you could get around it except either use VC or use a program like Fusion to merge your prog and DLL...

    Marty - he wants to REDUCE the number of files needed, not INCREASE them by adding more OCX/DLLs.


    MicroBasic
    Dragon Shadow Trainer

    There is no good or evil in the world...only programmers and fools .

  9. #9

  10. #10
    Frenzied Member Microbasic's Avatar
    Join Date
    Mar 2001
    Posts
    1,402
    Here's the important objects in MSVBVM60.dll:

    App
    _HiddenInterface and _HiddenModule
    _DClass
    _DDataBoundAndDataSourceClass
    _DDataBoundClass
    _DDataSourceClass
    _DPersistableClass
    _DPersistableDataSourceClass
    IClassModuleEvt
    IProjectControl
    IVbeRuntimeHost
    IDataProviderClassEvt
    IDataSourceClassEvt
    IPersistableClassEvt
    IPersistableDataProviderClassEvt
    IPersistableDataSourceClassEvt

    Basically, with just these, you could conclude that MSVBVM60.dll IS NEEDED no matter what. All custom controls and Class Modules need the IClassModuleEvt and the HiddenInterface interfaces, all projects need the IProjectControl and IVbeRuntimeHost. All data-binding needs the data interfaces and classes, and all appications need the App class...

    Basically, you can't remove MSVBVM60.dll. You CAN remove stdole...but only if you don't need the StdPicture, StdFont, and IUnknown, which is never the case...IUnknown is needed for every program...


    MicroBasic
    Dragon Shadow Trainer

    There is no good or evil in the world...only programmers and fools .

  11. #11

    Thread Starter
    Lively Member
    Join Date
    May 2002
    Location
    Oregon
    Posts
    64
    Ok, I've played with Visual C++ a little bit, but never got very far since I was more sucessful in learning VB (go figure). But can I make a VC program in VC++? Do I just select Win32 Application instead of MFC Application when creating the project? I'm using Visual Studio 6 Professional at home and Enterprise at the office.

  12. #12
    Frenzied Member Microbasic's Avatar
    Join Date
    Mar 2001
    Posts
    1,402
    Yes, simply select Win32 application, blank project, File|New, add a .c file, and type in code! Add .h files, resources, and text files as needed.


    MicroBasic
    Dragon Shadow Trainer

    There is no good or evil in the world...only programmers and fools .

  13. #13
    PowerPoster
    Join Date
    Aug 2001
    Location
    new jersey
    Posts
    2,904
    Microbasic, your points are well taken. I was looking at VC++ from the point of view that you don't HAVE to use MFC, as you yourself pointed out. VC++ is an IDE that allows you to use the MFC or not, as you choose

    So you CAN write programs in VC++ that don't require anything but the EXE when you distribute them (same for BC++) but the same is not true for VB, which is why I say it is not JUST a programming language (and I should have included and emphasized the "JUST", to make my point more clear)

  14. #14
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    including JUST would make you statement totally different than without the JUST.

    w/o just, you said it's not a programming language.
    w/ just, you said that vb can do more than programming.
    Remember, if someone's post was not helpful, you can always rate their post negatively .

  15. #15
    Frenzied Member Microbasic's Avatar
    Join Date
    Mar 2001
    Posts
    1,402
    The word "JUST" changes your entire sentence. Without JUST, you are saying that VB is NOT a programming language, which is obviously false. With JUST, it's correct (although your point about redistributing the environment is not really correct - the DLL MSVBVM60 contain vital stuff required in VB programs, not the VB environment or a part of it).


    MicroBasic
    Dragon Shadow Trainer

    There is no good or evil in the world...only programmers and fools .

  16. #16
    Frenzied Member Microbasic's Avatar
    Join Date
    Mar 2001
    Posts
    1,402
    Originally posted by phinds
    Microbasic, your points are well taken. I was looking at VC++ from the point of view that you don't HAVE to use MFC, as you yourself pointed out. VC++ is an IDE that allows you to use the MFC or not, as you choose

    So you CAN write programs in VC++ that don't require anything but the EXE when you distribute them (same for BC++) but the same is not true for VB, which is why I say it is not JUST a programming language (and I should have included and emphasized the "JUST", to make my point more clear)
    The technical definition of C++ is C++ with classes, and the technical def. for Visual C++ is Visual C with classes. The API is called Visual C for a reason - they were created to be compatible with old C environments - that's why the DLLs were made in C, not C++. It's true that Visual C++ is also the ide, but if you use it to make API-based C programs, it's called Visual C (unless if you're using COM, which changes the entire phrasing).

    If you make...let's say...an icon with Visual C++, would that icon be called Visual C++ too? If you make an RTF file with word, does that make the file a word document? If you make a post in VBWorld, would the post be called an VBWorld? If you make chicken with a microwave, would that chicken be called a MicroWave? If god made humans, would we be called gods?


    MicroBasic
    Dragon Shadow Trainer

    There is no good or evil in the world...only programmers and fools .

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