|
Thanks mav,
Your described process to load related dll is informative. But it has nothing to do with GAC? I am wondering what is the function of GAC in your following process?
BTW: I find in my Windows registry there are additional Assembly and Class value -- not every mscoree.dll has CodeBase.
I think Assembly is the name in GAC, and Class is for the entry point CLSID for CoCreateInstance? Right?
mav.northwind wrote: When a COM server must be created, windows takes a look at HKCR\CLSID\COM Class ID\InprocServer32 (I'm skipping out-of-proc servers deliberately to keep it simple).
The value of this key is used to find the dll containing the implementation (a little simplified, once again).
For managed COM servers this value points to mscoree.dll and only for this type of servers the CodeBase value is neccessary. You can run regedit and then search for "codebase" inside of HKCR\CLSID to see several examples for the required structure of registry entries for managed COM servers.
regards,
George
|
|
|
|
|
I didn't look into every detail of the registration of managed COM servers, but Junfeng Zhang has a very valuable blog talking about the inner workings of fusion, COM activation, the GAC and other related topics:
http://blogs.msdn.com/junfeng[^]
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Thanks mav,
The blog is very informative. A lot of information... Could you let me know which part do you mean? I felt I lost my way when reading the Blog for 10 minutes.
regards,
George
|
|
|
|
|
I finally got visual c# studio to install on my computer! My grandpa, who's visiting, downloaded the iso images to his computer and burned it to a cd for me, because my dad's can't burn cd's. It's installing as I am typing this... Thank you guys for helping me along the way. Sorry, I didn't know if I should post this here or not... I hope I don't get in trouble 'cause it's not a question...
Oh, and don't mind the sig...
-----
*** Never give me an answer having anything to do with Visual Studio. I don't have this because I have two computers, one being my dad's mac, which is connected to the internet, the other being my pc, which is, sadly, not connected to the internet. The setup for the Visual C# program I think is called a "bootstrap" program, and it needs to connect to the internet to install the program. THEREFORE I cannot install this program onto my pc.***
|
|
|
|
|
max29297 wrote: I finally got visual c# studio to install on my computer!
Cheers, have fun with it
Maybe you can change your sig about not having VS
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Wow, I've tried it and it makes Windows Form Applications much easier to make. It's a lot better than guessing the x and y values for every single control...
Paul Conrad wrote: Maybe you can change your sig about not having VS
Well maybe you should've looked at the last line of the message you just quoted...
If I had a sig, it would probably go here.
|
|
|
|
|
Gz!
Now finally you can start developing like decent people do
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
So you're saying I'm not decent?
If I had a sig, it would probably go here.
|
|
|
|
|
Please take a look here.[^]
The smiley should have been hint enough.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
|
I want that create and print report with c#
but i want do every thing by code and don't use any option in visual studio
please help me
|
|
|
|
|
What part, specificly, are you having trouble with?
I get all the "news" I need from the weather report.
|
|
|
|
|
i just write this code in class named BindReport
public DataSet GetDataSet()
{
SqlConnection sqlconn = new SqlConnection(_connectstring);
SqlDataAdapter DA = new SqlDataAdapter("select aman_no,aman_name,aman_area from aman", sqlconn);
DataSet ds = new DataSet();
DA.Fill(ds,"aman");
return (ds);
}
and this code in form load
BindReport obj = new BindReport();
DataSet ds = obj.GetDataSet();
CrystalDecisions.CrystalReports.Engine.ReportDocument myRPTDocu = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
myRPTDocu.Load(@"..\..\CrystalReport2.rpt");
myRPTDocu.SetDataSource(ds);
crystalReportViewer1.ReportSource = myRPTDocu;
and this code not work and give me exception "the report has no tables"
|
|
|
|
|
Hi,
I have the following situation and struggling with it. So hopefully someone can solve it or perhaps advice me another method. What I have is an Excel spreadsheet and a c# program.
In the program i load the excelsheet into a datatable
<br />
Cursor = Cursors.WaitCursor;<br />
InitExcel(ref _exr);<br />
_dt = _exr.GetTable();<br />
So far so good. I can than loop trough the rows from the datatable like this
foreach (DataRow da in _dt.Rows)<br />
{
and so on. What i would like to achive now is the following. In my datatable there are many rows. I would like to group rows where a certain column has the same value. It is a fact that rows where this is the case are underneath each other. So it thought lets move to the next row to see if the value is the same. if so read some columns and move on to the next row and do the same check. If the value is the same read the samen columns. If not i have another row and start over again. The result should than look something like
Source table
100;Nice product;100.0;Variant 0
100;Nice product;100.1;Variant 1
100;Nice product;100.2;Variant 2
200;Another nice product;200.0;Variant 0
200;Another nice product;200.1;Variant 1
200;Another nice product;200.2;Variant 2
100 Nice product
....100.0 Variant 0
....100.1 Variant 1
....100.2 Variant 2
200 Another nice product
....200.0 Variant 0
....200.1 Variant 1
....200.2 Varian 2
and so one. but i have not got a clue how to do this. I cannot figure this out. A bad but working solution is to add the datatable to a hidden grid on the form and perform this actions on the grid. but that is not the solution i am looking for
Hope this makes any sense and that someone can help me solve this issue
Kind regards,
Marcel Vreuls
http://www.marcelvreuls.com
< >
|
|
|
|
|
in datatable u have a function called select(query)
u can use that will solve ur problem
it will get the collection of rows having the same column value and returnit as a row[].
ex
---
DataTable table = DataSet1.Tables["Orders"];
// Presuming the DataTable has a column named Date.
string expression;
expression = "Date > #1/1/00#";
DataRow[] foundRows;
// Use the Select method to find all rows matching the filter.
foundRows = table.Select(expression);
// Print column 0 of each returned row.
for(int i = 0; i < foundRows.Length; i ++)
{
Console.WriteLine(foundRows[i][0]);
}
}
with Regards
Amjath
|
|
|
|
|
Thanks Amjath,
this one works exellent for my. Sometimes the solution is simple
Kind regards,
Marcel Vreuls
http://www.marcelvreuls.com
< >
|
|
|
|
|
I'm getting this error, any idea why?
Error:
'DerivedClass': member names cannot be the same as their enclosing type
Code:
using System;
namespace TestConsole
{
public class TestOne
{
public static void Main()
{
}
}
public class PersonDetails
{
private string foreName;
//read only property because it only has a 'get' clause
public string ForeName
{
get
{
return foreName;
}
}
protected void SetForeName(string value) {
foreName = value;
}
}
public class DerivedClass : PersonDetails
{
public DerivedClass() {
base.SetForeName("Joey"); } //error
}
}
Jon
|
|
|
|
|
Hi Jon,
the code shown seems correct. If it actually is what is in your project,
I suggest you close Visual, reopen it and retry (with Rebuild Solution, so it
throws away all existing output files).
|
|
|
|
|
Cheers for that
Jon
|
|
|
|
|
Hi!
The code you have posted is correct and can be compiled without problems.
Please try again or post the code that's actually giving the error.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Change the name of the base class method "SetForeName" to something other than that. Its the cause of your exception.
Phil
|
|
|
|
|
It's not being compiled with VS2005 somehow....that's where the problem is
Jon
|
|
|
|
|
Did it compile now after restarting VS, like Luc suggested?
All I can tell you is that exactly the code you posted can be compiled just fine on my PC with VS2005. So either you didn't post the exact code or your C# compiler is screwed up in a very strange way...
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Hi im working on an application to update a flash website , ive made a form with a WebBrowser control which im using as a local preview .
Im trying to figure out why the preview isnt working correctly , my onclick events arent working and it isnt importing the images correctly .
it works fine in ie but im getting ie script errors in the program which is weird because its scope is set to a swf
Is their any way to get this preview working
|
|
|
|
|
I want to create a windows form localized to Amharic language(Ethiopia). What is the use of UTF8 Files with localization? i have got some am_ET.UTF8 File, is there any thing related to this and may help localizing applications created using C#?
Anyone with know how, please let me know.
|
|
|
|