|
Nope. I already tried that, and v1 generates a compiler error:
error CS0122: 'A.B()' is inaccessible due to its protection level So unless this "bug" was fixed by v1 SP2, that's not what they mean.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
Apparently, the bug is with the static CreateDelegate method, which ignores the protection and visibility of the target. The fix doesn't require the method to be visible to the code which invokes the delegate, just the code that creates it.
This code will compile under v1, but not v1.1:
public delegate void TestDelegate();
class A
{
protected void B()
{
Console.WriteLine("Hello from A.B!");
}
}
class C
{
static void Main()
{
A a = new A();
Delegate del = Delegate.CreateDelegate(typeof(TestDelegate), a, "B");
del.DynamicInvoke(new object[] {});
}
} Thanks to Emil for pointing this out on the GotDotNet forum:
http://www.gotdotnet.com/Community/MessageBoard/Thread.aspx?id=66891&Page=1#66978[^]
Looks like I will be upgrading after all!
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
hi ,
i have created a software in VB.Net.
can anybody plz help me how to deploy it so that it can run under WINDOWS NT 4.0.
i specially want that software to be deployed and run under Windows NT 4.0
thnx
Aakash.
|
|
|
|
|
Hey Aakash,
If your application is VB.NET Webform based, running on Windows NT series is simply impossible. It is out of question. Perhaps since, as far as I know, IIS/PWS on Windows NT can not process ASP.NET pages. The minimum criteria is Windows 2000.
Well! All Client Applications in C#/VB.NET would function in Windows NT. Package your VB.NET file as an MSI using Setup and Deployment project and you can deploy this on Windows NT workstation. One more thing: You may need to have Microsoft.NET Runtime to run the application. .NET Runtime is ~20 MB in downloadable size from Microsoft.
This should facilitate running of your VB.NET application on Windows NT. You may not need 132 MB .NET SDK over there if you are not going to do any development and the 20 MB runtime should do.
Did this solve your query?
Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
|
|
|
|
|
Hi,
I want to know whether it is possible to handle events raised by COM components in a windows service developed in .NET using VisualC#.NET . if it's possible, can someone explain me the way to do it? The component under question is an ATL component.
Thanking you in advance.
Thanks
Desai
|
|
|
|
|
Yes, it's possible even though there are several pieces to put together before you get anything working.
Subscribing for COM events using .NET is much like with standard C/C++ code : you request IConnectionPointContainer provided by the COM component, then enumerate all IConnectionPoint(s), sink those which are interesting, and your interface methods will be automatically called then.
For ready code snippets to play with, look up this site and the MSDN support KB with this keyword : UCOMIConnectionPointContainer. Here is an example[^].
|
|
|
|
|
hello
how would i write a game using .net to put on the internet
the sort of thing you could do using java applets
thanks
joe
|
|
|
|
|
|
Hi all,
I deployed a private assembly (non-signed) then later (signed) to a strong-named assembly using Assembly.Loadfrom with a URL. When I encounter Interop assemblies I was getting:
The assembly gets downloaded, but complains, WRN: Comparing the assembly name resulted in the mismatch: PUBLIC KEY TOKEN
All my assemblies are signged and imported references to introps assemblies are wrapped with the key file. Everything checks out in the manifest, etc.
But the problem lies with IE. It seems to have cached the old assembly, and never re-loaded. So clearing my IE cache, fixed the problem.
This seems like a bug to me. Since the new strong name assembly should have replaced anything it was being compared to. Very strange.
Anyway -- if anyone has an comments or experience, I'd welcome it.
Ingram Leedy
You can't depend on your eyes when your imagination is out of focus.
--Mark TwainURL file:///C:/Program Files/ElephantBackup/Client/AxInterop.SHDocVw/AxInterop.SHDocVw.EXE.
LOG: Attempting download of new URL http://192.168.1.31/Client/AxInterop.SHDocVw.DLL.
LOG: Assembly download was successful. Attempting setup of file: C:\Documents and Settings\Leedy\Local Settings\Temporary Internet Files\Content.IE5\P8KFPLGP\AxInterop.SHDocVw[1].DLL
LOG: Entering download cache setup phase.
WRN: Comparing the assembly name resulted in the mismatch: PUBLIC KEY TOKEN
ERR: The assembly reference did not match the assembly definition found.
ERR: Setup failed with hr = 0x80131040.
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
Ingram Leedy
You can't depend on your eyes when your imagination is out of focus.
--Mark Twain
|
|
|
|
|
I have recently started looking at .NET.
I have managed to use custom Designers and CodeDOM in order to generate statements inside the InitialiseComponent().
A simple example was a root designer with three radio buttons to set the background colour property. When you clicked on a radio button it created the relevant code in InitialiseComponents(). What I now need to do is:
- Create private member variables in the selected class
- Create the code for Properties.
- Create the code for Events.
If I could do all there purely from a root designer it will cut the development time of the components in my project.
Anybody have any ideas
|
|
|
|
|
Hi!
We have finished writing our app in c#.
Its cool, and it holds a video control from
VSnet controls.
Now, we can'T afford InstallShield, and were not
gurus. Can someone kindly guides us through the steps
we must take to make a good install...
we need to install the NET framework unto the clients machines
that all have different flavors of windows. and next we need to install
our app.
We need help!
Please, give us a hand, and show us in detail how
we can deliver on time our app. Thanks!
Orlanda
Coding is a family business
|
|
|
|
|
|
I was recently using the .NET bitmap class to create a copy of a bitmap by using the constructor to pass in the original bitmap. When I did this with a square bitmap (ie 10x10) Things worked fine. However, when I passed in a non-square (10x12) bitmap the pixels were scrambled in odd ways.
It was simple enough to get around the problem, but I was just curious if this is a known bug in the framework, or is there simply something I am failing to consider when using this technique, (or am I having LSD flashbacks)?
"Any clod can have the facts, but having opinions is an art."
Charles McCabe, San Francisco Chronicle
|
|
|
|
|
Stan Shannon wrote:
However, when I passed in a non-square (10x12) bitmap the pixels were scrambled in odd ways.
It was simple enough to get around the problem, but I was just curious if this is a known bug in the framework, or is there simply something I am failing to consider when using this technique, (or am I having LSD flashbacks)?
What is the problem and how did you get around it? I have never seen that happen, although the loaded JPEG was rather simple (just a background).
Who is this miscrosoft, and what devilish plans have they for us?
|
|
|
|
|
The problem was that the bitmap resulting from the this:
Bitmap bmp2 = Bitmap( bmp1 );
produced a scrambled pixel pattern if bmp1 was not a square bitmap. If is was square (i.e. 10x10) things were fine.
I got around it by simply processing the original bitmap and not using the above code. (I did not need to store the original but was just experimenting with the second bitmap). I did not attempt to clone the original so I don't know if that would have made a diference.
"Any clod can have the facts, but having opinions is an art."
Charles McCabe, San Francisco Chronicle
|
|
|
|
|
Web site: http://test.labdotnet.com/GenuineChannels/GenuineChannels.html
Genuine Channels implement bidirectional TCP channels (for .NET Remoting infrastructure) that solve the primary problem of native tcp channels and all sequential issues. Also they implement some features that help to build durable, viable and stable client-server solutions.
Brief explanation
Microsoft .NET Framework implementation of TCP channels allows using TCP channel only as a server or client connection. If you want to provide feedback from the server to client, server must connect to the client’s port. This scheme consumes two TCP sockets and is not workable if client is behind NAT or Masquerade server. Also, native implementation closes TCP connection after non-customized period of time.
Genuine Channels use the only connection from the client to the server. There is no problem if client is behind firewall, NAT or Masquerade server. Also, Genuine Channels implement some features to help building durable, viable and stable client-server solution.
Features
Only one TCP connection is used between client and server.
Fully compatible with .NET Remoting infrastructure.
Each connection has queue of messages being sent.
Constraints on the queue are possible. It greatly helps to force reconnection if current connection is too slow.
Automatic client reconnection to the server. Server and Clients does not lose messages during reconnection. It’s very useful if your server must talk to the client.
Full support of sync, async and one-way messages.
Adjustable timeout to wait for reply from the remote host.
Real async processing. You can have any number of threads at a server and at a client that will automatically use the same TCP connection.
Each exception has unique identifier that simplifies centralizing error processing or translating error messages to any language.
Automatic ping to check TCP connection if connection has not been used for (by default) 120 seconds.
Detailed logging system that receives all events and can save even the entire incoming and outcoming TCP streams as well as exceptions, stack traces and object’s guids. You can write your own logger and attach it to the system.
Dmitry Belikov.
|
|
|
|
|
Developing a network file backup application and need to
be able to see all machines on a network, select
drives/dirs/files for backup.... currently, I have an app
similar to Windows Explorer, with a treeview to look at
my own computer's data, with no problems... need to
add "My Network Places" to this (similar to Windows Explorer)
and be able to go out on
the network and get similar info for other
workstations.. plus I need to be able to create folders
and copy files to these PCs... I think I'm kinda close
with System.DirectoryServices and System.Management, but
can't seem to find what I'm looking for... any help or
suggestions would be much appreciated... thank you.
|
|
|
|
|
Is there someone who can tell me how to create the effect equivalent to Java's Flow Layout Maneger? In my concrete case, I would like to have a single column listview, where the elements are thumbnail images, similar to the standard UI presented by PowerPoint.
Thanks in advance
|
|
|
|
|
Is there a way to compile to native code rather to MSIL.
The problem with MSIL is its an open code, where everyone can just look at what you wrote, and beside that , native code will save the time of the compiling at run time, therefor it will be faster.
So is there a way to tell VS.NET to compile the code to native?
Amir Harel
My boss always tell me: Why we always search for the generic solution for a specific problem...
|
|
|
|
|
To try to get ahead on speed look into using ngen.exe.
Not sure if it affords any safty from decomp though, just a speed increase.
The only thing that can protect the IL is an obfuscator.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
|
|
|
|
|
From what I have heard, you have an obfuscator part of the VS.NET 2003 package.
|
|
|
|
|
Can they span multiple assemblys (sp)? I am assuming that they can, but can’t seem to find anything that says definitively 'YES'. I will admit that it is late and I am probably not searching right on Goggle... but I just can't find it...
Also, Are there any recommendations for namespace hierarchies? I am considering:
[company_name]
[app_name]
[section_name1]
…..
[section_name2]
I assume that if I set the root namespace for each project to [company_name] then preced each class with the ‘namespace’ directive for [app_name] I can then nest the [section_name] namespaces inside of that.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
|
|
|
|
|
Ray Cassick wrote:
but can’t seem to find anything that says definitively 'YES'.
'YES'
This is used extensively throughout the framework, especially when you look at the assemblies that are meant to assist development (System.Design.dll).
Ray Cassick wrote:
I assume that if I set the root namespace for each project to [company_name] then preced each class with the ‘namespace’ directive for [app_name] I can then nest the [section_name] namespaces inside of that.
Pretty much
James
"It is self repeating, of unknown pattern"
Data - Star Trek: The Next Generation
|
|
|
|
|
|