|
An instance of MyClass is running in Thread A. This instance of MyClass instantiates an instance of YourClass.
As part of the constructor of YourClass a worker thread (Thread B) is started. When this worker is completed it calls a delegate callback function in MyClass.
In which thread context is the delegate function executed? Thread A or B?
|
|
|
|
|
I think that any function called from a delegate will normally be executed on a thread from the thread pool. Thus it will not be executed on Thread A or Thread B.
I have some memory of a way of getting a delegate to execute on a particular thread, but can't recall the details right now.
|
|
|
|
|
Hi all,
I've been trying to subscribe to SourceSafe events (BeforeCheckin, AfterCheckin etc.) through c# and interop. I've used tlbimp on SSAPI.dll to get access through c#.
In the Init() function I subscribe to events (BeginCommand += new ....) and the rest.
I change by ssaddin.ini file appropriately. When I open SourceSafe, my Init function gets called the way it should.
The only event handler that gets invoked consistently is the EndCommand handler. Depending on the order in which I subscribe to the events (+=), I can get different event handlers to be invoked but I can never get all of them invoked. (unexpected)
Looking at what tlbimp generates as a signature for the event handlers I came accross something strange. The BeforeAdd method (for example) expects as a first parameter a VSSItem, but if I implement the interface in Visual Basic 6, the signature for the same method expectes a IVSSItem.
Can anyone point me in the right directed to how I can get this working. I'm all out of ideas.
Thanks in advance.
|
|
|
|
|
Hi,
Please tell me about compile an project in C# for run under Windows 98, Win98 SE.
I try compile but it don't run, it's missing very library.
Thanks.
H.Dung
|
|
|
|
|
What errors do you get? Did you install the .net framework on the 98 machine? Did you install mdac 2.7 if you are doing db access?
|
|
|
|
|
Hi,
I don't compile C# run in Windows 98 because I install it in Windows 2000. Now I want compile C# project for run in Win98.
Please help me.
Thanks.
|
|
|
|
|
There is nothing different to do. Just install the framework on the 98 machine and then your app. As long as you don't use framework objects that are only supported on 2K you are fine.
|
|
|
|
|
Thanks for your suggest very much.
Now I can run my app in win98.
H.Dung
|
|
|
|
|
Hi,
I write an application in C# but I don't want user run it more one instance. How do I know numeric of instance of this app when user fire it? And how to I resolve this problem?
Please help me.
Thanks.
H.Dung
|
|
|
|
|
|
Hi,
Thanks you very much.
H.Dung
|
|
|
|
|
Hello, I'm making HTTP requests with System.Net.HTTPWebRequest and I want to capture the entire header of the request as a string. I'm able to do this with responses but now the requests. Am I missing it in the API somewhere or is there another way?
thank you
"Outside of a dog, a book is Man’s best friend. And inside of a dog, it’s too dark to read."
-Groucho Marx
|
|
|
|
|
Hi,
I'm creating a COM+ Client/Server in C# and so far things are going relatively well. The client talks to the server, the server puts the data sent to it into the database, it then sends a successful message back to the client. It all runs under the Component Services until start looking at calling the server from a remote machine. If I move the client to a remote machine I get a wonderful 'System.IO.FileNotFoundException' error referring to the server DLL. Surely I don't need to distribute the DLL along with the Client EXE file? Do I?
All I want to do is have a COM+ service running on a server and my client to connect to it! Could some one help me figure out what I missed?
Thanks in advance.
Graham
|
|
|
|
|
SpudgunDoogal wrote:
All I want to do is have a COM+ service running on a server and my client to connect to it! Could some one help me figure out what I missed?
I know that it is an obvious question, but have you exported a COM+ application proxy to the client computer?
ORACLE One Real A$#h%le Called Lary Ellison
|
|
|
|
|
I completely forgot to do that bit! It's been a while since I last did any COM! When I try to export the application proxy I get the error:
"Error Code 8002801D - Library not registered"
All the registry entries are there and appear fine. I'm running the component under Windows 2000 with service pack 3. Any ideas?
Thanks
Graham
|
|
|
|
|
Using RegMon I discovered that there seems to be some registry keys missing. The COM+ exporter is looking for the CLSID value in HKLM\SOFTWARE\Classes\NameSpace.Class\CLSID. Which doesn't exist for this component.
Why would that be the case? I've added it to the GAC and used regsvcs to register it with Component Services. Have I missed another step?
Thanks again for all your help.
Graham
|
|
|
|
|
SpudgunDoogal wrote:
Why would that be the case? I've added it to the GAC and used regsvcs to register it with Component Services. Have I missed another step?
Try generating a Type Library with regsvcs /tlb and registering this tlb by hand, see if it helps.
ORACLE One Real A$#h%le Called Lary Ellison
|
|
|
|
|
I'm writing a small application that needs to take a DataSet and dump it to either a Comma Delimited text file or a Tab delimited text file. I was wondering if there are any "proper" ways to do this, using built in functions or classes, or if I should just manually write out the proper format to a standard text file. Writing it out myself is trivial, but if theres an established way of doing this with .NET I would like to know.
Thanks
Dave Ratti
|
|
|
|
|
Nope, just a "proper" way to write it out to XML.
Reminiscent of my younger years...
10 LOAD "SCISSORS"
20 RUN
|
|
|
|
|
|
|
By now you have probably already solved this problem, but just incase you havent I recently put the following code together to read a file as a dataset and vice versa :
public static DataSet ReadFileAsDataSet(string filePath, string fileName)
{
OleDbConnection oCon = new OleDbConnection(
"Provider=Microsoft.Jet.OLEDB.4.0;" +
"Data Source=" + filePath + ";" +
"Extended Properties=\"text;HDR=NO;FMT=Delimited\"");
OleDbDataAdapter oCmd = new OleDbDataAdapter(
"select * from "+fileName, oCon);
DataSet ds = new DataSet();
oCmd.Fill(ds);
oCon.Close();
return ds;
}
public static void WriteDataSetAsFile(string filepath, string fileName, DataSet ds)
{
if(File.Exists(filepath + "\\" + fileName))
File.Delete(filepath + "\\" + fileName);
StreamWriter sw = new StreamWriter(filepath + "\\" + fileName, true);
foreach (DataRow dr in ds.Tables[0].Rows)
{
object[] objRowData = dr.ItemArray;
string strRowData = string.Empty;
foreach(object obj in objRowData)
{
strRowData+= "\"" + obj.ToString() + "\",";
}
strRowData = strRowData.Remove(strRowData.Length - 1, 1);
sw.WriteLine(strRowData);
}
sw.Close();
}
|
|
|
|
|
|
i am looking for a grid control where i can display and edit data..there are no backend tables involved..
isnt the data grid control usable only if you bind it to a backend ?
There are no failures; there are only extended learning opportunities.
|
|
|
|
|
The datagrid can be used with many things like a dataset, an xml document, etc. Or you can just load it up yourself.
|
|
|
|