|
Karl,
UpdateWindow has solved my problem......
Thanks
How do I close this thread?
|
|
|
|
|
Glad I could be of assistance.
I don't know how you mark a thread as completed or resolved. Perhaps someone else knows.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
C++NewBe wrote: How do I close this thread?
Don't bother about, anyway you can modify the OP title (maybe adding [PROBLEM SOLVED] to the title).
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
|
|
|
|
|
You cna use of CListCtrl instead CListBox that is better.
|
|
|
|
|
Exactly how does that solve the problem?
"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
|
|
|
|
|
I think listctl is bette than listbox and I think its better to try with listctrl so I said ctrl is better and its not direct his answer.
|
|
|
|
|
Hi All,
I have a question that has been bothering me for a while, I am trying to write an app that automatically enables ICS on a connection automatically. I have tried VBScript demos and I have written a C++ code for the COM interface. The problem is I can see the connection is shared in the Network Connection area but the other connections can not access it.
Weirder yet, if I manually disable the connection sharing on the connection I shared via right click -> properties then run my code again it does share the connection properly this time and my other interface can share with it. Any idea what I am missing here? It seems like the control panel applet does something else I am not doing. I also notice it sets the IP to 192.168.0.1 and gateway 255.255.255.0. I tried this manually but it didn't help my situation.
It also said in one of the VBScript http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3148763&SiteID=1[^] I downloaded from Microsoft that 0 of my connections were private when it ran but when I did the enabling through the control panel it showed my main one I am sharing as public and the other as private. Could this be the problem? I can't find any documentation how to set this on the interface.
Thanks.
|
|
|
|
|
I came across an issue last night with CreateProcess.
I have a the following command line "foo > out.txt".
I I run this at the command prompt, foo dumps it's output to out.txt, all is OK.
If I try and pass this through to CreateProcess the output is NOT dumped to the file.
If I instead modify the command line to something like
"c:\windows\system32\cmd.exe /C foo > out.txt" and pass that to CreateProcess then I get the expected behavior. So why do I have to do this? Is there another way? I am using default parameters for most of the arguments.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
VCF Blog
|
|
|
|
|
AFAIK I/O redirection is performed by the command interpreter. CreateProcess cannot do that.
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
|
|
|
|
|
I believe that you are correct, hence the STARTUPINFO structure that takes handles for standard input, output, and error.
Peace!
-=- James Please rate this message - let me know if I helped or not!<hr></hr> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
If I were to open a new file and then fill in the STARTUPINFO.hStdOutput field with the file handle, would it dump the stuff to the file?
That's sort of what I would expect.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
VCF Blog
|
|
|
|
|
I remember it being a little tricker than that. You have to duplicate the handles or some other such thing.
Or maybe that was only for redirecting the output to an edit control or something?
There is a MS KB article on redirecting a process' standard in/out/err. Hey! Got one right here in CP: http://www.codeproject.com/KB/cs/ProcessStartDemo.aspx[^].
OK - I am a jackass... that was a C# article, and I believe you wanted straight Win32 API... I found the original KB article I was thinking of: http://support.microsoft.com/kb/190351[^], and there is an article here (for real this time ), that might help as well: http://www.codeproject.com/KB/threads/consolepipe.aspx[^].
Peace!
-=- James Please rate this message - let me know if I helped or not!<hr></hr> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
modified on Thursday, April 10, 2008 8:30 PM
|
|
|
|
|
Jim Crafton wrote: If I try and pass this through to CreateProcess the output is NOT dumped to the file.
Is the output sent to the screen 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
|
|
|
|
|
Yeah it is. So from what the others are saying, the CreateProcess call ends up ignoring the "> file" part of the command line? I guess now that I think some more about it, it sort of makes sense. Kind of a drag though
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
VCF Blog
|
|
|
|
|
Jim Crafton wrote: ...the CreateProcess call ends up ignoring the "> file" part of the command line?
It's not ignoring it per se. It's just not sending it on to the command interpretor.
"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,
i admire your code very much it i such a nice code .
i m use it for PropertyPages so i m using following version for this.
<a href="http://www.codeproject.com/KB/dialog/ResizableLib/ResizableProperties_demo_1_4a.zip">http://www.codeproject.com/KB/dialog/ResizableLib/ResizableProperties_demo_1_4a.zip</a>[<a href="http://www.codeproject.com/KB/dialog/ResizableLib/ResizableProperties_demo_1_4a.zip" target="_blank" title="New Window">^</a>]
but there is number of errors of unresolved external symbol .
please tell me how can i solved out this.
Thanks in advance
|
|
|
|
|
You've already asked the question in the right place, i.e. the article's thread.
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
|
|
|
|
|
how to load two instances of dll when linked statically .
Trioum
|
|
|
|
|
Your question doesn't make any sense...
trioum wrote: how to load two instances of dll
Why would you want to load twice the same dll ? That's totally useless.
trioum wrote: when linked statically .
If you statically link, then you use a static library, not a dll (which is dynamic linking).
|
|
|
|
|
actually my programme using many threads and each thread doing
some procesing with the .dll
each thread use dll setdata() getdata() function
setdata() also do some processing .
but results are not true according to the setdata() when called
getdata() function in every thread.
Trioum
|
|
|
|
|
Is your dll thread safe ? (e.g. do you use critical sections or other synchronization mechanism to protect the access to your variables)
|
|
|
|
|
trioum wrote: but results are not true according to the setdata() when called
getdata() function in every thread.
What could that possibly mean?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
I suppose (again!) that getdata() doesn't return values previously set by setdata() , i.e. thread synchronization issues, as already pointed out by Cedric Moonen.
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
|
|
|
|
|
Your CPMRU is on full boost.
You addict.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Shhhhhhhhhhh. The famous addict used his illegal substances for charging.
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
|
|
|
|