Not sure how you have this implimented but if the user doesn't chose a directory couldn't you just have the program simply clear the the box and send a messsage to the user stating that the directory they chose does not exist? That way if they chose nothing or an invalid directory both cases are handled.

Hello all....

Sorry if this is extremely simple and stupid but I was taking a look at the Forgers32 manuals just to have a poke at the win32 api. I was able to get his first example working to pop up a basic window but for some reason the title text displayed in the title window is in chinese or something lol. I tried pokin around a bit to try and understand why but can't seem to find the answer. Here's his sample code incase that helps speed up anybody willing to explain it to me.


include <windows.h>

const char g_szClassName[] = "myWindowClass";
// Step 4: the Window Procedure
case WM_CLOSE:
return DefWindowProc(hwnd, msg, wParam, lParam);
return 0;
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
HWND hwnd;
MSG Msg;
//Step 1: Registering the Window Class
wc.cbSize = sizeof(WNDCLASSEX); = 0;
wc.lpfnWndProc = WndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hInstance;
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
wc.lpszMenuName = NULL;
wc.lpszClassName = g_szClassName;
wc.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
MessageBox(NULL, "Window Registration Failed!", "Error!",
return 0;
// Step 2: Creating the Window
hwnd = CreateWindowEx(
NULL, NULL, hInstance, NULL);
if(hwnd == NULL)
MessageBox(NULL, "Window Creation Failed!", "Error!", ...

Yeah that was all I meant by not assuming. Yeah it's always wise when networking to lower security to get it working then raise the level once you know things are working correctly. Good luck with your project sounds fun.

Also I wouldn't recommend "assuming" the router is doing anything. It should be doing what you are telling it if the settings are correct, and forwarding traffic to the machine you designated as your web-server. Another thing you shouldn't need the http:// if you are trying to access directly through the router. Simply type the address of the router into the address bar.

Well first thing that comes to mind that you didn't state. Are you running a web-server on the machine that the traffic is being forwarded to? If not it could be getting requests but doesn't have anything to send back. Also remember when your in your testing phase you may have to turn off your security settings and start turning them on one by one until you are at your desired level of security.

Unless you are using a proxy of some sorts.

skilly commented: curious +3

I tried pinging the router and got responce timed out. This message holds the key to your problem, the ping was sent to the router the router we can assume most likely recieved it unless there is something wrong with the hardware, but it never sent the message back. Either your addressing is incorrect thus you are not part of the network, or a setting in the router maybe incorrect. Do the things jingda requested, most likely your firewall is blocking the connection.

A short simple answer defined here as well as some other good little tid bits, but if this is for homework I suggest you really get out and do some research. Your teacher probably isn't going to be impressed with a one sentence answer to this. Anyway by gaining the trust of a computer that is trusted by the target network you can bypass alot of security. Have a look here [URL="

I haven't really studied these until today, but from the information I have gathered today they are in fact quite similar. Also it seems that the techniques would in fact work well together in my opionion. Major diffrence?

syn-cookie: Uses a timestamp and uses that to create a queue associated with the client, also provides an encrypted portion to ensure client integrity.

HFC: Uses hops(the distance from client to server) and basically creates a list of valid ip -> to hops to check against and filter out possible ip's that have been spoofed.

As far as you question reguarding using them together like I said they seem to work well together and both are great counter-measures however according to the information I gathered syn-cookie has been updated and replaced with tcpct which is a tcp extension and would probably be prefered over syn-cookie so you may want to research that as well.

s.w.a commented: thank you for your huge attention,helpful information and clear sentances +2

GREAT RESOLUTION!!!! Yeah networks can be painful to troubleshoot. Even the greatest of us can lose sight of the obvious stuff at times as complicated as things get. A great mentor also once introduced me to packet tracer it's a great program that let's you assemble virtual networks for testing. You can also keep the configuration of you current network as a file and introduce new things or take existing things out for testing purposes to help keep your network running at an optimal level. Worth checking out for any administrator IMHO. Great work!!!

[QUOTE=jwenting;1572122]yes, they are to be taken literally. It's piracy, and piracy at the high seas carries a mandatory death penalty so why not this form?

As to European countries not wanting to extradite, that's why laws need changing and international cooperation and synchronisation of laws is needed.

I'm not talking about chopping someone's head off for downloading a single song.
But for the diehards, who download, redistribute, and often sell gigabytes a day and make money out of it? Sure.
I've had friends lose their jobs because the company they worked for went under as a result of piracy.
None of them died as a result, but others have (suicides because they ended up in the gutter quite frequently).
As a result, pirates (especially the large ones) are directly responsible for the deaths of people, thus a case can be made that piracy in volume is homicide.[/QUOTE]

Not sure where you live jwenting but remind me to never visit. I don't think I ever want to be in a place where a teenager downloading music is directly linked to mass suicides and even homicide. I also think it might be scary to live in a government under the control of someone that supports killing of citizens for anything less than murder.

Yeah I surely don't support Obamacare and believe the implementation was completly wrong in that situation. And although I do think america has had one of the best health care systems around, I do agree with the fact it leaves many out in the cold. Do I have a solution? No.... I wish I did it's very sad to know that there are sick people and babies out there that do not have proper health care. Also jwenting you are correct in the sence that slackers may "mooch" of a system like this and yes would have to be weeded out. Does this have to equal camps and assasiation? I don't think so, it's not like that now. And you would be suprized how many people living on the streets are anyting but "slackers", if you don't believe me on that one maybe you should go donate some time and see for yourself. And when you realize the truth it may make you see if you where in some of the positions they are you might want an angels hand to help pick you up.

  1. fun(0) zero is passed in
  2. that means n <= b would be true
  3. if that is true then fun(50+fun(50+fun(50+fun(50+0))))
  4. like math parethesis first? fun(50) can disregaurd add zero
  5. that's once through keep going or let the comp do work :).

string::find does do that buddy. I know this stuff is hard to read, but you should start learning now, if we give a man a fish we feed him for a day, if we teach a man to fish we feed him for a lifetime. Now grant it I am not great at this either but I am forcing myself to learn and possibly we can get a better answer from some uber smart peeps here.

Now let me refer you back here [URL="

HAHAHAHA oh my not sure if this thread just took a turn for better or worse but I think I'm gettin closer to a heart attack now. :)

Indeed seems proper. Seems this is somewhat of a new trend but catching on fast. If I ever have enough money to get suited up like you are presently I may have to go that route myself.

My heart and soul may travel with you then brother lol.

I have heard great things about this one but never used it. Might be worth checking out. [URL="

If you don't have an error I would definatly be suspicious of the time variables. Have you proven them to be providing the correct data? Also I have heard even in c++ global variables are not highly looked upon and you can clearly pass elasped to moveball() so you probably should.

Nice job :) c++ is new for me to but it's slowly starting to look more like english.

Ok let me explain a little further when I had you run that test it was because [B]if[/B] an a is not found it will return -1 in most programming that return value means just that nothing was found or false. The reason I bold if that is your keyword. In your revised code line 21 is wrong don't use == that is for comparison. Try to read your program out in english first then translate to code. The problem is in your loop.

while x is less than the length of the string
//change back to what it was replpos = string1.find("a");
put the value of the funtion string.find() into the variable replpos
this line you are attempting replace i belive it was right the first time to
next add 1 to the value x
retarts loop

So what you are doing is saying for the entire length of the string loop and find "a" and replace it at this spot. The way I did it was using an if statement inside the loop. And I used the handy fact that -1 is thrown if it's not found as my comparison. Give it one more try with that info. If it's still making you want to pull your hair out after that I'll post code, but you will feel more rewarded doing it yourself.

@britanicus The only time I found this script to abort was if "a" is not found and you use the value -1 in the replace ...

Yeah apperently sounds a little slow :). Still trying to find some better specs and reviews on these guys to but the company sure seems reputable and apperently you could go pick one up for about $60 bucks at walmart. [URL="

If you need ideas for expanding a network for a company you are already taking the wrong approach. The people you need to be asking questions are the comany itself. Anybody could rattle off the greatest servers, wiring concepts, os's, security and yadda yadda yadda. But that means nothing you need to find out what their specific needs are. Some things you will probably want to know.

The most important of all questions before you even consider starting. What is the budget?

What are they going to need as far as servers go? Some examples... Are they going to be hosting their own website? Do they want voip for some type off messaging system? Are they going to need massive storage and database capabilities? How's our budget looking as this is probably the most expensive part of any networking project? Is there some technologies we can utialize to increase productivity or save the company money in other areas?

Ok now after we figure out all of that the next step would most likely be to consider the design of the network. If you don't already know how to do this I'm sure we can help out but god help that poor company.

After we have all the hardware, software, design process done then the real work begins. You can start running all your wires and if you are smart you will run 3 times the amount you think you need that way when you are ready for the next expansion ...

Yeah it definatly seems to not have many reviews to be seen. As you stated though it's fairly cheap and also fits your needs. It does seem to have a warranty associated with it which is good. Not sure if you have gone through newegg before, but just as a heads up be sure to keep everything including the box and review their policies well incase you want to request a refund. I'll try to do a little more pokin around and see if there is any other good deals for what you are looking at. I believe you have 30 days to request a full refund to so that should give you enough time if all goes well to give it a good test run and if you don't like it you can send it back.

Would somethin like this work for you better then you wouldn't need wires or any of that hassle? [URL="

Not sure with the compile error what is wrong, maybe you were trying to build it with the program still running. As far as what your code you are very close. I won't give you the answer since you want to figure it out on your own but here is a hint.


include <iostream>
include <string>

using namespace std;

string string1;
int stringlen;
int replpos;
int a = 0;

int main(){

cout << "Enter some text: ";
getline(cin, string1);

stringlen = string1.size();

replpos = string1.find("a");
cout << replpos;
//run this part a few times first type something with an 'a' in it
//what is the value and why? Now run again with something without an 'a'
//what value are you at now? That should clear your understanding up a bit

return 0;


[QUOTE=Agilemind;1570074]Socialism can be thought off as a middle area, or publicly owned corporations (here we call them crown corporations, but I don't know what they are called in the US). Where in certain areas the government owns either one of many competing companies or the only company (monopoly) in a certain area eg. broadcasting.

Alternatively, there are systems like the Canada Healthcare system where the government pays for a particular service on behalf of all citizens but lets the private sector (to differing degrees) provide the service. Note: this only works because it is illegal for anyone else to pay for it so the private companies cannot rip off the gov't.

So there are lots of variation and room for compromise, the best systems IMO treat things on a case by case basis to determine which set up is best for a particular area, since there are things that gov't is good at which are not the same as what free-markets are good at which aren't the same as what charities/NGOs are good at. Problems happen when we forget the strengths and weaknesses of each and someone over steps their bounds.[/QUOTE]

Yes totaly in agreement with this. And yeah Canadas health care system is a great example. And yeah the note you posted also takes me back to my thoughts that things like this can work, like you said in a case to case basis and also proper montering.

Yes what you say is true. The rules for the key can of course be ajusted at the router, while the packet is still in packet "form". The server should maintain information about the key. Now that you have a clear picture let's look at some examples.

Client sends request to server
Server accepts the request and sends key
The rules of this key are to send data to the client unless the connection is timed out lets say 10 minutes of inactivity. At that point if the server has not had another request from the client authentication must take place again.
So server sends key and trasmits the data
Lets pretend it was a 9.50 min long video
The data is sent and the connection is still valid for 10 seconds incase of problems
After the 10 minutes the server dumps the key and the client must send a new request.

Now if we want to tighten up security on it we could possibly do something like.
Client sends request
Server recieves and sends key
Rules of this key will be that every 2 minutes the key must be renewed.
Here is our problem....
The client only requests the information once.
They push the button get authenticated and expect all the data to come at them.
One way possibly around this issue would be to install special software on the client which defines new rules. For example we let the client know that before the 2 minutes are up ...

Or this havn't tested it as I am still going through it myself but I assume since it was proposed it should work. [URL="

Ok if you are just interested in how it works I can attempt to explain. The thing to realize here is that most of this is usually done automatically for us. Take for example A client clicks the link to stream a video, when they click the link the request is sent to the server. The server recieves this and begins to send out the information requested. You seem to want to know what information is in the request packet. This explains the layout of a UDP request packet [URL="