|
But can the OS/shell differentiate between the two? For example, how would you execute that program from a command prompt?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
app.exe /one /two vs.
app.exe /one /two ""
You can easily try it out. In the first case, argc is 2, in the second one it's 3.
It's very similar to what you have to do when one of the parameters contains white spaces, i.e. enclose the parameter in double quotes so that the shell can tell where one parameter ends and the next one begins.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
So have you tried this with CreateProcess() instead?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
No, I haven't tried anything that involves changing the DLL yet. It's rather complicated - I cannot just modify the DLL and redeploy.
But perhaps we found something: The administrator at the customer's site found some malware during an AV scan and will now reset the machine to their standard image.
So chances are some badly written malware was not passing along all the parameters in this case.
I've just got to keep my fingers crossed that it'll work again afterwards.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Hello dear friends,
I've an application which upload/download files from the server using the
webservices.I use the webservices for uploading and downloading the files.
The application works fine for the Office2003 file formats but for
Office2007 there is a problem.The application store the bytes comes from
the webservice in temp file in binary mode and uses shellexecute to open
the temp file.
For Office2007 file format when I download
the file from the server using webservice and storing the bytes in a file
in binary mode and when I use shellexecute to open the file, Office2007
word shows the messagebox that the file is currupted.
Can anybody tell me what goes wrong?
Thanks in advance to all of you.
ritz1234
|
|
|
|
|
hello everyone:
now i want to check out all the recognized file types in my computer. someone in CP said we could check the registry in HKEY_CLASSES_ROOT,however, i find there r many filetypes strange there (eg. .api, .cc, .htt and so on). i just want to read the filetypes we usually used such as .doc for microsoft word, .txt for notepad etc.
so what could i do now? anything is appreciated,thanks in advance!
|
|
|
|
|
steven_wong wrote: i just want to read the filetypes we usually used such as .doc for microsoft word, .txt for notepad etc.
Windows does not recognize one file association being any more 'used' than the next.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
Hi all,
One of my application I used MFC(actually CFile) to find the file size in easy way.
Now I thought to do it using standard C++. Here is my try.
size_t file_size;
ifstream in_file;
in_file.open("C:\\temo_file.txt", ios_base::in);
if(in_file.is_open())
{
file_size = in_file.seekg(-1, ios_base::end).tellg();
cout << file_size;
}
My question is, this code gives misses one byte. Can you guys give me any reason for it.
Thanks
I appreciate your help all the time...
CodingLover
|
|
|
|
|
|
Thanks for links.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
CodingLover wrote: file_size = in_file.seekg(-1, ios_base::end).tellg();
should be
file_size = in_file.seekg(0, ios_base::end).tellg();
BTW you may also use GetFileSize [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Thanks, so my attempt is not bad.
Is that GetFileName is standard C++. I'm confusing with those.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
CodingLover wrote: Is that GetFileName is standard C++. I'm confusing with those.
Nope. It is provided by Win32 API . If you just need to avoid MFC that's is fine, on the other hand, if you need to be stuck with C++ standard, then use ifstream .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Since I start to learn C++, confusing with this. Is that best way to work with standard C++? Sometimes I feel that use of MFC easy than standard C++, and other way too. Appreciate your explanation on it.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Using C++ standard you write code that will execute also on different platforms (for instance Linux ). On the other hand, if you need to exploit Windows not-portable functionalities (like the GUI components1) the you have to use Win32 API or MFC . GUI development with MFC is usually simpler.
(1) There are exceptions: for instance QT [^] is a framework that enable you to write portable GUI code.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Ok, as I said now I have mixture of them. If I want to learn standard C++ from where I should begin.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
What about "The C++ Programming Language" [^] book of Stroustrup?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Thanks a lot.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Hi all,
Is there any option to change the number of rows and cols dynamically in a flexgrid??
Thanks,
Regards,
Sunil Kumar
|
|
|
|
|
I don't know in flexgrid, but in Listctrl I made it by deleting all and redrawing the control with the new number of elements.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Changes Rows and Cols property.
|
|
|
|
|
u can use the functions SetRows and SetCols to set the rows and cols dynamically...
|
|
|
|
|
I am learning to use pageheap.
I created a MFC App(pageheaptestdlg.exe) with memory corruptiong bug and compiled it in release mode.
I enabled pageheap by gflags /p /enable pageheaptestdlg /full
Then run debugger ntsd -g -x pageheaptestdlg.
It has something like:
===========================================================
VERIFIER STOP 00000008: pid 0xDF8: corrupted suffix pattern
015B1000 : Heap handle
01682FF8 : Heap block
00000005 : Block size
00000000 :
===========================================================
However it is not the same for console app.
I created a Win32 Console Application with memory corruption bug and compiled it in release mode.
I enabled pageheap by gflags /p /enable pageheaptest /full
Then run debugger ntsd -g -x pageheaptest.
There is no message regarding the corrupted suffix pattern. Why?
Source code:
#include "stdafx.h"
int main(int argc, char* argv[])
{
int len = 5;
char *a = new char[len];
a[len] = 6;
delete [] a;
return 0;
}
|
|
|
|
|
Hello and good day. I have an application which writes writes an image in a picture box and does processing in it about every 200ms. Now, I need to show the image being written into another application's picture box. I'm currently looking for ways to do this and currently I'm thinking of using clipboard. I want to know if there are better ways of doing this. Looking for any suggestions/solutions regarding this.
Thank you in advance.
|
|
|
|