|
1. Your assumption that I didn't searched the net before comming here is wrong. In fact I came here after exausting all other options (Google, Bing, Microsoft, MSDN, etc).
2. Your assumption that I'm asking for a complete application is also wrong. I asked for ANY kind of usefull information. I stated that in my first message. I did it using simple and clear sentences, easy to understand.
3. Although you posted so far two messages there is not any useful information in them, just sarcasm, wrong asumptions and patronizing. Is that the help the owner of the site wants to be provided ? Providing me a link to Google is pure sarcasm. Or maybe you assumed that I never heard about Google and the link will help me ?
4. To me it appears that you didn't read the link you give me about the rules of the forum. You were sarcastic about my question stated in the most civilized way. If you start using sarcasm, don't wonder if I return your "amability".
5. With such a "help" I don't find this forum very appealing. I request the intervention of a moderator.
6. To the other users of the forum: please reply only if you can provide some useful information.
|
|
|
|
|
CString(0xcccccccc) wrote: 1. Your assumption that I didn't searched the net before comming here is wrong.
You did not mention that you had tried it in your first message.
CString(0xcccccccc) wrote: 2. Your assumption that I'm asking for a complete application is also wrong.
This is what you asked for: Code in any language is welcome. If not code, then it would be great to get some information related to the subject (links, registry entries, files, shell functions, etc)., and that's what I offered you - links.
CString(0xcccccccc) wrote: 3. Although you posted so far two messages there is not any useful information in them, just sarcasm, wrong asumptions and patronizing.
That merely reflects your attitude, not mine. I gave you some links, posted in good faith in the hope that you would find something useful in them.
CString(0xcccccccc) wrote: 4. You were sarcastic about my question stated in the most civilized way.
On the contrary, I provided you with some useful information, there was no sarcasm in my response.
|
|
|
|
|
CString(0xcccccccc) wrote: 3. Although you posted so far two messages there is not any useful information in them, just sarcasm, wrong asumptions and patronizing. Is that the help the owner of the site wants to be provided ? Providing me a link to Google is pure sarcasm.
I realize you've only been here a wee bit, but if you decide to stay, you will quickly find a plethora of sarcastic posters. Richard, however, is not one of them. His responses are indeed genuine and usually spot on.
"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
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
|
|
|
|
|
Thanks for your words of support.
|
|
|
|
|
CString(0xcccccccc) wrote: Ok, I repeat, maybe it helps: "I'm interrested in writing my own application".
And you also said, "If not code, then it would be great to get some information related to the subject (links, registry entries, files, shell functions, etc)" which is what Richard addressed.
"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
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
|
|
|
|
|
It's just a shame that Google is more accessible than useful reading and comprehension skills.
|
|
|
|
|
LogonStudio is a free program that allows users to change their Windows 7, Vista and XP logon screens. It comes with several logon screens to choose from, along with thousands that are available online from Web sites such as WinCustomize.com.
Hope this helps.
John Nawrocki
Chief Technical Advisor
Custom Molded Products
|
|
|
|
|
|
Hi.
I need to create a new partition from free space of another partition or free space of a drive programmatically. how is it possible?
Thanks a'lot.
|
|
|
|
|
That entirely depends on the platform you are using. Windows? Linux? Mac? Other (or none)? And then, what file system? FAT32, NTFS, ext3?
Depending on all that, it might be difficult or very hard :P
|
|
|
|
|
I have an application (mine) that uses WriteFile() to write directly to the console, but I also have to share that console with another application that (as far as I know writes to stdout). Does anybody know of a way that I can force synchronisation of the output - so that there is no output overlap/corruption. My application uses a console lock to prevent this happening - but I have no control over a third-party app.
Regards.
James .
|
|
|
|
|
Can't you redirect the other app's output so it goes trough your app and then you could synchronize it as you like?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
Thanks for the reply.
I have no control over the app. I don't launch it - so I cannot use re-direction.
|
|
|
|
|
Is your app launched by the the other one then? Or how do you gain access to the other app's console?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
OK .. my App launches an instance of an ooRexx interpreter. My App runs servicing ooRexx commands - specifically the PIPE command - which my App is. My App - can do loads of 'stuff' writing to the console - but so can ooRexx (I have no control over this). ooRexx has commands that write 'stuff' to the console - however - in order to prevent output overlap - I need to come up with a mechanism that flags when STDOUT/ERR is being written to - so that my App can synchronise output.
I think that I am going to have to open a 'change request' on ooRexx - if they will have it.
|
|
|
|
|
TenFiftyTwo wrote: my App launches an instance of an ooRexx interpreter
Now i am confused, earlier you said that your app does not launch the other process. If you do launch it then you could use CreateProcess[^] along with CreateNamedPipe[^] to redirect its output to a named pipe, read this named pipe in your own app and write what you get to your own output (basicly the console) after some synching.
Sorry if i am missing the point.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
OK.
My application launches an instance of an ooRexx Interpreter - through a function call (not a seperate thread) as you might do to launch another process. Now, the user might have launched my application with re-directed output handles - so I cannot be sure where the output from ooRexx or my application is going to end up being written to. So, all I was looking for was a way to ensure that there would not be any output overlap between ooRexx and my application - I was just looking for a way to synchronise output.
|
|
|
|
|
TenFiftyTwo wrote: I was just looking for a way to synchronise output.
That i understood.
TenFiftyTwo wrote: through a function call
This clears up the confusion, thank you.
For now i have no idea how you could achieve syncronization, sorry. Maybe others here know better. I will think about it, if i think of anything, i'll share.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
Thank you for considering the issue.
Regards.
James
|
|
|
|
|
I have another idea that might or might not work. Since after running your ooRexx thing, it will write its output on the same console as your app, i guess it inherits its standard outputs from your process, so i was wondering, what would happen if you were to change your own process' standard output prior to calling the function that runs the ooRexx thingie and then changing it back to its original afterwards, this way the external process might inherit the changed output. So basicly:
-create named pipes (for stdout and/or stderr)
-set them as standard output/standard error for your own process (google for how to do this, maybe freopen with stdout/stderr can do this, not sure)
-call the method to run the ooRexx thing
-change your app's output back
-have a thread running that reads from the named pipes and does nothing more than writing what it got to your own process' original output with syncronization added.
How does this sound?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
Hi.
Thanks for the update. Yes that would work and to be honest I had considered a similar setup - but I wanted to avoid over-complicating the solution. I actually have a slew of named-pipes in the app already - so coding that is not an issue.
How I wish the I/O functions had been designed to implement a simple mutex or event to indicate that an output stream had been acquired.
I am going to have to go ahead and employ the mechanism as you describe.
I would like to thank you very much for the time you have given to this issue.
My best regards.
James.
|
|
|
|
|
Yourwelcome, such problems are fun to fiddle with, at least for me. I'd apriciate it if you could drop a line here telling me/us if it worked or not. Just curiosity, thanks in advance.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
modified on Sunday, August 21, 2011 4:31 PM
|
|
|
|
|
In order to start a program automaticaly, by some while I use the follow code :
void CMainFrame::OnOptionsStartwithwindows()
{
m_bAutoStart = ! m_bAutoStart;
long lRet = 0;
CString sPath;
CRegKey regKey;
::GetModuleFileName(NULL,sPath.GetBuffer(_MAX_PATH),_MAX_PATH);
sPath.ReleaseBuffer();
if(! regKey.Create(HKEY_LOCAL_MACHINE,_T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run")) == ERROR_SUCCESS)return;
if(m_bAutoStart)lRet = regKey.SetValue(sPath,theApp.m_pszAppName);
else lRet = regKey.DeleteValue(theApp.m_pszAppName);
regKey.Close();
if(lRet != ERROR_SUCCESS)m_bAutoStart = ! m_bAutoStart;
}
and works fine ... until Windows 7 ... why ? Whould be a rights problem ? If yes, how can I have programatically administrator rights when I write in registry ?
Thank you.
|
|
|
|
|
HKEY_LOCAL_MACHINE access requires elevated privileges under Windows 7. You can set this in your project manifest, or Linker->Manifest options in your project Properties.
|
|
|
|
|
I like to set this into manifest file ... but I don't know how to do it ... an you give a small ideea ? Or link, anything ?
|
|
|
|