managed

How is Bean's property referenced?

I have something like that: faces-config.xml <managed-bean> <managed-bean-name>aBean</managed-bean-name> <managed-bean-class>some.pack.Bean</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean> I have a bean and in jsp page I have something like value="#{aBean.someBoo}". But I dont have such prop...

A completely managed database solution?

Hey, I'm looking for an open source database engine, that is completely written in C# (no any native dll, not mixed mode, etc...). It should support basic actions on tables (INSERT, UPDATE, SELECT, DELETE and TRUNCATE) and transactions. SQL support is not needed. Thank you. ...

Marshalling what is it and why do we need it?

What is marshalling and why do we need it. I find it hard to believe that i cannot send an int over the wire from c# to c and have to marshall it. Why cant c# just send the 32bits over with a starting and terminating signal, telling C code that it has received an int. If there are any good tutorials or sites about why we need marshallin...

handling Security Messages in .net WebBrowser Control

I am attempting to write a VB.net application which will allow users to create their own widget plugins in html/jscript and i would like to set my own security options in the applications settings allowing users to choose what can run or not eg scripts, flash, activex. I would like to allow activex controls to be used without the window...

Initialize unmanage struct from managed code (C#)

I have a structure in C++ that I want to reflect in C# code (goover all field and initiate with specific order) that I want to dump the structure memeory as binary data into a file. I have a problem in array decleration in the sturct if I declare int dummy_4[10] the compiler raise error that can't mix managed & unmanaged types. if I dela...

How do i prevent my code from being stolen?

What happens exactly when I launch a .NET exe? I know that C# is compiled to IL code and I think the generated exe file just a launcher that starts the runtime and passes the IL code to it. But how? And how complex process is it? IL code is embedded in the exe. I think it can be executed from the memory without writing it to the disk wh...

Windows Controls or .NET objects as Global Variable in Visual C++

Hi, I'm Writing a C++ Class. I want to keep a global variable in System::Windows::Form::Control type or a .NET managed objects. I want to process somethink on this global variable. But Visual C++ is not allowed this. Returning Error is: "global or static variable may not have managed type" May be this error interest Garbage Collector...

System.AccessViolationException when calling C++ from C#

Hello, I don't know why but today myOpenID doesn't seem to work. Anyway ... I have this problem: I have a unmanaged C++ library (DLL) which I have to embed in an existing C# project. Now ... I have created a mini-wrapper (DLL) in managed C++ which calls the library so that I can load it from the C# code and, when I try it from a command-...

Performance of Calling Unmanaged .dll from C#

How long is the typical overhead added by calling a .dll written in C++ from a C# application using the following syntax? [DllImport("abc.dll", EntryPoint = "xcFoo", CallingConvention = CallingConvention.Cdecl)] public extern static Result Foo(out IntPtr session, [MarshalAs(UnmanagedType.FunctionPtr)]ObjectCallback callb...

When using .Net Interop (generated with TlbImp) my COM object refuses to execute in surrogate (dllhost)

This is very odd. We have some managed C++ (an assembly) which uses a .NET COM interop dll generated by TlbImp to make calls into a COM object. When we register the COM DLL we specify that we want it to execute within a surrogate (the "DLLSurrogate" registry entry). Our COM DLL is 64-bit and is executing on a 64-bit platform. When we ...

Managed c++ std::string not accessible in unmanaged c++

In unmanaged c++ dll i have a function which takes constant std::string as argument Prototype : void read ( const std::string &imageSpec_ ) I call this function from managed c++ dll by passing a std::string. When i debug the unmanaged c++ code the parameter imageSpec_ shows the value correctly but does not allow me to copy that value...

Core Data: Merging multiple Managed Object Contexts and deleting objects

I have an iPhone project where I have a series of Managed Objects in a Managed Object Context within the main application thread. On a separate thread, I import new objects from a webserver into a second Managed Object Context. If the import goes ok without errors, I save the import context. This triggers contextDidSave from which I c...

How can I declare constant strings for use in both an unmanaged C++ dll and in a C# application?

Curently I'm passing my const string values up from my C++ into my C# at startup via a callback, but I'm wondering if there's a way of defining them in a C++ header file that I can then also refer to in C#. I already do this with enums as they are easy. I include a file in both my C++ library project (via a .h file with a pragma once at...

How do package managed C# dlls with a managed C# application without leaving behind files?

I've read through the two other threads that extract the dll from the application at run time. One of these methods used the current Windows temporary directory to save the dll in, but it was an unmanaged dll and had to be imported at runtime with DllImport. Assuming that my managed dll exported to the temporary directory, how can I prop...

IIS7 Modules - managed or native?

Hi all, as the old ISAPI filters are going to die sooner or later, I want to rewrite an old ISAPI filter that was used in IIS 6 into a module for use in IIS 7. The module will be used globally, meaning it will be used within each site, on a Windows Server 2008 R2 with IIS 7.5 installed, that will host several thousand web sites and manag...

Using unmanaged code from managed code

Hi I have my project developed in MFC which is unmnaged code. Now i need to create a similar application in C#, by reusing most of the MFC classes. Is it possible to directly export class/struct/enum from MFC dll, so that i can import it in my C# using dllimport and use it.? ...

SuppressUnmanagedCodeSecurity At Class Level

If I add the [SuppressUnmanagedCodeSecurity()] attribute to a class, is it equivalent to adding it to each function in the class? ...

Blittable Vs. Non-Blittable in IL

I'm trying to make sure that my Managed to Unmanaged calls are optimized. Is there a quick way to see by looking at the IL if any non-blittable types have accidentally gotten into my pinvoke calls? I tried just writing two unmanaged functions in a .dll, one that uses bool (which is non-blittable) and one that uses ints. But I didn't s...

copy unsigned array from managed to unmanaged

Marshal.copy allows for signed data types only, but I have a giant array of uint16 to pass to IPP code. Any ideas ? unsafe for looping on it seems wrong ... ...

StackOverflow Exception in Umanaged Dll When Called from Managed DLL

My question is similar to this one here, but there are some difference. I have a fortran dll as the backend, and a C# exe as the front end. I use PInvoke to pass data between them. There are 22 parameters between the C# and the fortran code. And some of them are integer, double, pointers ( C# pointers), array and whatnot. So it's a m...