|
This doesn't really make any sense. PTE are used by the Virtual Memory Manager. This shouldn't affect the number of files/folders you create on a volume.
Are you looking at a memory or handle leak perhaps?
You could increase this pool, but your app would have to modify the registry (preferrably during installation) and restart for the changes to take effect.
I'd test the crap out of this solution though. By increasing the PTE pool, you could be merely postponing the inevitable because of leaky code.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I originally discovered what was causing my problem by doing a !vm in the kernel debugger. There was no problem with virtual memory except for an upper-case message: "YOU ARE OUT OF PTES".
I know that my handles are ok. Both the task manager and the openfiles command verify it.
In my original message I said I was creating hundreds of thousands of files. I was mistaken. I am actually creating millions of files, each about 256 kbytes. I structured the directories so that there are no more than 10,000 files per directory.
I also forgot to say that I am using interop from C# to do normal CreateFiles and WriteFiles from C. Also, I am doing the reads from a volume snapshot in xp sp2.
I did a test of running my code with the actual file-writing disabled and had no problem. All I can figure is that this is a bug in windows when you write too many files. I guess I will have to change my design to reduce the actual number of files written.
|
|
|
|
|
Well, the limit of the number of files in a single NTFS volume, depending on disk size of course, is 4.294 Billion. On a FAT32 volume, it's 4.17 Million. It's not a bug in Windows, but a problem with I/O capacity and the fact the you're probably one of the few people on earth to generate this many files on a volume. God help you if CHKDSK ever has to run. I hope you can take a week off...
It is recommended that, on volumes that contain an excessively large number of files, and Millions qualifies, that you go through this[^] document on MSDN. Disable 8.3 name generation and also turn off Last Access timestamp updates. You'll probably have to do more than that...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I wanted to know if given an ip range, i.e 192.168.1.0-192.168.0.255, how do I find out which IPs are actual machines connected to the LAN without having to ping each IP?
Even if I ping each IP, I wouldn't know if a timed out IP is an actual machine connected the network but offline or if the IP doesn't even exist on the LAN.
If anyone has used the program Look@Lan, they would know that when you input an IP range it automatically figures out which IPs are valid and discards the ones that don't exist on the LAN. How do I accomplish this using C#?
I'm using Visual Studio .NET 2005 with framework 2.0.
I would appreciate any help or advice.
Thanks.
|
|
|
|
|
There's really two questions you seem to be confusing here. The first is "which IPs are valid within a range", and "which IPs are used by computers".
The first question can be solved mathematically, but it won't tell you anything about your actual network. The second question can only be solved by sending a ping or ARP packet out for each address, and checking for a response. Whether a machine is disconnected or simply nonexistant really is the same thing as far as network is concerned, so there's no way (or reason) to differentiate between the two.
If you want to know which addresses within a range of IPs have computers associated, ping each one. It's tedious, but it's the only way. You'll obvously only want to scan a small range of addresses, or you'll be at it for hours.
|
|
|
|
|
Thx for the reply tylerl.
I was hoping there was some other way to find out which IPs are used by computers besides pinging each one.
I don't know if you have used Look@Lan, but somehow it figures out which IPs are used by computers and which IPs just don't exist. I've tried looking around the net for the program's source code but even though its free, the source code is unavailable. I've also looked at quite a few ping applications in c# but they still can't differentiate between an IP that is being used by a computer or one that doesn't exist on the network. They just send a packet and check for a reply.
If you can think of anything else, please don't hesitate to reply back.
Thanks again.
|
|
|
|
|
Pinging is no longer much help. Unless you turn on the File Sharing exception for Windows Firewall in XP SP2, or otherwise open port 445, Windows Firewall will reject ICMP Echo Request packets sent by ping , by default. You can enable them if required. You'll find that most other software firewalls will do the same.
If you need to determine whether you can connect to a network service, just try to connect to it. If you're trying to do a site survey you're probably out of luck.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
What is the best way to create one in C#?
I guess I need to create a tuple class or is there something like SortedList for tuples?
Later, JoeSox
"Football is a game of cliches, and I believe in every one of them." -Vincent Lombardi
CPMCv1.0 ↔ humanaiproject.org ↔ Last.fm
|
|
|
|
|
what do you mean by tuple, can you give an example? If you mean a variable that holds two values, you can easily use a struct or class
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Greeeg wrote: what do you mean by tuple, can you give an example?
Well, I am experimenting with this right now
<br />
class Tuple<br />
{<br />
private string relationship;<br />
private string phrase1;<br />
private string phrase2;<br />
<br />
public string Relationship<br />
{<br />
get { return relationship; }<br />
set { relationship = value; }<br />
}<br />
public string Phrase1<br />
{<br />
get { return phrase1; }<br />
set { phrase1 = value; }<br />
}<br />
public int Phrase2<br />
{<br />
get { return phrase2; }<br />
set { phrase2 = value; }<br />
}<br />
}<br />
I might change it to objects instead of strings. I just need something that will be fast for searching and sorting it's data. SortedList works great but that is only for a (key,value) not (key, value, value).
Later, JoeSox
"Football is a game of cliches, and I believe in every one of them." -Vincent Lombardi
CPMCv1.0 ↔ humanaiproject.org ↔ Last.fm
|
|
|
|
|
That's okay. The easiest way is to implement IComparable in your Tuple class. The SortedList will then sort your keys according to the result of the CompareTo function of your Tuple class.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Thanks. I'll play around with that idea.
Later, JoeSox
"Football is a game of cliches, and I believe in every one of them." -Vincent Lombardi
CPMCv1.0 ↔ humanaiproject.org ↔ Last.fm
|
|
|
|
|
|
Kevin McFarlane wrote: If you're using .NET 2.0 then a Tuple class (actually a Triple)is provided by the free PowerCollections library.
Outstanding. Thanks.
Later, JoeSox
"Football is a game of cliches, and I believe in every one of them." -Vincent Lombardi
CPMCv1.0 ↔ humanaiproject.org ↔ Last.fm
|
|
|
|
|
Actually, I just discovered that there are Pair and Triplet classes of Objects in .NET 1.1 but they're in System.Web.UI. Surprised they didn't update them to generic versions and put them in the generics namespace. However, I expect they'll roll in some of the PowerCollections stuff over time.
Kevin
|
|
|
|
|
|
Has anybody ever drawn the red squigly lines that show up say in Word or other apps under a word when it is misspelled?
I have come up with a way but it is not reliable to underline all words. My method gets messed up with tab chars and also hidden text. I suspect the same would be true for tables and inserted pictures.
Thanks in advance,
Eric
|
|
|
|
|
From my knowledge, it is not directly possible to use the rtb class to draw the Office-Style underlines.
However, you can have an effective selection method by saving the selected text and creating custom functions to get text from it - even with hidden text
|
|
|
|
|
I think you would probably have to directly draw the lines on the control, either using RichTextBox.CreateGraphis() or by creating a class that inherits from RichTextBox, and overriding RichtextBox.OnPaint
|
|
|
|
|
Its possible to draw the line using the approach mentioned. However, the difficulty I'm having is reliably calculating the coordinates of the beginning of the word that needs to be marked with the squiggly.
Any suggestions there?
Thanks again,
Eric
|
|
|
|
|
Use the GetPositionFromCharIndex method.
|
|
|
|
|
Will u please post the code!!!!!!!!
|
|
|
|
|
Hi!
The Rich Edit control that's actually the core control underneath the RichTextBox can display underlines (even the squiggly ones), but setting the corresponding character styles is not possible directly with the regular RichTextBox.
You'll have to send EM_SETCHARFORMAT messages to the rtb to enable underlining in a given style. You can't have an underline color that's different from the text foreground color, though.
You might want to look up the CHARFORMAT2 structure in the Platform SDK documentation on the different options you have to underline text within a rich edit control (and thus in a RichTextBox).
Regards,
mav
-- modified at 7:47 Saturday 4th February, 2006
Just found out that my statement on the underline color was incorrect.
You CAN have different underline colors, althouth it's not documented in the CHARFORMAT2 struct. The upper 4 bits of the bUnderlineType determine the color.
|
|
|
|
|
Hi everyone!!!
I want to add SplashScreen to my application. I found on the Web a source to do : http://www.reflectionit.nl/Splash.aspx
To give more promptness to this SplashScreen, I have to add a Flash 8 control (OCX Flash). There I have problem on execution. The error message :
Impossible to reach a removed object named "SplashForm"
Is there solution!!!
Thank you!!!
C# Forever !!!
|
|
|
|
|
Try making a new project, and copying all your existing source into it
|
|
|
|