|
The computer user can log on Win2000 as an administrator, while
he should be forbidden to change the system time under windows 2000.
Of course we can carry this point by setting the "User Rights Assignment"
through the "Domain Controller Security Policy" tool, but how can we gain
this end through VC programing?
|
|
|
|
|
Are you asking how to prevent the system administrator from adminstering the system? Why not have the user logon as something other than Administrator? Even if you do this, what keeps the Administrator from simply resetting the right manually? (Or does it not matter).
You can post messages to any window. So if you can get the the gui of the tool you need opened, you can send messages to it and any controls in it. That gives your program control of the tool.
|
|
|
|
|
Thank you for your reply.
I am working for a special system. The user must logon as an administrator, and he can access "command console" only.
How to prevent him from changing the system time then?
|
|
|
|
|
I think you will need to set the rights using the Domain Controller Security Tool, you mentioned in your original post. I'm not familiar with that tool, but if you can figure out how to launch it from your program, if you can get the the gui of the tool you need opened, you can send messages to it and any controls in it. That gives your program control of the tool.
|
|
|
|
|
Thank you again.
You are right that I can set the rights by using the tool([Start]-[Programs]-[Administrate tools]-[Local Security Policies]-[Security Setting]-[Local Policies]-[User Rights Assignment]). I just want to restrict the user in an unvisible or hidden process. That is, we should not see the gui of the tool. How to implement it throught VC programing?
|
|
|
|
|
Hi All,
I am sending data over a (supposedly) blocking socket in a while loop but having trouble. The code works fine if I single step through code, data is sent properly, the but send fails on WSAECONNABORTED when running full speed. I am using the Dundas socket wrapper functions but tracing into the source doesn't show anything suspicious.
Anybody have any ideas?
Robert Boll
|
|
|
|
|
Do you send data to a server you designed or a public server?
If you designed the server, then you should check your server code.
Kuphryn
|
|
|
|
|
Its much easier to find the problem when you are looking in the right place.
Thanks so much.
Robert.
|
|
|
|
|
Does the server recieve data in Big Endian or little Endian. If I recall correctly, the byte order for MFC is little Endian, but if you are connecting to a Unix box or a Mac they might expect to recieve the data in Big Endian byte order.
|
|
|
|
|
I put a bitmap on my dialog box as a background, but it is covering the buttons. Is there anyway to send the bitmap back so the buttons are in front in VC++ 6.0 ? Thanks in advance friends, and C++ experts!
|
|
|
|
|
Draw the bitmap yourself in WM_ERASEBKGRND. There are exampes here on CP.
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
|
I didn't know the tab order controlled the drawing order ?
Regardz
Colin J Davies
Sonork ID 100.9197:Colin
You are the intrepid one, always willing to leap into the fray! A serious character flaw, I might add, but entertaining.
Said by Roger Wright about me.
|
|
|
|
|
The tab order is set by moving their order in the rc file, as you've suggested he do.
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
Oh, ok learn something new everyday,
[embarassed]
I'd always wondered where the Tab order was stored.
[/embarassed]
Regardz
Colin J Davies
Sonork ID 100.9197:Colin
You are the intrepid one, always willing to leap into the fray! A serious character flaw, I might add, but entertaining.
Said by Roger Wright about me.
|
|
|
|
|
Colin^Davies wrote:
I didn't know the tab order controlled the drawing order ?
The tab order changes the order in the *.rc files. And for non-tab-stop controls like the static control, it serves as a mechanism by which we can simulate a bring-to-front for dialog controls.
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
Colin^Davies wrote:
I didn't know the tab order controlled the drawing order ?
Technically, the tab order is the Z-order of the controls, and that controls the drawing order. (It's also why you can use SetWindowPos() to change the tab order.)
--Mike--
Just released - RightClick-Encrypt v1.4 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Try altering the order it appears in your rc file, if using MFC, or in creation if standard.
Regardz
Colin J Davies
Sonork ID 100.9197:Colin
You are the intrepid one, always willing to leap into the fray! A serious character flaw, I might add, but entertaining.
Said by Roger Wright about me.
|
|
|
|
|
I want to mess around with the Linker settings from a Macro, but I can't seem to find the interface to use. Here's what I have now. I can successfully enumerate down and retrieve the release Configuration object. But I don't know where to go from here. Has anybody done something like this before?
Sub SetupRelease()
Dim proj As Project
Dim confs As Configurations
Dim conf As Configuration
Dim linker As VCLinkerTool
For Each proj In Application.Solution.Projects
confs = proj.ConfigurationManager().ConfigurationRow("Release")
For Each conf In confs
' I don't know how to get the VCLinkerTool from here
Next
Next
End Sub
|
|
|
|
|
I have written an handler when the user presses the left mouse button in the list control.
I am doing the following in the handler code
{
Invalidate();
HWND hWnd1 = ::GetDlgItem (m_hWnd,IDC_LIST2);
LPNMITEMACTIVATE temp = (LPNMITEMACTIVATE) pNMHDR;
RECT rect;
//get the row number
nItem = temp->iItem;
..
..
..
}
nItem is having -1 and not a valid row number?
Could anyone tell why it is so.
Thanks
|
|
|
|
|
If you use MFC the GetSelectionMark() returns the zero-based selection mark, or -1 if there is no selection mark. I think your CListCtrl has to be in Report-mode.
Arjan.
|
|
|
|
|
I downloaded a file, and in it was this line:
cs.dwExStyle &= ~WS_EX_CLIENTEDGE;
=============================
Other than noticing the edges of the client area (of the view) did show a 3-dimensional look, it's more of the technical side that I'm interested in finding out.
Specifically, what does the "ones complement" do when combined with the logical AND operator.
Thanks.
William
|
|
|
|
|
~ flips all bits in a variable (0s become 1s and 1s become 0s). As WS_EX_CLIENTEDGE is a value which expressed in binary is all zeros except one bit, ~WS_EX_CLIENTEDGE is all 1s except that bit, which becomes zero. When you bitwise AND this with cs.dwExStyle the result is that all bits of cs.dwExStyle remain unchanged (1 AND x = 1) except that bit which becomes zero (0 AND x = 0). To sum it up, you're setting the specified bit to zero, or (in this context) removing the style "client edge" (in case it was set).
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
OK, let me see if I got this straight. You said, "In this context," I am "removing the style 'client edge' (in case it was set)."
I couldn't have removed it, because when the view got displayed, it had the "client edge" showing. Are you saying that if it were NOT set, coding:
cs.dwExStyle &= ~WS_EX_CLIENTEDGE;
would set it?
Thanks again.
William
|
|
|
|
|