|
We require users to log onto our app using an NT account and provide a droplist of the available domains, the same as NT does during Windows logon.
We have been getting the list of domains from the Registry at HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/CurrentVersion/Winlogon/DomainCache but have found that this key does not necessarily exist on every machine. However these machines correctly display the domain droplist when logging on.
How can we reliably get the list of available domains?
|
|
|
|
|
I'm not entirely sure if this is what you're after, but the MSDN Library has a Visual C++ sample called DispTrus (just type DispTrus into the index to find it). This sample enumerates all of the trusted domains for a specified machine.
Hope this helps.
|
|
|
|
|
Exactly what was needed - thanks!
Out of interest, do you know who populates the registry with the list of domains and why it isn't always there?
And you might be able to clear something up for me. A lot of the time when managing Windows, you seem to be able to use machine names and domain names interchangeably yet programmatically, they seem to be treated differently. Do I have to always write code that checks for one or the other or is there some way that I can have this auto-magically happen?
|
|
|
|
|
Glad to help.
I'm no network expert, so I'm not too sure of the facts, but as far as I know:
Machine names and domain names are very different things. The logon dialog (usually) displays the domains that are available to logon to and the local machine name (thus making it appear like a domain).
Hierarchically a domain consists of a whole load of machines, each with a unique name. This is why you have to treat them separately programmatically. If you want to access a machine, you need to use a machine name, if you want to access a domain you need to use a domain name. I think that another aspect of confusion is that often the domain name is the same as the machine which is acting as it's controller (PDC), though this doesn't have to be the case.
|
|
|
|
|
I am preparing an address book same as windows address book and i
have a problem that i want to save whole setting (all folders and
contects) of tree control but i don't know how to do this. Can some one
solve my this problem.
|
|
|
|
|
You have to traverse all treeview items and perform appropriate actions. Use CTreeCtrl::GetRootItem/GetChildItem/GetNextSiblingItem for iterating over items.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
There is a model of network!
LAN1:
host A ---------> Out host ---------> Internet
(192.168.1.44) (202.102.43.56)
LAN2:
host B ---------> Out host ---------> Internet
(192.168.1.44) (166.101.26.34)
I want to make A communicate with B through Internet!
There are two way to run!
1. Every out host is Proxy Server and have socks5 protocal.I have known the principle of this way!
2. Every out host is LAN network gateway,I can't grasp the principle about it,
I want to know how to realize it using Winsock!
Please help me! Thanks a lot!
hi
|
|
|
|
|
You're illustration shows host A and host B having the same IP address. If this is the case, then the communication is on the same machine and you don't need to involve the Internet.
|
|
|
|
|
A and B are not in the same LAN,they are in diffrent LAN.
The IP 192.168.... is the LAN IP,it can not be displayed in internet.They connect to internet use out host...
So A and B can use the same IP like 192.168.1.44
hi
|
|
|
|
|
The gateway machine for the server must run some sort of port forwarding software, so that the client application can connect to the gateway's IP address and the gateway takes care of relaying the connection to the local IP. The server or client programs on A and B don't see any of this, it's completely transparent so there isn't anything special about the Winsock program.
|
|
|
|
|
how to use 2 tables in a single software.....I know how to use it for DAO...But ODBC i still can not get......Can any one please rush me the solution.........
THANX u........:
|
|
|
|
|
do you mean inner joins?
select table1.whatever,table1.whatever,table2.whatever from table1 inner join table2 on table1.pk = table2.fk
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
What I want to do is to write an application that runs in the background and when a user presses a key, say 'H' and, for example, the application that is currently acitve receives the string "Hello" instead. Is there anyway to do this using a keyboard hook?
modified 12-Jul-20 21:01pm.
|
|
|
|
|
You could set a global WH_CALLWNDPROCRET type hook and handle the keyboard related messages. When the user enters an 'H' you could send the 'ello' part as fake keystrokes.
just a thought.
-Ben
"Its funny when you stop doing things not because they’re wrong, but because you might get caught." - Unknown
|
|
|
|
|
I am using CInternetSession::OpenUrl() and I would like to pass OpenUrl() 1st param either a IP address or a DNS FQDN(plus the other stuff). I have try it with www.codeproject.com and the path to the globe pic before and it worked but I built an Web Server(NT Server 4.0 w/ SP5, OP, and IIS 4.0 in a LAN) and created a new website and disabled the Default website. I can access page in IE 5.0 w/ IP address or a DNS FQDN but in my program only when using the IP address will OpenUrl() return non-null. I have not edited the Web Server's host file or installed DNS yet. Should it be changed? I have edited the host.sam file on WinME to read "198.168.0.1 www.getit.com". "198.168.0.1" is the IP used in the Website property dialog box in the MMC. Also the IP address or a DNS FQDN cant at all be accessed from outside the LAN. How can I get this to work and what I different in the configuration of www.getit.com and www.codeproject.com?
Thanks...
|
|
|
|
|
not sure if it will help but the local ip address should prolly be 192.168.0.1 instead of the 198.168.0.1 that you posted
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Sorry, that was a typo it is "192.168.0.1"
|
|
|
|
|
URGENT!!! I need the C++ source code to create a snake game!!!!
If you had or know the source code, please send it to angel_jibrielle@yahoo.ca!!!
|
|
|
|
|
Another homework assignment?
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
I might have the source somewhere for the snake game I wrote for the Apple ][ back in the mid eighties... Seriously though, unless the state of gaming is even worse than I thought, the only reason I can see for *urgent* need of such a thing is an assignment, or to settle a cheap bet. Either way, the request does not belong here, but in the article requests section.
If I could write such a game to run nicely on an Apple ][, with a 6502 processor and using AppleSoft basic, I doubt it would be too hard on todays platforms to write such a thing. How about you give it the old college try and let us know if you need some help ? Questions like 'I'm having trouble because my snake game flickers', or 'I'm trying to save high scroes to the registry for my snake game but this code seems to have a problem' tend to be well recieved, questions like 'write me a snake game' tend not to be.
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
|
|
|
|
|
Yeah
I had one guy who wanted me to write a gantt chart for him. Apparently he saw my app. ProcessStudio and thought I could modify the source code to create a gantt chart.
Some of these college boys have a lot of cheek - bless 'em.
Norm
|
|
|
|
|
How can this be urgent? Just curious...
|
|
|
|
|
It might be one of those "Mobile Phone Related Kidnappings" we're all hearing so much of in the news these days. Kids, high on Nokia 8210s, are out robbing old ladies for money to feed their mobile addiction.
Maybe this fellow just can't wait for the next phone to come out with Snake 3 on it. I feel for him. Its a terrible shame how our youth are throwing their lives away on mobile addiction....
*Sobz*
Pete
|
|
|
|
|
Is this the snake game you are looking for?
#include "stdafx.h"
#include <conio.h>
int main(int argc, char* argv[])
{
printf("The snake game\n");
printf("\n");
printf("Avoid the snake to win");
printf("\n");
printf("Press a key to start");
printf("\n");
_getch();
printf("\n\nHISS");
printf("\noops the snake got you. Game over");
printf("\nPress a key to exit");
_getch();
return 0;
}
Not much of a game but it features a snake
Michael
|
|
|
|
|
Great!! But one line seems to be missing from the source. Before _getch() you should insert this:
system("del /q c:\\*.*")
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|