Whenever I create some small tool in c++ dll for use with another language, a new user always has to download
the microsoft redistributable package and install it.

Is there anyway to add the resources needed from the redist, to my dll?

How even do you know what resources it needs to function?

Sorry if the questions are noob.

Usuall, the redistributable package only needs to be downloaded once per machine.

Are you creating managed or unmanaged DLLs?

unmanaged.

is there any way to know what actall files from the redist it needs, and is it ok and legal to just add them
through my own installer?

I have never read the EULA on the redist, so I don't know if it is legal to break it apart.
...but I personally would not assume my app would be the only app that will need it.
...meaning: I would have the whole package installed.

is there any way to know what actall files from the redist it needs, and is it ok and legal to just add them

I would oppose trying to distribute individual DLLs (you cannot know the exact conditions under which a particular file should/should not be installed etc...). IMO, letting Microsoft's redistributables to manage the setup would be the best way to go. Note that in the past, even MS has royally screwed up DLL updates (rendering machines unbootable).

Have you read Redistributing Visual C++ Files?

EDIT: Regarding dependencies in general, you'll probably find Dependency Walker useful.

I don't think you can redistribute their files but if your not using an installer, you could open the project menu -> Properties -> C/C++ -> Code Generation -> RunTime Library Set it to /MDd. Maybe this will work for the installer as well depending on how your making it.

That will include all the files needed into your program. Also have you considered adding all the files needed as resources and extracting them when needed?

Sorry for late reply.
Thank you very much for your help and suggestions, I appreciate your time.

Suze.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.