Recent update: 2008-3-21
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 ...
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?
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.
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.
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( ...
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 ...
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" ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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, ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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!
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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(...); }
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!
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 = ...
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>
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 ...
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 ...
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 ...
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 ...
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 ...
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, ...
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> ...
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 ...
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: ...
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 ...
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 ...
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 ...
hello: is there any other name online non-microsoft forum site to be for .net programming thanks.
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.
hello: what is the new in visual studio .net 2005
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 ...