|
If you don't have VS.net you can use the command line. csc.exe Here's the docs
Microsoft (R) Visual C# .NET Compiler version 7.00.9466
for Microsoft (R) .NET Framework version 1.0.3705
Copyright (C) Microsoft Corporation 2001. All rights reserved.
Visual C# .NET Compiler Options
- OUTPUT FILES -
/out:<file> Output file name (default: base name of file with main class or first file)
/target:exe Build a console executable (default) (Short form: /t:exe)
/target:winexe Build a Windows executable (Short form: /t:winexe)
/target:library Build a library (Short form: /t:library)
/target:module Build a module that can be added to another assembly (Short form: /t:module)
/define:<symbol list=""> Define conditional compilation symbol(s) (Short form: /d)
/doc:<file> XML Documentation file to generate
- INPUT FILES -
/recurse:<wildcard> Include all files in the current directory and subdirectories according to the wildcard specifications
/reference:<file list=""> Reference metadata from the specified assembly files (Short form: /r)
/addmodule:<file list=""> Link the specified modules into this assembly
- RESOURCES -
/win32res:<file> Specifies Win32 resource file (.res)
/win32icon:<file> Use this icon for the output
/resource:<resinfo> Embeds the specified resource (Short form: /res)
/linkresource:<resinfo> Links the specified resource to this assembly (Short form: /linkres)
- CODE GENERATION -
/debug[+|-] Emit debugging information
/debug:{full|pdbonly} Specify debugging type ('full' is default, and enables attaching a debugger to a running program)
/optimize[+|-] Enable optimizations (Short form: /o)
/incremental[+|-] Enable incremental compilation (Short form: /incr)
- ERRORS AND WARNINGS -
/warnaserror[+|-] Treat warnings as errors
/warn:<n> Set warning level (0-4) (Short form: /w)
/nowarn:<warning list=""> Disable specific warning messages
- LANGUAGE -
/checked[+|-] Generate overflow checks
/unsafe[+|-] Allow 'unsafe' code
- MISCELLANEOUS -
@<file> Read response file for more options
/help Display this usage message (Short form: /?)
/nologo Suppress compiler copyright message
/noconfig Do not auto include CSC.RSP file
- ADVANCED -
/baseaddress: Base address for the library to be built
/bugreport:<file> Create a 'Bug Report' file
/codepage:<n> Specifies the codepage to use when opening source files
/utf8output Output compiler messages in UTF-8 encoding
/main:<type> Specifies the type that contains the entry point (ignore all other possible entry points) (Short form: /m)
/fullpaths Compiler generates fully qualified paths
/filealign:<n> Specify the alignment used for output file sections
/nostdlib[+|-] Do not reference standard library (mscorlib.dll)
/lib:<file list=""> Specify additional directories to search in for references
|
|
|
|
|
I have some questions about Hooks.
I can do local hooks in C#,but what can I do in journal Hooks,I must know entry for DLL and the address of the procedure of my process functions.If we can do it in C#
please give me a sample.
thank you
sdfasd
|
|
|
|
|
I'm looking for some documentation on core system DLL's (in XP).
I've been trawling search engines looking for the method specs, but had no joy. Does anyone know where I could find something like this?
Cheers
Cata
|
|
|
|
|
We'll just go on MSDN : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winprog/winprog/windows_api_start_page.asp
|
|
|
|
|
|
Thanks guys, found all the stuff I was looking for and more
Cheers
Cata
|
|
|
|
|
hi
can anyone send me the source code of flow diagram?
it is very important for me.
best regards.
|
|
|
|
|
Your not too clear on this.
Do you need source code for a flow diagram control?
|
|
|
|
|
I have some sample code Heath (Stewart) may recognise it, as it's from his Icon Extraction sample.
Anyway, I'm confused about the use of the | operator with enumerations.
<br />
[DllImport("shell32.dll", CharSet=CharSet.Auto)]<br />
private static extern IntPtr SHGetFileInfo(<br />
string path,<br />
int fileAttributes,<br />
[MarshalAs(UnmanagedType.Struct), Out]out SHFileInfo info,<br />
int fileInfoSize,<br />
[MarshalAs(UnmanagedType.U4)]SHGFI flags);<br />
First is the use of the SHGFI Flags, which I take as wanting to use the Hex values as handles or refferences or pointers or something. I'm sure I'll figure it out.
The next part is:
<br />
IntPtr retVal = SHGetFileInfo(filename, FILE_ATTRIBUTE_NORMAL,<br />
out info, Marshal.SizeOf(typeof(SHFileInfo)),<br />
SHGFI.AddOverlays | SHGFI.DisplayName | SHGFI.Icon | SHGFI.SmallIcon<br />
| SHGFI.TypeName | SHGFI.UseFileAttributes);<br />
Now, how does the | operator in this work? Is it actualy an or statement? Or a collection of flags from the enumeration? If so, what effect does the | charachter have?
Thanks guys
Cata
|
|
|
|
|
The_Catalyst wrote:
Now, how does the | operator in this work? Is it actualy an or statement? Or a collection of flags from the enumeration? If so, what effect does the | charachter have?
The latter, it behave like flags. A bit-wise OR iow.
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
How do flags work? What is the OR required for? What do flags represent? Hex numbers paired with ordered values from an enumeration?
Cheers
Cata
|
|
|
|
|
The bitwise OR operator combines the bits of two values into one value, making each bit that is "1" in either value be "1" in the new value, and any bit that's "0" in both be "0" in the new value. So, you're using each bit to represent a "flag" instead of having lots of boolean (true/false) values, one for each flag.
So, if you had the flags 1, 2, & 4, and OR'ed them together, each bit would represent a flag, and it would look like this (where r = result):
binary
value value
--------------
1 = 00000001
2 = 00000010
4 = 00000100
--------------
r = 00000111
|
|
|
|
|
How do flags work? What is the OR required for? What do flags represent? Hex numbers paired with ordered values from an enumeration?
Cheers
Cata
|
|
|
|
|
Dear, Sir.
How to convert "string" type to "Shortcut" type ?
For example
convert the strings, "CtrlM", "CtrlN", "CtrlO", "CtrlP", etc to Shortcut type.
Thank you.
|
|
|
|
|
You're lucky c# has an enum parse feature
you can use this:
System.Windows.Forms.Shortcut s = (System.Windows.Forms.Shortcut)Enum.Parse(typeof(System.Windows.Forms.Shortcut), "Alt1");
|
|
|
|
|
The method that the post above mentions works for some but not all shortcuts (AFAIK). The preferred method is to use the KeyConverter class (in System.Windows.Forms) to do this. It does not take strings like "CtrlM", but it will take strings like "Ctrl+M" or "Ctrl+Shift+M".
|
|
|
|
|
What's the easiest way of rounding the time to the nearest five minutes in C#?
Rich.
|
|
|
|
|
There really isn't a builtin method for this. However - you can access the minutes property of the DateTime object and calculate the nearest multiple of 5.
|
|
|
|
|
Hi, is there anyone who can point or provide me with some samples of how to Select, Insert Update and delete using OLEDB in C#
Preferably a simple basic example that doesn't use stored procedure.
thanks.
|
|
|
|
|
I use something similar to this for INSERT an new record:
OleDbConnection conn = new OleDbConnection( DB_STR );
OleDbDataAdapter da = new OleDbDataAdapter( "SELECT TOP 1 * FROM Guestbook", conn );
OleDbCommandBuilder cb = new OleDbCommandBuilder( da );
cb.QuotePrefix = "[";
cb.QuoteSuffix = "]";
DataSet ds = new DataSet();
da.Fill( ds );
DataTable table = ds.Tables[0];
DataRow row = table.NewRow();
row["Date"] = DateTime.Now;
row["Name"] = name;
row["EMail"] = email;
row["Text"] = text;
table.Rows.Add( row );
da.Update( ds );
conn.Close();
And for INSERT or UPDATE :
OleDbConnection conn = new OleDbConnection( DB_STR );
OleDbDataAdapter da = new OleDbDataAdapter( "SELECT TOP 1 * FROM Guestbook WHERE ID="+ID, conn );
OleDbCommandBuilder cb = new OleDbCommandBuilder( da );
cb.QuotePrefix = "[";
cb.QuoteSuffix = "]";
DataSet ds = new DataSet();
da.Fill( ds );
DataTable table = ds.Tables[0];
if ( table.Rows.Count==0 )
{
DataRow row = table.NewRow();
row["Date"] = DateTime.Now;
row["Name"] = name;
row["EMail"] = email;
row["Text"] = text;
table.Rows.Add( row );
}
else
{
DataRow row = table.Rows[0];
row["Date"] = DateTime.Now;
row["Name"] = name;
row["EMail"] = email;
row["Text"] = text;
}
da.Update( ds );
conn.Close();
For the SELECT and DELETE I just use single-statement SQL-queries, which I format with string.Format() .
--
- Free Windows-based CMS: www.zeta-software.de/enu/producer/freeware/download.html
- See me: www.magerquark.de
|
|
|
|
|
thanks.
I got a question. what is the following code for?
<br />
cb.QuotePrefix = "[";<br />
cb.QuoteSuffix = "]";<br />
thanks =)
|
|
|
|
|
Here is my code.
HttpClientChannel channel = new HttpClientChannel();
ChannelServices.RegisterChannel(channel);
try{
url = "http://"+servername+":7777";
RemotingConfiguration.RegisterActivatedClientType(typeof(MyService), url);
MyService myservice = new MyService();
}catch(Exception){...}
If I input an error servername,I want to know error in customized timeout such as 10 seconds or else. How? Thanks!
|
|
|
|
|
If you looked at the SDK documentation for HttpClientChannel , the solution is obvious: channel.Properties.Add("timeout", timeout in milliseconds)
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Are you sure?
When I use the following code,
channel = new HttpClientChannel();
channel.Properties.Add("timeout",10000);
JIT throws System.NotSupportedException.
What is your suggestion?
|
|
|
|
|
I knew something about it. The timout is a new property that is introduced in .NET framework 1.1. I have changed my framework version to 1.1.
But when I use it like the following,
IDictionary props = new Hashtable();
props["timeout"] = 30000;
HttpClientChannel channel = new HttpClientChannel(props,
new SoadClientFormatterSinkProvider());
it seems the timeout(30 seconds) does not take effect.
Why? Could you help me ?
|
|
|
|