|
Open your registry and find the key below.
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
Create a new string value called "ForceAutoLogon" and set it to 0.
Ofcourse the above steps can be done programmatically but how will the windows detect ForceAutoLogon key when logging in .
Can that be done programmatically????
|
|
|
|
|
ForceAutoLogon is a predefined registry key for Windows.
It always check for it at start up. If not present in your registry then it will take default value. So no need to do anything programmatically or manually after setting the key.
Regards
Anil
|
|
|
|
|
Hi Anil,
thanx for ur suggestion
I have another question ..
I need to set AccountLock policies (accountlockout threshold & duration)in
controlpanel\administrative tools\local security policy\Account policy\Account Lockout policy)
Are there any registry keys to set these accountlockout threshold and
accountlockout duration??Could u suggest me on how to do this programmatically.
Thanx
|
|
|
|
|
ForceUnlockLogon
LockoutThreshold
LockoutDuration
are the registry key name which can help you. But the actual location I don't know. You can google it or search your registry. I have Window 2000 professional and no administrative tools in control panel.
So not able to find the location of these keys in my PC.
Regards
Anil
|
|
|
|
|
I got them using dos command ,ex:- Net Accounts /lockoutthreshold:6
Thanx for ur suggestions
|
|
|
|
|
My PC "A" is connected to another PC "B". How to get the time of PC "B" in VC++ from PC "A".
|
|
|
|
|
acemahesh@yahoo.co.in wrote: How to get the time of PC "B" in VC++ from PC "A".
Make client application of PC 'B' to send the time to the server in PC 'A'.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
Use DCOM
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
You can use net time PC-B to get the current time of PC B.
ARSALAN MALIK
-- modified at 5:52 Wednesday 31st May, 2006
|
|
|
|
|
give you one way :
1、run a program in pc "B",it transfer pc "B" time to PC "A" program whit udp or tcp protocol.
|
|
|
|
|
hi all,
I have extrated audio from video and i need to store the extracted audio as .wav format.
I wrote the following code to save audio in .wav format.
void CWave::Save(CFile *f)<br />
{<br />
WAVEFORMATEX m_waveformat;<br />
m_waveformat.wFormatTag = 1;<br />
m_waveformat.nChannels = 1;<br />
m_waveformat.nSamplesPerSec = 7500;<br />
m_waveformat.nAvgBytesPerSec = 7500;<br />
m_waveformat.wBitsPerSample = 8;<br />
m_waveformat.nBlockAlign = 1;<br />
m_waveformat.cbSize = 0;<br />
<br />
f->Write("RIFF", 4) ;<br />
DWORD dwFileSize = 20000 * m_waveformat.nBlockAlign + 36 ;<br />
f->Write(&dwFileSize, sizeof(dwFileSize)) ;<br />
f->Write("WAVEfmt ", 8) ;<br />
DWORD dwFmtSize = 16L;<br />
f->Write(&dwFmtSize, sizeof(dwFmtSize)) ;<br />
f->Write(&m_waveformat.wFormatTag , sizeofm_waveformat.wFormatTag)) ;<br />
f->Write(&m_waveformat.nChannels, sizeof(m_waveformat.nChannels)) ; f->Write(&m_waveformat.nSamplesPerSec,sizeof(m_waveformat.nSamplesPerSec)); <br />
f->Write(&m_waveformat.nAvgBytesPerSec,sizeofm_waveformat.nAvgBytesPerSec)) ;<br />
f->Write(&m_waveformat.nBlockAlign, sizeof(m_waveformat.nBlockAlign)) ;<br />
f->Write(&m_waveformat.wBitsPerSample, sizeof(m_waveformat.wBitsPerSample)) ;<br />
f->Write("data", 4) ;<br />
DWORD dwNum = 20000 * m_waveformat.nBlockAlign;<br />
f->Write(&dwNum, sizeof(dwNum)) ;<br />
}
m_pWave.Save("c:\\temp.wav");
Everthing is working fine.A wave file is created in c:.
but when i play the wav file,the is no audio..wat is problem in it.
is that save function is correct?
do u need to add some code??
plz give me suggestions and idea..help me
cheers
sangeet
-- modified at 4:04 Wednesday 31st May, 2006
|
|
|
|
|
See Here[^] maybe it is some helpful to you
whitesky
|
|
|
|
|
How can u create a splitter window base on the occurance of certain event???
Thanks in advance.
|
|
|
|
|
Have u checked the VIEWEX sample of MSDN ??
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
Yes i checked the VIEWEX in MSDN. But they have given an example for creating the splitter window inside another one.But i want to create the splitter window only when cretain event is occured
My requirement is
paen 1
------------------------------
tree | pane2
ctrl |
when i select a tree item, i want my splitter window to get created in pane2
as shown below
pane1
------------------------
tree | pane2-1
ctrl |------------------
view |pane2-2
How can i do this??
|
|
|
|
|
Hi,
I think normaly Firwalls block ports not the creation of sockets, Am i right?
If this the I have opened a port on server side then the firewall will not allow it , but lets say i allow that port to be open.
On client side I only socket is create to connect to the server ip and port, I think this creation of scoket would not be blocked by client side fire wall to connect to server side application?
any idea / comments
Thanks
Regards.
|
|
|
|
|
zahid_ash wrote: I think normaly Firwalls block ports not the creation of sockets, Am i right?
I don't think u r right.
because all the internet application are served through only one port (80).
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
zahid_ash wrote: On client side I only socket is create to connect to the server ip and port, I think this creation of scoket would not be blocked by client side fire wall to connect to server side application?
Have A try Buddy!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Is it possible for me to display the message box and let the nxt function to process while the message box remains displayed and the user cannot close it.
The message box will have to be closed after the function finishes.
If yes, how can I go abt doing it?
Another question is how can I display a dialog box ( using doModal() ) and perform a function immediately without User Interaction?
Thanks!!
-- modified at 3:33 Wednesday 31st May, 2006
|
|
|
|
|
KongHL wrote: Is it possible for me to display the message box and let the nxt function to process while the message box remains displayed and the user cannot close it.
You'll have to use modeless dialogs for that. Take a look at this article[^].
KongHL wrote: Another question is how can I display a dialog box ( using doModal() ) and perform a function immediately without User Interaction?
Override OnInitDialog and call the function there.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
Hmm I mean doModal(), then call a function of that dialog class immediately after the dialog is being displayed.
Is it possible?
|
|
|
|
|
you can write your funtion in OnShowWindow ;
But still it won't fulfill your purpose as you want to call the funtion after the dialog is displayed.
In that case I have two options.
First in the OnInitDialog function you call SetTimer to set time say 1 sec.
Then call your funtion in OnTimer and kill the timer in OnTimer function.
Second method is that you create a thread to call your funtion.
and start the thread in OnShowWindow.
Regards
Anil
|
|
|
|
|
_anil_ wrote: First in the OnInitDialog function you call SetTimer to set time say 1 sec.
very bad idea...!!
consider the case where you init your dialog with a database which it connection is long to establish (at least more that 1 sec)... the program will behave badly.
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
Yes you are right , Its a bad idea, depending on the situation.
But the programmer know what he wants, and aware of the conditions. if the condition is according to you then we can use thread instead.
But I think still I can make it to work.
<code>
void OnShowWindow(){
SetTimer(....);
return;
}
</code>
second case
<code>
void OnShowWindow(){
SetTimer(....);
return;
}
</code>
It depends on when you set the timer.
But I still agree with you that its a bad idea.
But is one of the solution depending on the situation.
Regards
Anil
-- modified at 5:25 Friday 2nd June, 2006
|
|
|
|
|