|
thanx buddy
I was doing a blunder. In fact I was passing an uninitiallized pointer to the stream read function which was resulting in a bug.
Problem has been solved now. Thanx a lot
Regards
|
|
|
|
|
Hi, I'm using GetNamedSecurityInfo in a program I wrote to remove some registry keys from the Windows XP registry.
It seems to work on all the keys except for one. For some reason on one key it returns "The parameter is incorrect" as its error, yet I attempt to find this same key a moment later using the same path in a different function and it says that the key is valid.
Does anyone know what this "parameter is incorrect" might mean, besides it just having an invalid path name? All I'm passing it is a path, a pointer to an ACL to fill, and a pointer to a security descriptor.
Here's the code:
void RemoveAccessDenied(LPTSTR FullKey)<br />
{<br />
PSECURITY_DESCRIPTOR pSD = NULL;<br />
PACL pACL = NULL;<br />
<br />
GetNamedSecurityInfo(FullKey, SE_REGISTRY_KEY, DACL_SECURITY_INFORMATION, NULL, NULL, &pACL, NULL, &pSD);<br />
<br />
}
Thanks!
KR
|
|
|
|
|
Found it; spybot was denying the registry change based on my blacklist.
KR
|
|
|
|
|
BAD Spybot BAD! *swat*
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi,
I used to code in C++ but stopped for about a year, anyway I am back but have ran into a problem on my first project:
Any solution I now create doesn't work, when I try and build it it builds fine, but when I try and run it, I get the error that:
"Unable to start program "C:\\...projects\test\debug\test.exe". The system could not find the file specified"
I realise this means that it hasn't created the debug information, but it hasn't created the release information either.
Also I can Build Solution, and it says it is fine, but the Compile option is greyed-out and I don't know what to do.
Is there an option in MVC++EE when you can turn off compiling it until you do something?
Any suggestions?
Thanks,
Any reply is appreciated.
-- modified at 8:47 Monday 11th June, 2007
|
|
|
|
|
Blekk wrote: I realise this means that it hasn't created the debug information
No, it means it can't create the program - your compile is failing due to some other error.
Blekk wrote: Is there an option in MVC++EE when you can turn off compiling it until you do something?
No, there shouldn't be. If it doesn't show the option, it probably doesn't think the option is valid, for some reason.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Ok thanks but I even just tried compiling this in a new solution and it didn't work:
#include <iostream>
using namespace std;
int main()
{
cout<<"This should work...";
return 0;
}
Any ideas?
|
|
|
|
|
I have a application in which I have to read a text file with more than 1 hundred thousand lines. I am having trouble with reading file and replacing the text in file. I want to read file's content and display it in Rich text edit quickly, and when I replace some text by other texts, the process must do quickly. I have tried using Notepad to read and replace some text, but it takes about 10 to 15 minutes to finish the works
duc an
|
|
|
|
|
|
hi all
please .. Can i print the output of program to the printer directly
please tell me
thank's all
<br />
#include <iostream.h><br />
<br />
main ()<br />
{<br />
cout <<"Hi all .. That's Me";<br />
<br />
return 0;<br />
}<br />
<br />
-*-*-*-*-*-*-*-*-*
To Be Or Not To Be
(KARFER)
-*-*-*-*-*-*-*-*-*
|
|
|
|
|
*if* your printer is connected to LPT1 you might be able to do the following:
<br />
ofstream printer;<br />
printer.open("LPT1");<br />
printer << "Hello World!" << '\n';<br />
And when your done streaming text to the printer you can try sending a control character of 0xC which was the old ASCII Form Feed[^] or (FF) character.
Best Wishes,
Randor (David Delaune)
|
|
|
|
|
Hello Friends,
I am been using CSocket in my application. But i want to know is CSocket a blocing socket or non-blocking socket, and what are the differences between them ?
Girish
Software Developer
|
|
|
|
|
Girish601 wrote: But i want to know is CSocket a blocing socket or non-blocking socket, and what are the differences between them ?
Hmmm MSDN->CSocket[^]
CSocket Class MSDN wrote: A CSocket object also provides blocking, which is essential to the synchronous operation of CArchive. Blocking functions, such as Receive, Send, ReceiveFrom, SendTo, and Accept (all inherited from CAsyncSocket), do not return a WSAEWOULDBLOCK error in CSocket. Instead, these functions wait until the operation completes. Additionally, the original call will terminate with the error WSAEINTR if CancelBlockingCall is called while one of these functions is blocking.
|
|
|
|
|
See Windows Sockets: Blocking[^]
CSocket is a high-level wrapper for a socket (SOCKET). To you, it's always blocking. Whether
the underlying SOCKET is in blocking mode or not is handled by the CSocket implementation.
For a non-blocking socket you can use the CAsyncSocket class or use Winsock APIs directly.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hey there. Can anybody tell me why, when you create a dialog app in VS2005 if you right-mouse click on the dialog in the resource editor then "Add Event Handler" menu option is greyed out? I want to be able to add OnInitDialog and OnPaint handlers to this dialog but cant!
If i drop a button control on the dialog through, and right click on that, then that works!!
thanks in advance.
|
|
|
|
|
To add non-control message handlers, you have to go to the source file, and place the cursor on the closing message map macro, and then go to the properties pane. At that point you hould be able to add the handler for that message.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: To add non-control message handlers, you have to go to the source file, and place the cursor on the closing message map macro, and then go to the properties pane. At that point you hould be able to add the handler for that message.
[sarcasm] Clearly that's so much easier than VS6[/sarcasm]
Thanks for the tip, not that I will remember it, just seams easier to write it out.
|
|
|
|
|
Yeah... This goes a long way to reinforce Microsoft's claim that they are eager to support their C++ developers. The 2005 IDE sucks if you're a MFC programmer. I seriously doubt that ORCAS would add any usability for us...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hey John! No way, i would have never have found that out.. Thanks a million..
It all becomes clear (as mud!)
|
|
|
|
|
:omfg:
--
Now with chucklelin
|
|
|
|
|
John Simmons / outlaw programmer wrote: you have to go to the source file, and place the cursor on the closing message map macro, and then go to the properties pane.
You can also just click anywhere within the class definition in the .h file, and then go to the properties pane.
|
|
|
|
|
That doesn't always work. In fact, neither does my original response.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
hi i have read a file and then based on the result i have to add items in list control. the contents in the file can be changed. hence i have to read the file everytime. i dont know how to add the items in list control
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
Adding items to a List Control is simple, see for instance [^].
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.
|
|
|
|
|
Hi,
I'm facing a problem which i don't know how to solve...
I created a dialog which contains several edit boxes.
When activating the dialog , the first edit box automatically receives the input focus.
My problem is that I need to receive the ON_WM_KEYDOWN in the parent dialog,
but since the focus is on the first edit box - I will never get it.
I tried to catch the ON_WM_KEYDOWN message in PreTranslateMsg , but
I'm facing the same problem.
Anyone???
With best regards,
Eli
|
|
|
|