native

Marshalling to a native library in C#

I'm having trouble calling functions of a native library from within managed C# code. I am developing for the 3.5 compact framework (Windows Mobile 6.x) just in case this would make any difference. I am working with the waveIn* functions from coredll.dll (these are in winmm.dll in regular Windows I believe). This is what I came up with:...

Is there a GUI framework that uses HTML and CSS to build GUIs?

I mean, other than a browser, of course -- I'm talking about building native applications with HTML and CSS -- not web applications, but real native GUIs. I wonder if such a thing exists? And what do you think of such a beast? What would the pros/cons of such a system be? ...

ExecutionEngineException thrown when loading native dll

I have a 32-bit .net application that uses a native 32-bit DLL via DllImport(). The native DLL is our internal file analysis library, and I need to use it as porting it to C# would be a problem if people update it (other software uses it). The problem is that when I try to execute any method in the native DLL I get a System.ExecutionEng...

How to compile ocaml to native code

i'm really interested learning ocaml, it fast (they said it could be compiled to native code) and it's functional. So i tried to code something easy like enabling mysql event scheduler. #load "unix.cma";; #directory "+mysql";; #load "mysql.cma";; let db = Mysql.quick_connect ~user:"username" ~password:"userpassword" ~database:"dat...

How is application virtualization implemented?

I am trying to understand how software like App-V and sandboxie (http://www.sandboxie.com/) work. But for the life of me, I can't think of anything that could make this possible. How do they intercept API calls and trick the target software? If someone would say that it's just magic and pixie dust, I would believe them. Seriously though,...

Add 64 bit offset to a pointer

In F#, there's the NativePtr module, but it seems to only support 32 bit offsets for its’ add/get/set functions, just like System.IntPtr does. Is there a way to add a 64 bit offset to a native pointer (nativeptr<'a>) in F#? Of course I could convert all addresses to 64 bit integers, do normal integer operations and then convert the resu...

How to pass a file (read from Java) most effectively to a native method?

Hi, I have approx. 30000 files (1MB each) which I want to put into a native method, which requires just an byte array and the size of it as arguments. I looked through some examples and benchmarks (like http://nadeausoftware.com/articles/2008/02/java_tip_how_read_files_quickly) but all of them do some other fancy things. Basically I d...

Uncatchable AccesViolationException

Hi all, I'm getting close to desperate.. I am developing a field service application for Windows Mobile 6.1 using C# and quite some p/Invoking. (I think I'm referencing about 50 native functions) On normal circumstances this goes without any problem, but when i start stressing the GC i'm getting a nasty 0xC0000005 error witch seems unc...

Download File from Web C++ (with winsock?)

I need to download files/read strings from a specified url in C++. I've done some research with this, cURL seems to be the most popular method. Also, I've used it before in PHP. The problem with cURL is that the lib is huge, and my file has to be small. I think you can do it with winsock, but I can't find any simple examples. If you have...

Java native memory usage

Hi All, Is there any tool to know how many native memory has been used from my java application ? I've experienced outofmemory from my application : Current setting is : -Xmx900m Computer, Windows 2003 Server 32bit, RAM 4GB. Also is changing boot.ini to /3GB on windows, will make any difference? If is set Xmx900m, how much max nati...

jad for blackberry non-midlet application

Hi Experts, I am writing a regular application for Blackberry. I want to know, is there anything similiar to JAD for pure native blackberry application (no j2me) ? If JAD is applicable to regular BB app then please guide me to use JAD for it. Kind Regards -Durgesh O Mishra ...

Why is System.arraycopy native in Java?

I was surprised to see in the Java source that System.arraycopy is a native method. Of course the reason is because it's faster. But what native tricks is the code able to employ that make it faster? Why not just loop over the original array and copy each pointer to the new array - surely this isn't that slow and cumbersome? ...

Quartz Scheduler - Not running the task

I am working on scheduling the tasks using Quartz API. I tried scheduling notepad.exe and in the logs, I see the following line - org.quartz.jobs.NativeJob runNativeCommand About to runcmd.exe /C c:/WINDOWS/notepad.exe ... But the notepad is not coming up. Same is the issue with any exe or batch file. I also see the notepad.exe as a run...

In JPA, does rollback occur for the native queries?

I'm using JPA 1.0 with hibernate as my provider. Inside an entitymanager transaction, if a series of native queries are run (which include DELETE sql statements) and an error occurs, will the native queries rollback too on the error? I ran into a deadlock problem in an oracle database and I noticed that it left the database inconsistent...

Simple typemap example in swig java

I am trying to wrap a native C++ library using swig, and I am stuck at trying to convert time_t in C, to long in Java. I have successfully used swig with python, but so far I am unable to get the above typemap to work in Java. In python it looks like this %typemap(in) time_t { if (PyLong_Check($input)) $1 = (time_t) PyLong_...

Know if a variable is a native object in javascript

Hi, is there a way to know if a variable passed into a function is a native object? I mean, i have a function that requires only native objects as arguments, for every other type of variable it throws an error. So: func(Array); //works func(String); //works func(Date); //works func(Object); //works ... func([]); //Throwr error func({});...

When does an application crash silently and when does it crash with a "send report" in Windows Mobile

I noticed that there are at least two kinds of crashes in Windows Mobile Silent Crash The application crash but there is no "send report" dialog prompted by the OS Crash with "send report" The application crash and there is a "send report" dialog prompted by the OS As an addition, each of the crashes above sometimes cause the applica...

#include <string> adding ~43 KB to my exe

I'm using Code::Blocks to write my program and when I include <string> (or <iostream>) the size of my exe grows. My program is very simple and I need to keep it small <20kb. I'm pretty sure this is happening because of the C++ Standards Committee swapped the old .h versions for many new libraries without the .h. But how would I keep it f...

clickonce, adding native dll's, com free reg

Hi there I'm using regfree com to deploy an activex component with clickonce. The component is dependent on some native dlls that should reside in the same directory as the component. If I manually copy the native dlls to the install dir of the clickonce app ( I located the directory by using System.Reflection.Assembly.GetExecutingAssem...

JPA Native Query delete in

Hello, I try to delete a list of rows from a table using this Native Query: @NamedNativeQuery(name="WebGroup.DeleteIn", query="DELETE FROM WebGroup WHERE WebGroup.GROUP_ID IN (:IDsList)" getEm().createNamedQuery("WebGroup.DeleteIn") .setParameter("IDsList", groupToDeleteIDs) .executeUpdate();...