|
CDBob2002 wrote: right now I'm scanning the folder by using coded numbers..
If you're talking about a "dictionary" style, where you try to download files from the server, guessing at filenames, this isn't an OPEN server and there is no way to get the directory contents from such a configured box. You've found the only method that's going to work, and it'll only work so long as the owners of the box don't notice you're blindly trying to download files. Once they figure it out, you'll be blocked from doing so.
|
|
|
|
|
still the wrong answer
still the wrong answer
still the wrong answer
still the wrong answer
if flashget get can do it why can't I
The server is open
Basically there site is set up so you have to go web page to web page just to get one file at a time..
I don't want to have to flip pages.
While I was sleeping last night I had my scanner going and have downloaded
58000 files... so what do you want to do flip 58000 pages or get then all at once.. this download was just a small part of what I have so far..
don't wory I'll find some thing...
I found something last night that is a C# library open source
once I wake up and the grandson leaves I'll hit it hot and heavy again
|
|
|
|
|
OK. So the server is available for browsing the file system. You get the directory in an HTML page, so parse the page to get the directory and filenames. A Regular Expression ought to do it nicely. From there, you build a list of URL's for the files you want to download and use HTTP to get them, one at a time. There is nothing in the .NET BCL that's going to do it for you.
|
|
|
|
|
Please don't reply if all you are going to do is B.S
I'm sorry I asked now...
anyway I have found parts of what I was after on yahoo
I just need to combine them into one... program...
Does Microsoft MVP mean Jokestersoft MVP
I think I'll go ask at the real M$ C# forums...
http://forums.microsoft.com/MSDN/[^]
|
|
|
|
|
I had this Idea to write an emulator to use firmware updates as plug-in modules. The program will be used as a help desk program for helping end-users configure thier internet routers. Basically what I would be looking to do is to be able to view and navigate the web setup many of these routers provide and to see where the settings need to go in order to provide step-by-step directions to the end-user. The program does not need to "emulate" a virtual network or anything like that or even bootup simulation. Just the web navigate pages, except I would like it to emulate default IP's(for the setup page) and the factory user/pass to log-in. So basically for a linksys WRT54G I could download the firmware's for every version and select which one the user has. Then I could navigate the pages and tell the user what setting go where and on which page.
Does this seem possible? Dlink has a web page similar to what I am trying to do, but I want to use C# to embed a web page inside a form which would have drop-downs for model/make/version.
|
|
|
|
|
This is quite an interesting idea, however it will be a very very difficult project.
Firstly, emulators are difficult to write. You need intricate knowledge of the hardware, so unless you work for the manufacturer your going to be doing a lot of reverse engineering. You would have to analyse the firmware (which is binary), try and understand what the firmware is doing, and from that, work out how the router works. This will be very very hard, it's not a project I would know how to do.
The easier way to do this would be simply to buy all the routers you want to work with, and take screen shots of all the pages. Then you could just display the screen shots when the user selected the router/version.
If you are insistent on trying to do something like this, the place to start looking would be the websites that have custom firmwares for the routers. These guys have at least begun to partially understand how the router works inside, and may be prepared to share some knowledge with you. My recommendation though would be not to bother, even if you have to buy hundreds of routers and take hours grabbing screen shots of each one it will still be quicker and easier than writing an emulator for just one router.
Simon
|
|
|
|
|
Hi,
I'looking for a little help regarding Windows API from C#.
First, let me explain what I am trying to do.
I'm opening an external application (Internet Explorer) from a C# App, and I want the window to open maximized and then remove the ability from the user to Mnimize, Restore, Maximize, Move and Size the IE Window. It was easy enough to open the Windows in a Maximized state and then use Win API to modify the Window style not to have a Minimize and Maximize button. Here is the basic code I used...
const int GWL_STYLE = -16;
const int SW_HIDE = 0;
const int SW_SHOW = 5;
[DllImport("user32.dll")]
public static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
Process inet_pro = new Process();
private void button1_Click(object sender, EventArgs e)
{
inet_pro.StartInfo.WorkingDirectory = @"C:\Program Files\Internet Explorer\";
inet_pro.StartInfo.FileName = @"C:\Program Files\Internet Explorer\iexplore.exe";
inet_pro.Start();
inet_pro.WaitForInputIdle(1000);
int newStyle = 0x15CC0000;
Thread.Sleep(300);
GetWindowLong(inet_pro.MainWindowHandle, GWL_STYLE);
SetWindowLong(inet_pro.MainWindowHandle, GWL_STYLE, newStyle);
ShowWindow(inet_pro.MainWindowHandle, SW_SHOW);
}
This code sets the Window to a maximized state and removes the Maximize, Minimize and Restore buttons and also removes these abilities from the System Menu. But the problems I still have are...
1. Once you have set the style, the window is no longer locked in position e.g you can move it by dragging the windows titlebar.
2. The Window is sizeable, which it should not be if in true Maximized state.
I need to resolve these two key issues, and I was hopeing to do it with out having to implement any type of global hook, which relies on an external custom DLL. Any suggestions would be most appreciated?
Thanks
Shane
|
|
|
|
|
The best you can get is a fixed size window with no minimize/maximize button. Which would be fine exceptyou can restore the window by double-clicking the caption bar, and since you removed the maximize button you can't maximize it again.
So, you could always remove the caption bar too. Anyway, this is the closest i could get:
const uint WS_CAPTION = 0x00C00000;
const uint WS_BORDER = 0x00800000;
const uint WS_DLGFRAME = 0x00400000;
const uint WS_THICKFRAME = 0x00040000;
const uint WS_MINIMIZEBOX = 0x00020000;
const uint WS_MAXIMIZEBOX = 0x00010000;
const uint SW_MAXIMIZE = 0x00000003;
uint newStyle = GetWindowLong(inet_pro.MainWindowHandle, GWL_STYLE);
newStyle ^= WS_THICKFRAME;
newStyle ^= WS_MAXIMIZEBOX;
newStyle ^= WS_MINIMIZEBOX;
SetWindowLong(inet_pro.MainWindowHandle, GWL_STYLE, newStyle);
ShowWindow(inet_pro.MainWindowHandle, SW_MAXIMIZE);
You could try removing WS_CAPTION and see how that works out for you, but then the only way to quit is ALT-F4.
My current favourite word is: Nipple!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
Thanks for the reply. But even with WS_CAPTION removed you still can move the window by clicking on the thin border at the top of the window.
|
|
|
|
|
I never saw this kind of coding before can somebody recode the following methods in a more simpler fashions.
private void SetFlag(CellFlags flag, bool val)
{
if (val)
flags |= flag;
else
flags "= ~flag;
}
public bool Removed
{
get { return (flags " CellFlags.Removed) != 0; }
set { SetFlag (CellFlags.Removed, value); }
}
modified on Tuesday, October 21, 2008 4:06 PM
|
|
|
|
|
|
Replace those double quotes with & and you should be in good shape.
private void SetFlag(CellFlags flag, bool val)
{
if (val)
flags |= flag;
else
flags &= ~flag;
}
public bool Removed
{
get { return (flags & CellFlags.Removed) != 0; }
set { SetFlag (CellFlags.Removed, value); }
}
Mark Salsbery
Microsoft MVP - Visual C++
modified on Tuesday, October 21, 2008 5:24 PM
|
|
|
|
|
ummmm.... I think you mean to replace with &
|
|
|
|
|
That's what I meant. Brain-dead reply for sure!
Thanks for the head's up!
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
hello,
my problem: i like to select multible mp3 files in the windows explorer, open and process them with my application.
I think it works with the GetCommandLineArgs() Methode (bsp. string[] args = Environment.GetCommandLineArgs()). This Method returns a string array. But when i select more than 1 mp3 file in the windows explorer, and show the Length of the args array, it alwas says 2. Index 0 is always the url of my programm. Index 1 is the url of the first selectet mp3 in the windows explorer, and the rest is emty.
But why, i like to get each url of each mp3. I hope you understand me
modified on Wednesday, October 22, 2008 3:08 AM
|
|
|
|
|
That because Explorer only launches your application with one file at a time. Your code is expecting this:
MyApp.exe file1.txt file2.txt file3.txt file4.txt
Explorer is actually launching this:
MyApp.exe file1.txt
MyApp.exe file2.txt
MyApp.exe file3.txt
MyApp.exe file4.txt
Google for "Single instance application c#" for examples on how to deal with this situation and pass the filename from one instance of your app to another.
|
|
|
|
|
Hello i joined here to ask for a little help.
I'm very new to programming (I'm only 15) and have only just learned about classes and methods and instances...
So why am i here?
I want to know about DllImport because i have had absolutely NO PRACTISE with it, and would like to use NTDLL (caps?)
I have no idea what the name is of what i want, but it's stuff like "NtSuspendProcess".
Telling me what it's called will be great, giving examples of NtSuspendProcess will be brilliant (I want to have a go at starting my own project )
Sorry for any hastle (or annoyance... ) and thanks for any help / loving welcomes
|
|
|
|
|
Hi,
first of all I like to welcome you to the fabulous world of programming And welcome to Codeproject (it's okay if I speak for the community?)...
There is a site called PInvoke, which contains the DllImport-syntax for a lot of libraries. For example have a look at the SuspendThread-Method:
http://pinvoke.net/default.aspx/kernel32/SuspendThread.html
And here at stack overflow you get a whole example:
http://stackoverflow.com/questions/71257/suspend-process-in-c
Hope this helps you a bit...
Regards Sebastian
|
|
|
|
|
I put a panel on a form. when the user clicks the panel
a new pictureBox that holds an image is created with a unique name.
Those pictureBoxes are stored in a BindingList declared in code.
How can I make the bindingNavigator shows the number or name of a specific picture when It is clicked so I know for sure i am changing that xyz picture.
|
|
|
|
|
Hello Everyone. Has anyone worked with the ObjectForScripting method before, if so please post a reply as I would like to ask a particular question that concerning this.
Thank You.
|
|
|
|
|
You would be better off just posting your question, rather than asking if anyone knows that area.
Simon
|
|
|
|
|
Hello Everyone,
With regards to working with ObjectForScripting property of a webbrowser control
I have a toolbar that runs in IE when you launch it, there is no webbrowser control added,
I can get to the document of the current browser, but would like to get to the ObjectForScripting property of the current browser that is initialy launched in IE, if possible.
I don't konw it this maybe possible, as I don't think that the browser that is launched when IE is executed, may have this property set, also logicly, since that object would have already been created, then it would be also impossible to set the ObjectForScripting property after the object has already been initialized.
I am just puttiing this question out there, so that someone else can confirm this or prove some other way to accomplish this, as that would save me a lot of work on having to rewrite already created javascript functions into managed code, where I would have been able to execute javascript functions against the intial document, client Side, and have the client script call managed application code for my toolbar loaded in IE, without having to recreate a browser app and implementing a webbrowser control, just to be able to use OBjectForScripting.
Please note that this is not a .Net solution, and there will be no running scripts against the server.
Once again, Thank you all.
|
|
|
|
|
If it's not a .NET solution, then why are you posting it here? This seems like a very odd forum to post a none .NET question.
|
|
|
|
|
This google search might help[^]. Take a look around the MSDN links
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|