all groups > c# > january 2008 > threads for wednesday january 16
Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
background worker thread
Posted by Analizer1 at 1/16/2008 11:19:19 PM
From what im reading about backgroundworker thread
it seems it can only have 1 thread at a time
is this correct
tks
... more >>
accessing COM from C# with an IStream** parameter
Posted by Ralf at 1/16/2008 8:14:52 PM
Hallo,
I'm trying to call a COM function from C#.
The function has a parameter from the type array of IStream* (IStream**).
The COM component (out-proc-server (.exe)) has the following code:
(C++)
STDMETHODIMP CIntf::SendFiles(int noOfStreams, IUnknown** dataStreams)
{
for(int i = 0... more >>
WPF: FindAncestor of Unknown Type
Posted by Wonko the Sane at 1/16/2008 8:00:00 PM
Hello,
I am creating a ControlTemplate for a ComboBox. This ComboBox will have a
transparent background so it uses the control it is placed in as its
background.
I would like the background of the Popup to also match the parent control.
It cannot use the Transparent background of the C... more >>
Vista problems and VS2008?
Posted by John Rogers at 1/16/2008 7:46:16 PM
Can anyone tell me what kind of problems I am about to experience
with vista? I just bought a new laptop and I can't seem to get all my
drivers working for XP, so it seems like I have no choice but to go
to vista.
Thanks
... more >>
more about the using statement
Posted by Tony Johansson at 1/16/2008 6:33:24 PM
Hello!
I just wonder what is the point of having the reader variable declared as
TextReader in the snippet below..
Is it because of using the polymorfism on the reader variable perhaps.
using (TextReader reader = new StreamReader(fullPathname))
{
string line;
while ((line = reader.R... more >>
depencency problem in vs2008 setup project
Posted by Stephan Steiner at 1/16/2008 6:05:20 PM
Hi
I recently switched over to VS2008 and had to create my first setup project
(in VS2008) for an already existing project. So I had Visual Studio convert
the existing solution, then added a setup project to it. I made sure that
the runtime version of the upgraded project was set to 2.0 as ... more >>
How to Find a File
Posted by Don Gollahon at 1/16/2008 5:40:38 PM
How can I find a file in .NET? I know I can use Directory.GetFiles()
with a path and mask like '*.txt' but our directories in production can
have 10's of thousands of files. I just want to get the first match to
the mask quickly without having to fill a huge array.
VS 2003, .NET 1.1.
Than... more >>
C++ DLL Parameter Conversion
Posted by DelGator@gmail.com at 1/16/2008 5:35:17 PM
I know I'm going to feel like a fool when this is answered, but I am
importing a C++ DLL that has an out parameter that is an "unsigned
long *". What do I declare in my import to represent that parameter?
C++ sig:
HRESULT SomeFunction(/*[out]*/ unsigned long * aVariable)
C# code:
[DllI... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Thread Kill delegate (or something like that)
Posted by sheperson@googlemail.com at 1/16/2008 4:52:22 PM
Hi,
When I create a new Thread and start it and after a while I kill the
thread, how can I auto-invoke a method upon killing the thread?
I mean is there a delegate or something to use when the thread is
killed to call a method?
Thanks in advance.... more >>
replace spaces
Posted by RobcPettit@yahoo.co.uk at 1/16/2008 3:29:46 PM
Hi, given the string '1(10) 00069- rob c pettit 54' Id like to know if
its possile to replaces spaces with - only when preceded with a letter
and followed with a letter. Giving '1(10) 00069- rob-c-pettit 54'
Regards Robert... more >>
Minimize or restore a window via a small application
Posted by SteveT at 1/16/2008 3:27:01 PM
I have an application that will look at other Windows applications that are
currently running. In a listbox I have the names of these applications and
their Windows ID. When the user clicks one of the application names in the
listbox I want to either minimize or restore that application's wi... more >>
fastest searchable datastructure?
Posted by Pieter at 1/16/2008 2:20:36 PM
Hi,
I need some type of array/list/... In which I can store objects together
with a unique key. The most important thing is performance: I will need to
do the whole time searches in the list of given keys. Which datastructure
will be best suited for this? A Hashtable? The list may contain u... more >>
Programmatically check to make sure an e-mail address is legit.
Posted by Mufasa at 1/16/2008 1:51:17 PM
I've seen web sites that check to make sure an e-mail address is valid. How
are they actually doing it? I'd like to integrate that into some code.
TIA - Jeff.
... more >>
How to get a single digit hour string.format?
Posted by Frank Rizzo at 1/16/2008 1:37:38 PM
Hello,
I am trying to print out an hour in a format of 3pm or 5am. I've tried
the following, but it throws an exception saying invalid input string:
string times = string.Format("{0:h}{1:tt}", startTime, startTime);
However, if I change h to hh, it works fine, but then it prints out 03am... more >>
Write ICON data to an xml file
Posted by SteveT at 1/16/2008 12:13:01 PM
I have a structure that contains both 32x32 and 16x16 icons plus some text.
I want to write all this to an XML file so that I can recover the icons later
in an application. Can someone tell me how to properly serialize the
System.Drawing.Icon structure to an XML file?
The following code d... more >>
Parse Input
Posted by Mythran at 1/16/2008 11:36:53 AM
Sorry, this was originally posted in VB.Net newsgroup, but I meant for it to
be posted to the C# group initially, so I'm sorry for the multi-post, my
mistake.
-------------------------------------
I have a console app that accepts input from the user. This input can be a
command for the ap... more >>
Max TCP client connections???
Posted by Greg at 1/16/2008 11:16:25 AM
I'm creating a tcp socket connection from the thread in the c#
threadpool. Since the default workers thread is 500, sometimes my
program tries to open up 500 different tcp socket connections and the
connection fails after it reaches certain number of opened tcp
connection. I guess it reached t... more >>
Slow in reading large DBF data files in C#.
Posted by Man Nguyen at 1/16/2008 10:53:01 AM
Hi,
I am using C# to read large FoxPro data file (DBF). Everything works
fine except it is too slow to load the file in buffer (I think).
Anybody know how to solve this
problem please instruct me how. I am new to C# so I don't
know alternative way of reading data faster from database.
Apprec... more >>
instance Question
Posted by Analizer1 at 1/16/2008 10:20:41 AM
Hi....
when i use the new keyword
myobject obj1 = new myobject()
myobject obj2 = new myobject()
myobject obj3 = new myobject()
does each of the object have a complete instance of
myobject, or do they share the methods of myobject
another words..does each instance have a complet object/met... more >>
Namspace Conflicts
Posted by Microsoft Newsserver at 1/16/2008 9:58:21 AM
Hi
I have a web applications ( one with the dll ). and I have declared some
classes. However, I keep getting warnings that the class c:\xxxx\xxxx\xxx.cs
conflicts with the imported on the in c:\xxx\xxxx\xxxx\cccc.dll
I cant remember having this problem before. How do i get around it ?
... more >>
Telnet: Grabbing Bytes Previously Written During Next Read?
Posted by pbd22 at 1/16/2008 9:57:27 AM
Hi.
I am building a custom telnet interface and my problem is that I
want to read the user input along with the previously written stream.
Right now I am logging the user.
I have
Login: Bill
Login is written by:
buffer = ASCII.GetBytes("Login: ");
_clientStream.Write(buffer, 0, b... more >>
Reuse Process, capturing output
Posted by Elpoca at 1/16/2008 7:50:23 AM
Hi:
I am trying to capture std output from a console application and
redirect it to a textbox. The code below works the first time the
process is started, but on subsequent starts it fails to capture the
output (the process definitely runs every time). What am I doing
wrong?
namespace Wi... more >>
Exposing Dependency Properties
Posted by Anthony Paul at 1/16/2008 7:30:23 AM
Hello everyone,
I just ran into the following scenario and couldn't figure out
something that I thought should be easy as pie.
I have a class that contains a dependency property, let's say it's a
DateTime property. I can bind directly to this property via TwoWay and
all is well. Now I want ... more >>
I cannot reliably write the Hex number "83" to a stream
Posted by ajmastrean at 1/16/2008 6:40:08 AM
I cannot get any (hex) number in the "0x80"-"0x89" range (inclusive)
to write properly to a file. Any number in this range magically
transforms itself into "0x3F". For instance, debugging shows that
"0x83" = UInt16 "131" and that converts to Char (curly) "f". Any
information would be helpful.
... more >>
How do you kill a completly locked up thread?
Posted by TheSilverHammer at 1/16/2008 6:20:00 AM
Because C# has no native SSH class, I am using SharpSSH. Sometimes, for
reasons I do not know, a Connect call will totally lock up the thread and
never return. I am sure it has something to do with weirdness going on with
the server I am talking to. Anyhow, this locked up state happens o... more >>
IP address for a socket service
Posted by paal.andreassen@gmail.com at 1/16/2008 4:43:51 AM
I have a problem. I have two instances of a client-server application
running on two different machines A and B.
A has a listening service, that listens for connections from B
B has a listening service, that listens for connections from A
The problem is what IP to bind the listening service ... more >>
Logging into VSS through C#
Posted by Vaibhav at 1/16/2008 3:45:00 AM
Hi...
Can anyone plz tell how can i login through C#.net application into Vss and
extract files from ths VSS database. ... more >>
namespace
Posted by vimal.424@gmail.com at 1/16/2008 2:08:32 AM
can anybody tell me how to use the namespace?what s the benefits of
using namespace?
can we create our own namespace?
thanks in advance... more >>
null is unrecognized literal
Posted by doofy at 1/16/2008 2:02:53 AM
I'm trying to run some code I typed in from "Pro .Net 2.0 Windows Forms
and Custom Controls in C#", and I'm getting two errors that seem like
they shouldn't be happening.
One example is:
if (mc == null) [where mc is a reference to Quartz.dll, which I
pulled in by letting VS 2008 do an... more >>
Trying to simplify my List Collection Sort
Posted by tshad at 1/16/2008 12:01:06 AM
I have dataGrid that I am filling from a List Collection and need to sort it
by the various columns.
So I need to be able to sort the Collection and found that you have to set
up your own sorting functions to make it work. I have build the following 3
sorting
functions for the 3 columns and... more >>
|