|
What is the value of filePath at the time of writing? Hint: it's not what you think it is.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Dear David:
I know the filePath equal to C:\Windows\system32.
The value of registry which I write is different between log in windows and run windows stable.
How can I write the same value in log in windows?
|
|
|
|
|
cedricvictor wrote: I know the filePath equal to C:\Windows\system32. So then why continue to use it?
cedricvictor wrote: The value of registry which I write is different between log in windows and run windows stable. Which has nothing to do with anything.
cedricvictor wrote: How can I write the same value in log in windows? Why not just use:
TCHAR filePath[MAX_PATH] = _T("C:\\abc\\123\\Default.wav");
WriteReg(hKey, _T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"), _T("Sound"), filePath);
All that said, I suspect you are wanting to use ::GetModuleFileName(NULL, ...) instead.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
It is right, Firstly, you should use ::GetModuleFileName(NULL, ...) to get the path of your application image,
and then, get what you want by this path.
If you set the path as const value, it's not convenient!
|
|
|
|
|
I'm not sure why you replied to me with this (as opposed to cedricvictor), but thanks for the affirmation.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Sorry, I just agree with your opinions, so I can't help myself to reply you.
|
|
|
|
|
Hi, is CMap object can be copied to another CMap oject?
I can't find a member function in CMap class.
And if I want to implement deep copy, do I need to loop it , copy every element to another manually?
|
|
|
|
|
Why not try it and see what the result is?
|
|
|
|
|
As far as I know, CMap has not such a facility. On the other hand, the std::map[^]...
Veni, vidi, vici.
|
|
|
|
|
Hi guys
I have OS of the WB150F camera. you can download it here:
https://www.mediafire.com/?jmshouy4c937yw3
I have several question about it:
1- What do these files do?
MakeAv, MakeAvf, sde6 and all files in the "Tools" folder
2- What is the usage of the "brcz.h" file (in this address: \ip\include)?
3- What is the diffrence between the files of "av" folder and "avf" folder in os folder?
|
|
|
|
|
Does this have something to do with C++?
|
|
|
|
|
|
That sums it up pretty much - The line method executed before is
void Writer::DoWrite(QString auditEntry){
QByteArray ba = auditEntry.toLatin1();
char* aestr = ba.data();
std::string aestdstr(aestr);
log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger("RMAT");
LOG4CXX_INFO(logger, aestdstr);}
I did the search work - Yes, aestdstr is terminated with '\0'. I'm running out of ideas here. The detailed error message is called
Quote: A buffer overrun has occurred in app.exe which has corrupted the program's internal state. Press Break to debug the program or Continue to terminate the program.
For more details please see Help topic 'How to debug Buffer Overrun Issues'.
Fun fact is that no one has ever seen the help topic 'How to debug Buffer Overrun Issues' (here[^]).
Any thoughts on the issue?
|
|
|
|
|
Looking at the documentation for LOG4CXX_INFO [^], I wonder if you should use the char* as the second parameter, like:
char* aestr = ba.data();
log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger("RMAT");
LOG4CXX_INFO(logger, aestr);
}
|
|
|
|
|
Thank you kindly for the suggestion, but oddly a missing [static] library on which log4cxx was dependent went missing.
Don't ask me why the Linker didn't complain but the debugger decided to throw a buffer overrun
A ghost from the past. Known to others as "Linda".
|
|
|
|
|
This is probably where the buffer overrun was detected, not where it actually occurred. In general it is not possible (or prohibitively expensive) to detect the actual corruption. Try using the Page Heap[^], although this often falls in the prohibitively expensive category. Remember to disable it when you're done!
WARNING: DO NOT ENABLE THE PAGE HEAP FOR ALL PROCESSES, JUST THE ONE YOU'RE DEBUGGING. YOU HAVE BEEN WARNED!
Steve
|
|
|
|
|
Hi,
Is it possible to create a view (In MFC MDI app)without document as follows?
CMultiDocTemplate* pDocTemplate = new CMultiDocTemplate(IDR_CheckTYPE,
NULL,
RUNTIME_CLASS(CChildFrame),
RUNTIME_CLASS(CCheckView));
I mean, passing NULL for the document runtimeclass and use pDocTemplate->CreateNewFrame().
Thanks,
Prasanth
|
|
|
|
|
Why you do not want to use the CDocument?
I'd rather be phishing!
|
|
|
|
|
What happens when you try it?
|
|
|
|
|
Yes, I do it all the time.
- basically, the "View" will not be attached to the derived object class of (CDocument).
- the attached derived (CDocument) object is intended to update the View when the derived object changes.
|
|
|
|
|
|
Hi All,
Can anyone guide me to find the MS project kind of UI application developed in MFC or C#?
It will be kind enough if you can provide me the some useful Links as well
Thanks & Regards,
SAM
|
|
|
|
|
|
I'm doing a project about the Outlook plug-in synchronous address book.
Double-click on the list of email users to add to the recipient email box.
The second double-click on the same email address will lead to repeat.
Now want to read the recipient before double click on the box.But you can't read
C++ Code:
EnumChildWindows(hwndWriteMail, EnumChildProc, (LPARAM)EmailAddr.GetBuffer());
BOOL CALLBACK EnumChildProc(HWND hWnd, LPARAM lParam)
{
int id = -1;
id = ::GetDlgCtrlID(hWnd);
if (id == 0x00001003){
::SendMessage(hWnd, EM_REPLACESEL, NULL, (LPARAM)lParam);
}
return TRUE;
}
Use Windows SPy++ view within the recipient can get RichEdit editbox for the RichEdit normal character but outlook email address will be automatically after formatting is not available
How do I get RichEdit edit box content? thanks
None
|
|
|
|
|
Hi, in my program,I use a CStatic object to flash a string every 3-4 seconds.
But I found, sometimes the string is blinking.
How can I flash the string and don't have jitter phenomenon?
modified 15-Apr-14 10:54am.
|
|
|
|