how to embed manifest file in executable without mt.exe? - windows

I don't have Visual Studio and I don't have Windows SDK, so I don't have mt.exe.
Is there a way to embed the manifest file in the executable without using mt.exe ?

If you have the ability to compile source code into an executable program via a different compiler, then you can use the Win32 API UpdateResource() function to modify the target .exe file and add/update an RT_MANIFEST resource in it as needed. Otherwise, you will have to use a third-party resource editor, such as XN Resource Editor or Resource Hacker, to edit the target .exe file manually.

Related

Trouble with opening a .res file

I recently obtained some files with the extension of .res
The problem I am facing right now is that I am unable to open it using different kinds of Resource Editors.
Here are the list of programs I have tried:
Visual Studio 2017
ResourceHacker
Delphi Decompiler
XN Resource Editor
And here is an example of the content of the file when opened in Notepad++: http://i.imgur.com/fcmEfED.jpg
What could be the cause of me being unable to open this file? Am I missing anything?
.res files are to .rc files like .obj. or .lib files to .cpp files - they are the compiled version of the resource definition files.
Don't expect that file to be editable by the likes of Notepad, treat it as any other compiled binary file. Especially since it really is a compiled binary file.
Having said that - when you "import" that file for use in your app you need to explicitly specify it in the list of "import libraries" (unlike a .lib file which the linker could infer from the list of dependencies). At least that is the case with MSVC++ 2015 (haven't tried it on 2017 yet)

What is the file name extension for visual basic?

Is it .vb like the latest version, I'm talking about version 6.0 (classic)? I'm trying to properly title a visual basic script for a module I need. If I have to redo a script because I cannot name a extension I am going to be mad.
There are several:
.cls (class file)
.frm (form)
.frx (form - binary information)
.ctl (custom control)
.ctx (custom control binary information)
.vbp (project)
.vbg (project group)
.bas (module)
Probably more...
The one you want is most likely .cls.
This answer as also good definitions:
https://stackoverflow.com/a/4385921/755977
From the documentation:
Project File Extensions
Visual Basic produces a number of files when you create and compile a project. These can be categorized as
follows: design-time, miscellaneous development, and run-time.
Design time files are the building blocks of your project: basic
modules (.bas) and form modules (.frm), for example.
Miscellaneous files are produced by various processes and functions of
the Visual Basic development environment: Package and Deployment
Wizard dependency files (.dep), for example.
Design-time and Miscellaneous Files
The following table lists all the design-time and miscellaneous other files that may be produced
when you develop an application:
TABLE 1 (Extension, Description)
.bas Basic module
.cls Class module
.ctl User Control file
.ctx User Control binary file
.dca Active Designer cache
.ddf Package and Deployment Wizard CAB information file
.dep Package and Deployment Wizard dependency file
.dob ActiveX document form file
.dox ActiveX document binary form file
.dsr Active Designer file
.dsx Active Designer binary file
.dws Deployment wizard script file
.frm Form file
.frx Binary form file
.log Log file for load errors
.oca Control TypeLib cache file
.pag Property page file
.pgx Binary property page file
.res Resource file
.tlb Remote Automation TypeLib file
.vbg Visual Basic group project file
.vbl Control licensing file
.vbp Visual Basic project file
.vbr Remote Automation registration file
.vbw Visual Basic project workspace file
.vbz Wizard launch file
.wct WebClass HTML template
Run-Time Files
When you compile your application, all the necessary design-time files are included in the run-time executable files.
Run-time files are listed in the following table:
TABLE 2 (Extension, Description)
.dll In-process ActiveX component
.exe Executable file or ActiveX component
.ocx ActiveX control
.vbd ActiveX document state file
.wct WebClass HTML template
In addition I have seen .vbi used as an "include" file. Basically a .bas module. I'm not sure how common this practice is.

What is app.aps file in Visual C++?

I just discovered a misterious file in my (new) Visual Studio 2012 C++/CLI project: app.aps.
I can find no reference on the internet about it. What is it meant for? Can I safely delete it? It seems so. Should I ignore or include in my commits to source version control?
It's a generated file for designer efficiency, you can ignore it in source control:
File created by Microsoft Visual C++, a software development application; stores the binary representation of a resource included with the project; enables the application to load resources more quickly.
http://fileinfo.com/extension/aps
APS files are the binary versions of resource files. As resource editor does not directly read the .rc and resource.h files, the resource compiler turns them into the APS file.
Reference - Files Affected by Resource Editing

application that relies on .dll builds correctly, then can't find that DLL at runtime

I have written an application in Visual Studio 2013 that relies on a DLL called WSTP32i1.dll. Both the dll and its associated .lib file are included in the project and it compiles and builds without error. However, when I run it, I get this:
Putting a copy of the DLL in the application folder doesn't help. When I check the Solution Explorer, the DLL appears to be marked "Does not participate in build," which seems wrong but I'm not sure what to change it to.
Any suggestions?
Solution Explorer tree contains source files (cpp, h, rc etc.) used to build executables. Item Type property defines how this file will be processed. DLL is not a valid source file and IDE does not know how to process it. That is why it "Does not participate".
The standard (and the easest) way to link import library is to add reference to DLL project in Common Properties / References page of application project. By default, all DLL and EXE files of your solution are built in the same $(SolutionDir)$(Configuration) directory, so everything is ready to use without any adjustments and post-build events.
If your DLL is built in another solution, make sure that it is placed in the same folder as EXE file, or DLL's folder is specified in PATH environment variable.

How can I manually add a resource to a Win32 resource file

Visual Studio Win32 projects have a resource file. One can add and configure controls using a GUI interface. However I have a need to enter about 80 check boxes which is very tedious using the GUI. I can open the resource file in a text editor, but if I try and add a new control, Visual Studio cannot understand it. I used to be able to do that in the old WATCOM C++ IDE/compiler.
Clearly VS is doing something else that just making the resource file.
Is there any way to create and add resources (lie controls) by manually editing the rc file?
Write the .rc file.
Use the resource compiler, rc.exe to compile the .rc file to a compiled resource, .res.
Pass the compiled resource to the linker.

Resources