|
Hi....
I have a problem while accessing the registry of another system connected in same network.
I work on a windows XP professional machine.I have to access a key in the registry of the other machine.When i use the function 'RegConnectRegistryA ', it gives an error 'The system could not find the environment option that you entered'.I'm not able to understand what the problem is.
Please do help me out.
Thnx in advance.
|
|
|
|
|
I can think of a few reasons why this wouldn't work.
There are no "try with this user/password" combination, so it will be using the current user. Do you have sufficient rights on the other machine?
You can use LogonUser/ImpersonateLoggedOnUser to change the user you're using - but it's not for the faint hearted.
Also from the documentation:
Windows XP Pro: If the computer is joined to a workgroup and the "Force network logons using local accounts to authenticate as Guest" policy is enabled, the function fails. Note that this policy is enabled by default for a computer running Windows XP Professional that is joined to a workgroup.
Lastly, is the machine name valid? You may also be able to use an IP address rather than a name (ie, "\\192,168.0.99"), in which case, can you ping it? Did you remember the \\ in front of the name?
Good luck,
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
1/Display resolution of colored by resolution of wishy-washy? Write the program illustrated.
2/Drawing sun stands at the heart yen (x0, y0), the earth turns around the sun (orbital elip image), the moon turns around the Earth (orbital circle). The program allows to use the arrow keys to move the center coordinates (x0, y0); requirements decorated a star (blue fixed or change color to create effects flash) in the Random.
|
|
|
|
|
hey I found this site, it has exactly the code you are looking for. Just click me[^][^] and you will get it.
Oh and if that doesn't help, GO TO CLASS.
|
|
|
|
|
are you in college... better start studying... no one do your homework once you enter industry!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
HELP!
HELP! I NEED SOMEBODY,
HELP! NOT JUST ANYBODY,
HELP! YOU KNOW I NEED SOMEONE, HELP.
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
[My articles]
|
|
|
|
|
When I was younger, so much younger than todaaa-aaa-aaaay,
I never needed anybody's help in any waaaaay....
(predicting a long thread)
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
But now these days are gone, I'm not so self assured,
Now I find I've changed my mind and opened up the doors.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
Welcome in the THHB [^], [^].
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
[My articles]
|
|
|
|
|
I think to need to a new forum on the codeproject for THHB members.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
But everything would end up being on-topic!
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
We're already always on topic... (well, on-duty, maybe...)
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
[My articles]
|
|
|
|
|
AND ITS URGENT,PLZ.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
You forgot SIR .
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
[My articles]
|
|
|
|
|
Thank you for your mention,MR.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Did you somehow manage to cross a machine translation engine with a random sentence generator?
By the way, I really like this part:
mrcusutn wrote: Display resolution of colored by resolution of wishy-washy
|
|
|
|
|
mrcusutn wrote: ...of wishy-washy?
A Vietnamese washing machine?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
1. Ask somebody to translate your questions. Using a translator is a bad idea.
2. Post a question on a specific problem instead of a whole task.
3. Write it the way that nobody could guess that it's a homework.
4. Don't use words: "help me", "it urgentz" or "gif me codes".
Greetings - Gajatko
Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.
|
|
|
|
|
I am using SetSelectionCharFormat in a RichEditCtrl object on my dialog box to allow a user to change the font/bold/etc text he is typing in the rich edit box.
Basically the function should change the character formatting as needed; the code is as follows:
void CRichEditProjDlg::OnSelchangeFontsize()
{
DWORD Selection=0, FontSize=0;
CString SelFontSize;
Selection = m_FontSize.GetCurSel();
m_FontSize.GetLBText(Selection, SelFontSize);
FontSize = _ttoi(SelFontSize);
CHARFORMAT Cfm;
Cfm.cbSize = sizeof(CHARFORMAT);
m_RichCatch.GetSelectionCharFormat(Cfm);
Cfm.yHeight = FontSize*20;
m_RichCatch.SetSelectionCharFormat(Cfm);
m_RichCatch.SetFocus();
UpdateData(TRUE);
}
void CRichEditProjDlg::OnBold()
{
CHARFORMAT Cfm;
Cfm.cbSize = sizeof(CHARFORMAT);
m_RichCatch.GetSelectionCharFormat(Cfm);
Cfm.dwMask = CFM_BOLD;
Cfm.dwEffects ^= CFE_BOLD;
m_RichCatch.SetSelectionCharFormat(Cfm);
m_RichCatch.SetFocus();
}
This bold-ing function works fine, but the Font size one only works when the selected text are all of the same font size.
For example, if all of the selected text are of font size 10, I selected all of them and chose Font size 20, they would all change to font size 20. But if the selected text was of differing font sizes, say the first few words were font size 10 and the rest font size 11, the code does not change the font size of any of the selelcted text.
Am I approaching the function in the wrong way? Or must I do an internal check for different font sizes and change them all separately somehow?
Please feel free to ask for more information if needed.
Thank you.
|
|
|
|
|
Ummm - maybe you should set Cfm.dwMask to CFM_SIZE when setting the font size?
Also - why bother getting the selection's char format, when you can specify only the attributes you want to set within the CHARFORMAT structure?
|
|
|
|
|
Thanks. That seems to have worked.
Guess i missed that part.
As for the question, I guess I'm used to the "Get" then "Set" process. Didn't think of any other way.
Thanks again.
|
|
|
|
|
I'm trying to create a simple fax application that justs sends a fax. Has anyone come across a basic example.
Thanks to anyone that can help
|
|
|
|
|
I would have thought it was dependent on your interface to the fax gateway/comms device (if you have one) - most fax cards come with some sort of software for example, if you're dealing with a modem/pstn line combo then your solution will be different (since you havnt specified anything here its a bit hard without such info) ...
Microsoft, as part of their TAPI interface, provide this :- http://msdn.microsoft.com/en-us/library/ms690910(VS.85).aspx[^]
ie a COM interface which may help - I havnt read it but I'd be thinking you'd need a modem and some sort of comms line for instance
A quick google finds plenty of info out there on SDK's etc - your ISP might also provide a fax interface or such
'g'
|
|
|
|
|