|
Even though there is the topic in MSDN for Side-by-Side and manifest stuffs, I still don't get the correct steps to redistribute a command-line program to another computer.
I use some functions and types of the standard C++ library and some win32 APIs in the program without MFC/ATL. I don't find any project option for statically link to CRT libraries.
The program is to be called by other program, so I don't want to have users run "VCRedist_x86.exe ". I hope to keep it simple!
What would be the simplest way to redistribute this program?
Thanks!
Maxwell Chen
|
|
|
|
|
Maxwell Chen wrote: I don't find any project option for statically link to CRT libraries.
Project properties - C/C++ - Code Generation - Runtime Library = something without DLL.
Maxwell Chen wrote: The program is to be called by other program, so I don't want to have users run "VCRedist_x86.exe".
But users only have to run this once. This would probably been done at installation time.
Or you have to force the users on computers without these files to download and install it once.
Maxwell Chen wrote: What would be the simplest way to redistribute this program?
A Setup.Exe made with the VC-internal setup-functionality or free installers like NSIS[^] or Inno Setup[^].
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
jhwurmbach wrote: Project properties - C/C++ - Code Generation - Runtime Library = something without DLL.
Thank you very much for your great help.
I changed from /MD to /MT, and it works!
jhwurmbach wrote: A Setup.Exe made with the VC-internal setup-functionality or free installers like NSIS[^] or Inno Setup[^].
This program is to be called by an uninstaller to manipulate the registry. So it wouldn't fit for making a setup for this program though.
Maxwell Chen
|
|
|
|
|
Maxwell Chen wrote: This program is to be called by an uninstaller to manipulate the registry. So it wouldn't fit for making a setup for this program though.
But you could add it to the requirements at install time - then it would be there (and not be uninstalled, AFAIK) at uninstall time.
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
Hi,
I want to write a C++ program to print a file in user space. But i don't know how to access the printer.
Please help me.
With thanks in advance,
barun
barun
|
|
|
|
|
If you just want to print the file in text format, what about using "stdprn"?
- NS -
|
|
|
|
|
USE system("print filename");
|
|
|
|
|
Hi
Using system is one of the way to handle this, but this method is not generic for other types of devices like scanner or USB stick etc.
We know that any device should be opened then read/write and finally to be closed. Can we write a C++ code to open any device and read/ write into it (e.g. printer) ?
With thanks in advance.
barun
barun
|
|
|
|
|
Hello
My code copies an exe onto a USB flash drive using normal File copy functions, however it is quite possible that the USB flash drive might get disconnected during file copy and may not be copied properly (hence gets corrupted) So, when the user plugs in the USB flash drive next time he / she wont be able to use it. Is it possible programatically to identify a corrupted exe once the exe has been copied onto the USB flash drive ?
Thanx
|
|
|
|
|
Checksumming (e.g. MD5). Tools like MD5sum are readyly available in the internet.
But the corrupted exe will very properly not start, so it can't check itself.
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
Although there is no Direct way to do this, letme specify some alternatives.
1. calculate the Check sum of the File before you save and validate it after your file copy operation is complete. (Less Error prone but effective)
2.Verify the Size of the file copied.
haribabu
|
|
|
|
|
Can anybody tell me why I'm unable to step inside ntdll with the MS debugger?
I am trying to hook NtCreateSection and replace the section with my own, but I'm getting access violation return codes. So I try stepping into the mthod in order to see what is going on, but I immediatly land on a JUMP instruction and get thrown back out. The code then fails with an "unable to read this address" pop-up. Stepping over the call causes no problems.
Anyway, I have a section created from a file with the PAGE_READONLY flag set, I tried changing this to PAGE_WRITECOPY which succeeds but I'm still unable to map the section. ( No access rights ). But the section is created with ALL_ACCESS_RIGHTS.
Any ideas?
|
|
|
|
|
You can, but there won't be much to see as most of it just contains code to transition to kernel mode (where a user mode debugger can't follow).
Steve
|
|
|
|
|
Yeah, I figured that out after decompiling the dll. I never found the solution to the problem though, I have a feeling the DACL was being set high while the section was being passed between user/kernel modes, preventing me access to it.
|
|
|
|
|
|
After 4 painful days ... got it!
(to many #include in the project ... )
tnx anyway
Russell
|
|
|
|
|
After 4 painful days?? It's only been 30 mins
|
|
|
|
|
|
You should have asked in the first 30 minutes
Even though nobody answered, you would have solved it
and you could have taken 4 days off!
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
_Russell_ wrote: Why are you telling this to me only now?
To rub it in (salt in the wound), of course
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Please any one can tell me what is lfOrientation in LOGFONT structure. i can't find any visible difference by changing any values of it. output is mostly same. my code is as bellow,
for (int i=0; i<3600; i+=150) {
LOGFONT lf;
::ZeroMemory (&lf, sizeof (lf));
lf.lfHeight = 2400;
lf.lfWeight = FW_DEMIBOLD;
lf.lfEscapement = i;
lf.lfOrientation = 600; // No change of any value
::lstrcpy (lf.lfFaceName, _T ("Times New Roman"));
CFont font;
font.CreatePointFontIndirect (&lf);
CFont* pOldFont = dc.SelectObject (&font);
dc.TextOut (0, 0, CString (_T (" This is my Output")));
dc.SelectObject (pOldFont);
}
|
|
|
|
|
as far as i know, orientation refers to angle wrt. x axis.
not sure weather degrees or radians.
try it out by gradually incrementing the the values from 0 to 360 in a loop.
|
|
|
|
|
i tried it but it won't work and Angle is given by lfEscapement member of LOGFONT structure.
|
|
|
|
|
both refer to angle only but with some difference.
you can refer the following url
for more information.
http://msdn2.microsoft.com/en-us/library/2ek64h34(VS.80).aspx
|
|
|
|