Common Language Runtime,95 - .NET Development,
Recent update: 2008-3-21

Where is ICLRRuntimeHost::GetDefaultDomain?

337 byte By LeonFinker at 2008-3-7
I'm trying .NET Beta 2 CLR hosting. Why is there no ICLRRuntimeHost::GetDefaultDomain? QI for IID_ICorRuntimeHost on ICLRRuntimeHost returns E_NOINTERFACE. Calling CorBindToRuntimeEx twice is not allowed to get both pointers. Is this just for beta2? How would I create/manipulate AppDomains ...

Could I NGEN my application before add it into the setup package?

235 byte By LeiJiang at 2008-3-6
It seems the NGEN is used after the program is installed on target machine? Could I NGEN my program, add it into the setup package, and distribute the package so that the end user will not cost his time on waiting the ngen processing?

Obtaining ModuleID

258 byte By VitalyPimenov at 2008-3-5
Maybe someone knows any technique to obtain ModuleID of some module in .NET Profiling API 2 when all information we have is it's metadata token - mdModule and IMetaDataImport2 interface. Of course also we can use ICorProfilerInfo2 methods. Thanx.

Which one of the following statements is true about type safety?

297 byte By Rahul at 2008-3-5
Choice 1 All CTS constructs are type-safe. Choice 2 All CLS constructs are type-safe. Choice 3 All MSIL constructs are type-safe. Choice 4 All constructs created by a managed code compiler are type-safe. Choice 5 CTS constructs are type-safe if they are not CLS compliant.

Delegates, function pointers, and evil unmanaged code that should die

7717 byte By 280Z28 at 2008-3-3
I'm trying to write a plugin for a popular program in C# instead of C/C++. I decided to make an API so people could easily write these plugins in C#. The basic requirements are as follows.Make a dll that exports the following two functions:extern "C" int __declspec(dllexport) plugin_version( ...

Getting size of class

322 byte By VitalyPimenov at 2008-3-1
I'm trying to determine shallow size of some class, I mean corresponding System.Type's instance size. Unfortunately I've got only ClassID of given class and using GetObjectSize function with ClassID as a parameter causes crash. Maybe there is a way to obtain ObjectID of needed System.Type's ...

How do I: Get Security Descriptor - System.DirectoryServices

1209 byte By RussellMangel at 2008-2-28
Question:How do I get a Security Descriptor from Active Directory Entry.Comments:The code below shows what I want to happen, however it does not work because the DirectoryEntry class returns a COM Ojbect, throws Exception.MyCode:DirectoryEntry de = new DirectoryEntry("<a target="_blank" ...

inaccessible interface?

555 byte By LeiJiang at 2008-2-27
My class (THPMSBridge.RealtimeNetworkState) implements a interface "INetworkState" in another assembly, and this causes a exception during runtime: A first chance exception of type 'System.TypeLoadException' occurred inSystem.Windows.Forms.dllAdditional information: Type ...

Custom SettingsProvider class

551 byte By RandalGreene at 2008-2-26
Am using VS.Net 2005 beta 2 and trying to implement a custom SettingsProvider class. Have implemented the methods ApplicationName, Name, GetPropertyValues, SetPropertyValues and Initialize, but when I decorate the Settings class with the custom provider the first call to retrieve one of the ...

How do I temporary override .NET system security configuration?

2329 byte By Lino at 2008-2-25
I have an application installed on my local disk. This application runs with FullTrust privileges. I'm trying to load an assembly giving it FullTrust (same privileges of the loader assembly). My assembly to load is located on a network share. I'm actually using this code but I get a security ...

FileSystemWatcher changed event

1127 byte By wyattblake at 2008-2-24
I'm trying to monitor for new lines (represent orders) in any files in a directory using FSW. Everything works fine except when a new file is created in the folder. When it is created I get two Changed events. If the file exist I only get one. The problem is that the lines of text represent ...

.NET 2.0

506 byte By PolarBear at 2008-2-23
Does anybody know if the new .NET will have statistical functions? I'm talking about being able to use functions similar to what you can in Excel. I'm currently working with .NET 1.1 and VS 2003, and yesterday I easily found "Confidence()" in Excel to handle Confidence Intervals but the only ...

Problem getting assembly probing working in beta2

3122 byte By MarcusCuda at 2008-2-22
Hi All, I am using .NET 2.0 beta2 and I cannot get assembly probing working. I want to put all 3rd party dlls into a subdirectory named lib. I created an app config file (see below) and pointed the private path to the lib directory. When I start up the app, I get a file not found error. Using ...

Windows Services Multiple Install

627 byte By baysbenj at 2008-2-22
Hopefully this is the right forum.Basically, the problem that I am is that i am writing a windows service that I am going to deploy onto a server. The purpose of the service is to query multiple databases, do some data processing and the store the results into a seperate database. As I am ...

mscorlib::_Array

673 byte By DarrenStones at 2008-2-21
Hello All,I have followed the documentation on COM Interop. I have declared a method on a class and exposed it to COM. This method has a parameter of the type System.Array. When I write a COM client to use the "marshalled" version of the System.Array (mscorlib::_Array), the definition for this ...

Problem passing OBJECT to a COM server

4776 byte By r.guerzoni at 2008-2-20
HiI have an ATL COM Server that accepts an argument of type variant*.With VB6 we haven't problems, passing to VB.NET the server method fails because the data is always VT_EMPTY.// MIDL -- [id(6), helpstring("method ResponseArray")] HRESULT ResponseArray([out] LONG* Slave, [out] LONG* Function, ...

problem with a reparse point

2006 byte By Frdo at 2008-2-20
Hi,I'm getting crazy with this.To create a reparse point I need to feel this structure according to the doc:[StructLayout(LayoutKind.Sequential,Pack=4)] public struct REPARSE_DATA_BUFFER{ public uint ReparseTag; public short ReparseDataLength; public short Reserved; public short ...

CLR assembly error

642 byte By MeMyselfNDotnet at 2008-2-20
Hi All, I have a WebServices, which is working fine, but i need to expose this webservices as a COM+ object (Enterprise Services) and my codes should reference this COM+ instead of the web services (existing), to use the methods inside it. When i tried to create a sample COM+ object and try to ...

.NET FrameWork version used.

5837 byte By MarkCooper at 2008-2-19
Hi I have an assembly that is built against the mscorlib 1.0.3300.0 .NET 1.0 that is using the System.Environment.Version to determine which version of the Framework it’s using to generate source code correctly. (Were to include the Strong Name key file in the assemblyInfo.cs file or on the ...

.NET UI Application Crash

686 byte By NZDev at 2008-2-18
Hi,We have a vb.NET client UI application which calls a number of web services.The application is intermittantly crashing completely without any evidence of an exception etc.The application is single threaded for the most part, the only area that deviates is a class managing serial port comms ...

Getting dimensions of array from MetaData

420 byte By VitalyPimenov at 2008-2-17
I'm trying to obtain multidimensional array a[x1,x2,x3,...,xN] properties from unmanaged metadata signatures using IMetaDataImport interface and CorSigUncompressData method. I can successfully get array rank - N. But while getting number of elements in any specific dimension I get only ...

Obtaining the IntPtr to/of an unmanaged resource.

970 byte By Andeezle at 2008-2-16
I want to make something clear, I'm not a fan of using COM objects from managed code unless I have no choice as usually dictated by the situation here at work... Now for my question:I'm using the Microsoft Access 8.0 Object Library from inside VB.NET 2003. Correct me if I'm wrong but this is ...

A problem of CLR Profiler

275 byte By LeiJiang at 2008-2-15
CLR Profiler is a very nice tools. I often use it to detect if there is any memory leak in my program. However, I find sometimes it shows nothing when I click "Show heap now". How can I detect memory leak in such situation? Or how can I make it always works normal? Thanks!

Installing a dll into GAC

951 byte By Deadman at 2008-2-15
hi all,somebody plz help me............i have to install a dll which i build in VC++2005 into GAC but fail to do so.when i run gacutil from command line,it saysFailure adding assembly to the cache: Strong name signature could not be verified. Was the assmbly built delay-signed?.but i built the ...

dll file is getting locked even after the domain in which it is loaded is unloaded

1003 byte By ramneek at 2008-2-15
hi,i am having a problem with dyanmic loading of assemblies.the problem is that the dll file is getting locked even after the domain in which it is loaded is unloaded.The code below shows a dll search being loaded in domain appdomain.then we get a specific type from the dll and unload the ...

IDisposable Interface - disposing managed and unmanaged resources

825 byte By papadi at 2008-2-15
Hi! I'm using VS2005 beta 2 and VB. I would like some help on understanding what is the correct way to use the IDisposble interface. After adding the Implements statement, some code is automatically added in the class. In the Dispose(boolean) method, there are two sections to dispose managed ...

Marshal.Copy(IntPtr to IntPtr) why is it missing :( in CLR

761 byte By PetarPetrov at 2008-2-15
Hello, I am striving after Marshal.Copy(IntPtr src,IntPtr dest) implementation! I need a platfrom independent functionality of block copying in unmanaged heap. The requirements exclude the use of unsafe pointer like operations as well as invocing Win32 specific functions. So far I am doing with ...

Calling unmanaged c++ dll's and lib's into c# using visual studio 2005 beta

642 byte By savadi at 2008-2-14
Hi, i would like to find out what are the ways to call unmanaged c++ dll's and lib's into c# using visual studio 2005 beta. I have tried many ways like using p-invoke and adding through reference but none of these methods seemed to do it for me. Are there any easier ways to perform this ...

A Question on GC

956 byte By LeiJiang at 2008-2-14
I have a MDI program in which user can open different document and edit it. After several user use it, they report that it becomes more and more slow. So I watch the memory usage of it carefully and found a problem : it seems the memory is never released after a document is closed. I watch the ...

problem with GCHandle.alloc()

798 byte By Amethyste at 2008-2-13
this is my structure: [StructLayout(LayoutKind.Sequential,Pack=4)]struct TMN_REPARSE_DATA_BUFFER{ public uint ReparseTag; public short ReparseDataLength; public short Reserved; public short SubstituteNameOffset; public short SubstituteNameLength; public short PrintNameOffset; public short ...

How can I know the reference count of an object?

274 byte By LeiJiang at 2008-2-13
To diagnose memory leak problem, it's convenient to know the "reference count" of an object. Is there any API that could let me I know that? e.g.: object obj = ... ... int count = GetReferenceCount(obj); if (count > 0) { Debug.WriteLine(...); }

A question on the new CLR Profiler for .NET Framework 2.0 Beta2

217 byte By LeiJiang at 2008-2-12
I notice that there is a new release of CLR Profiler for .NET Framework 2.0 Beta2. However, there is also a profiler in Whidbey Team System Beta2. What's the difference between them? Which one should I use? Thanks!

pass authentication information with file read request to a network computer

744 byte By bilalso at 2008-2-11
I am writing a windows application in which I am trying to access a file on a network computer and it is obviously throwing authentication exception "Logon failure: unknown user name or bad password" I am not sure how to pass authentication information in code below ? try{string fname = ...

environment properties

239 byte By ParamR at 2008-2-10
<div>Hi all, how can I retrieve the following properties from managed code in vb?</div> <div>1. App Domain Name</div> <div>2. Thread Name</div> <div>3. Process ID</div> <div>4. Process Name 5. Dll Name & Code Line thanks!</div>

Configuration Sections

1908 byte By JeffMason at 2008-2-10
Hi,I've just started playing with VS2005. We currently have a VB.NET application which uses a custom config section implemented by declaring a class which implements the IConfigurationSectionHandler interface and which was invoked by declaring it in the <configSections> section of ...

Event Log Problem

607 byte By codefund.com at 2008-2-8
Hi,I am trying to test event logging in .net. Here is the sample codeDim EventLogName As String = "Test" If (Not EventLog.SourceExists(EventLogName)) Then EventLog.CreateEventSource(EventLogName, EventLogName) End If Dim Log As New EventLog Log.Source = EventLogName ...

Getting System.Type from static method

445 byte By codefund.com at 2008-2-8
Is it possible to get the System.Type of a subclass from a static method in an abstract class?public abstract class MyBase{ public static void MyMethod() { //Get System.Type here? }}public class MyDerived: MyBase{}When I callMyDerived.MyMethod();Is it then possible to get the type of MyDerived ...

SignedCms in VS.2005 is very slow, signed data is not compatible with CAPICOM 2

694 byte By jimmyshu at 2008-2-7
Hello, Did some body used VS 2005(c#) to sign data or verify signature functions ?I tried sign a data and verify signature sample on MSDN ( Signing a Message by One Signer ), it seems this sample is very slow, I used CAPICOM SignedData function to sign 10M string, it used 1 second on my ...

Unhandled exceptions will always be fatal to a process?

1769 byte By HasaniBlackwell at 2008-2-7
Ok, http://www.gotdotnet.com/team/changeinfo/Backwards1.1to2.0/default.aspx#00000097 states that in v2.0 "Applications that throw unhandled exceptions on threads other than the main thread (or ones that come into the runtime from the outside) will crash rather than continue running (potentially ...

WMI Performance Counters

660 byte By MarkA.Richman at 2008-2-7
How would I go about monitoring the CPU% of a process (possibly multiple instances) by name (i.e. foo.exe), and reacting to a condition where the CPU% exceeds a certain threshold? I am looking into the WMI performance counter classes for some insight, as well as the "cooked" counters. Ideally, ...

Server GC in VS 2005 Beta 2?

794 byte By RobertBigelow at 2008-2-7
I've recently been reading up on the garbage collector in .NET and discovered that there is a workstation version of the gc and a server version. Earlier versions of Whidbey apparently allowed the server gc to be enabled via an app.config item that looked like this... <runtime> ...

How to configure .NET 2.0 Framework in IIS

1302 byte By Beat at 2008-2-6
I have uninstalled a previous Beta-Version of the Framework (v2.0.40607) from A server and installed the new Framework v2.0.50215. How do I configure IIS to use the new framework? Under the old Beta-Version, I had a nice tab when clicking the properties of the Web in the IIS console. I do ...

2 projects same solution

966 byte By spids at 2008-2-6
my solution is set up: Solution | --vbProject | |--References | |--cppProject | |--mscorlib |--cppProject | |--References | |--vbProject | |--mscorlib i've also been playing around, keeping it simple right now i get complier" error C2065 'objVB' : undeclared identifer" my code is like this: ...

How do I install Net Framework Beta 2.0 on Web Sever without Visual Studio?

422 byte By Beat at 2008-2-5
I want to install the Framework on a Web-Server without installing Visual Studio 2005 Beta 2.0Having installed dotnetfx.exe (from MSDN\DotNetFramework on the BETA-CD) I do not have the .NET Version-Selection available under IIS as I used to have on the older Beta. (yes, I deinstalled the older ...

Remoting (PerformanceCounterCategory class)

583 byte By ShoaibAleem at 2008-2-5
hello:i want to get the Performace counter categories of the remote PC. i am using the PerformaceCounterCategory.GetCategories(string machineName) method for retrieving the desired info. But every time i get an error of "Access Denied". I don;t know why it is so?I have tried remoting for this ...

How do I Install the .net framework 1.1 onto a removeable drive

687 byte By KSC1 at 2008-2-4
HiI have written an application on a standard desktop using Vb.net 2003 running under XP Pro SP2. I am trying to install the application onto an embedded Pc which uses a Compact Flash drive (4 GB Microdrive) as the boot C drive (running same XP Pro SP2).The problem I have is that when I start ...

non-microsoft web forum for .net

102 byte By sllxnbierwl at 2008-2-4
hello: is there any other name online non-microsoft forum site to be for .net programming thanks.

system dependency of web app

185 byte By sllxnbierwl at 2008-2-4
hello: i want to have a neat sample for demonstrating the 3 tier(web-midtier-database)app,what is the system dependency,i wish sb might provide me the link any tips is welcommed.

new to .net

61 byte By sllxnbierwl at 2008-2-4
hello: what is the new in visual studio .net 2005

My program hangs until SetProcessWorkingSetSize is called or app. minimized

749 byte By Gorbuz at 2008-2-3
Greetings Full description of the problem you can see here: http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=16535 My program generates "phantom" thread (neither one of my threads, nor one of async completion threads) after a few hours of normal work, and that thread consumes 100% of CPU ...

.NET Development

Site Classified