|
Is there any way that I using code can add and remove users on Windows 2000 Server.
|
|
|
|
|
Have a look at the Active Directory doc on MSDN, specifically the samples for creating a user [^].
Brad
|
|
|
|
|
NetUserAdd worked for me.
"It was when I found out I could make mistakes that I knew I was on to something."
-Ornette Coleman
|
|
|
|
|
Hi, need help!!
Does anybody know how to grab the data stream that goes to
the graphics card from windows and then on to a projector for example, or even how this works????
I presume that the data stream is going to come from the
windows desktop through win32.
Any ideas or links greatly appreciated!!
Cheers,
/Shane.
|
|
|
|
|
This can not be done easily. Use a projector that has a vga input. If you are using a laptop it should have a vga connector and you should be able to use both on, or either on. Their should be a keyboard command for that.
John
|
|
|
|
|
Hi,
Is there a method that will convert an float to a hex number?
Thanks.
|
|
|
|
|
A "hex" number is how it is represented, not how it is stored (i.e., its type). All numbers have a base-16 representation, be they floating-point or integer. For example, if I had a number (12345) and I wanted to see its base-16 representation, I'd use:
int num = 12345;
char szNum[16];
sprintf(szNum, "%#x", num); szNum now contains "0x3039." No conversion was done, it's just shown in a different base.
See if these two MSDN articles help you along any:
Q42980
Q125056
|
|
|
|
|
Thanks for the help.
Where can I find those articles, on the msdn.microsoft site?
Just to clarify: I am sending information from my program to someone else via the internet. I was told that the information has to be sent in hex format. So are you saying i can just send a float number?
Thanks for all your help
|
|
|
|
|
Jay Hova wrote:
Where can I find those articles, on the msdn.microsoft site?
Yes.
Jay Hova wrote:
Just to clarify: I am sending information from my program to someone else via the internet. I was told that the information has to be sent in hex format. So are you saying i can just send a float number?
See this thread.
|
|
|
|
|
Great... While I'm off, straining my tiny brain to come up with something that might just pass for helpful, you pop in with an easy solution. Sheesh!
"Welcome to Arizona! Drive Nice - We're Armed..." - Proposed Sign at CA/AZ Border
|
|
|
|
|
I know the feeling.
http://www.codeproject.com/script/comments/forums.asp?forumid=1647&select=592740#xx592740xx
|
|
|
|
|
I'm not sure what they're trying to say - "Hex format"? It could many several things.
The IEEE format for representing a floating point number is
S EEEEEEEE FFFFFFFFFFFFFFFFFFFFFFF
0 1 8 9 31
where S = the sign bit, EEEEEEEE = the exponent, and FFF...F = the fractional mantissa. In this format each bit has meaning, and on the receiving end the consumer has to expect and recognize this format. When you send it in hex, you're just sending bits in groups of 4, or
SEEE EEEE EFFF FFFF FFFF FFFF FFFF FFFF
Hex0 Hex1 Hex2 Hex3 Hex4 Hex5 Hex6 Hex7
It's up to the receiver to combine the 8 hex characters' bit pattern into a single 32-bit value and correctly interpret it as a floating point value.
On the other hand, if your application requires you to send text data only, using the ascii characters that represent the hex characters that are equivalent to your floating point value, you have a real challenge. First you'll have to convert the float into a collection of 4-bit chunks, then determine the hex character for each chunk, then convert each hex character to text. I wouldn't know how to begin that, I'm afraid, though almost everyone here is smarter than I about such things and may be able to guide you.
Hopefully you're dealing with the first case...
"Welcome to Arizona! Drive Nice - We're Armed..." - Proposed Sign at CA/AZ Border
|
|
|
|
|
Anyone know how to use the ip control?? Maybe get the current machine's ip as an example... I would appreciate it.
<marquee>Universal Project
|
|
|
|
|
Getting a machine's IP address and using the IP control are mutually exclusive things.
gethostname();<br />
gethostbyname();<br />
CIPAddressCtrl::SetAddress();
are what you need to look at.
|
|
|
|
|
Let's pretend that you are talking to somebody that does not know anything about the IP Control. Examples are really nice things you know.
<marquee>Universal Project
|
|
|
|
|
And they are plentiful!
http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=cipaddressctrl&btnG=Google+Search
|
|
|
|
|
1) DWORD addr;
((CIPAddressCtrl*)GetDlgItem(IDC_IPIDDRESS1))->GetAddress(addr);
2) BYTE b1,b2,b3,b4;
((CIPAddressCtrl*)GetDlgItem(IDC_IPIDDRESS1))->GetAddress(b1,b2,b3,b4);
If address is 212.176.73.161, b1=212, b2=176, b3=73, b4=161.
yiy
|
|
|
|
|
I have a dialog application which hosts several sub dialogs. I need to send a message from one of the sub dialogs which can be received by all of the other sub dialogs. What's the best way to do this in MFC?
Todd Smith
|
|
|
|
|
Are the dialogs modeless?
|
|
|
|
|
Yes, the dialogs are modeless.
Todd Smith
|
|
|
|
|
If they are all children of a certain window use CWnd::SendMessageToDescendants
John
|
|
|
|
|
Good call, John. I was cooking up something much harder for him.
|
|
|
|
|
My first thought was to save a list of hwnds... But then I remembered about child windows...
John
|
|
|
|
|
SendMessageToDescendants works great except that it sends the message to the current window as well as the children. Annoying but I worked around it.
thx
Todd Smith
|
|
|
|
|
Does anybody know the best way/tool to merge source codes when
you are working with a lot of programmer except VSS?
|
|
|
|