windows

Overhead of DLL

Hi All I have a quite basic question. When a library is used only by a single process. Shall we keep it as static library..? If i use library as DLL,But only a single process use it . what will be overhead Thanks Sat ...

State of static variable in DLL

Scenario: My Application bind a library X which has static class. I initialize it in my process. After some time when I load a dll which also use same library X. I see content of static variable in dll is not initialized. Where I already initialized it in process before loading DLL. I added initialization code in DLL main , and its ...

Windows phone Navigation issue

Hi, I have an application where from the MainPage.xaml I navigate to a page called say two.xaml. In Two.xaml I then navigate to Three.xaml.. Now for Three.xaml I want to navigate back to the mainPage.Xaml. In Three.xaml if I do this.NavigationService.GoBack(); this.NavigationService.GoBack(); I get an InvalidOperationException. If ...

How to set PATH to use Java and Python simultaneously

Hi, I was just wondering if there was any way to set to %PATH% variables so I can compile my Java code, along with my Python code? For instance.. PATH is currently C:\ ... JDK_bin blah blah, and that's it. To run my python code, I have to change my path variable completely. Any answers? ...

Visual C# 2010 Express: Same Form But Different Size on Win7 and WinXP

Hi, I'm using Visual C# Express 2010 both on my Win7 and XP. I have a Windows Form Application project, and there is SevenXPForm (inherits Form). I created it in Visual C# Express 2010 on Win7, and in the Properties panel, I set .MinimumSize = 300, 300 .Size = 300, 300 And a TabControl is in the middle of the Form: However, when...

Running redcar 0.8.1 on Windows 7 x64

I am trying to get redcar to run on a windows 7 x64 box but I am getting the following error: Redcar 0.8.1 ( java ) Error loading plugin: <Plugin swt 1.0 depends:[dep(core >0)] 0 files> cannot link Java class org.eclipse.swt.widgets.Display, probable missing dependency: Cannot load 32-bit SWT libraries on 64-bit JVM c:/devtools/jrub...

How to add a custom button to windows' minimize/maximize/close (x)

Hi, I was wondering if there is a way to add (programatically, of course) an icon/button/whatever besides plain text to a window (Microsoft Windows window...)'s title bar or next to where the minimize/maximize/close buttons are. I could draw it myself and create an illusion it is a part of the window, but I wonder if in the user32 api t...

Recommended tools for porting 32-bit Windows driver to 64-bit one

I know that there are some static analysis tools which can figure out potential code problems in terms of porting from 32-bit system to 64-bit one. But most of them are commercial ones, is there any equivalent tool but free to use? Manually checking every line of the driver code is simply too tedious and error-prone, and if, unfortunate...

Executing DOS commands from Java

I'm trying to read a file from the user, in which each line is a DOS command, and run it (it's okay to assume the commands are legal), but when I give a command like echo hi, I get runtime exception error: Exception in thread "main" java.io.IOException: Cannot run program "echo": CreateProcess error=2, The system cannot find the file...

How can I execute an SQLite statement in C++

I have the following command which works fine on Linux Console. But to get the result to a cpp file I have to store it to file and then read it. But is there a way I can directly execute this command in C++. /usr/bin/sqlite3 /etc/myDB/db/share.db "select path from folder_info where ftp='YES'" ...

Using the ALT key with PyGame

Hi guys, I'm looking to detect the ALT key in PyGame, but every time I press it, it will bring up the menu that you normally get if you click the icon at the upper left of the window (Restore, Maximize, etc). How do I get PyGame to recognise the keypress, rather than the window? many thanks ...

how can I make window sdk's setenv.cmd work globally, instead of a single cmd window?

Greetings, I feel kinda stupid for asking this, but I want to set the windows sdk build environment so that any process (including some non MS developer tools) can access the correct setup, without me trying to inject setenv.cmd /x86 into every process's startup. I can't seem to find the right search terms for this, and I don't want t...

How to make InMemory.db a Memory mapped file and use it as database in MFC

I have to use InMemory.db in my project but the performance is slow the InMemory.db size is 10 MB. Some queries which retrives more than 30000 records take a lot of time. Is their any way i can improve the performance. How to make InMemory.db a Memory mapped file and use it as database in MFC. An example will be very helpfull? ...

Windows TCP Handshake Problem

I am trying to create a TCP connection from an embedded controller to a Windows Vista server. I am writing the Windows server part of the application. When the controller attempts to connect, it can take many attempts to establish the connection. I have used Wireshark to debug the problem and it appears that the Windows TCP stack is not...

How to create a Microsoft Windows Child window using JNA

Hi, I have spent some time trying to create a child window of an existing window by using the following piece of code on JNA (Java Native Access) but I guess it is pretty much the same with every other programming language trying to use Windows API. Here is my declaration of CreateWindowsExA : public int CreateWindowExA(int i, Strin...

Why is my COM factory never released during the program lifetime?

I have a native C++ ATL in-proc COM server. A separate test program calls CoInitialize(), calls CoCreateInstance(), then calls Release() on the pointer, then calls CoUnitialize() and exits. If I run the test program under Visual C++ debugger the debug CRT reports a single memory leak and each time the allocation number is the same. ...

ASP.NET App Exports to Excel (or not in this case)

Hi All, Exising .net 2 app migrated to .net 4 and moved to an IIS7 Windows 2008 R2 server. We used to be able to run some code on the web page to export some stuff to excel. Now, when we do... we get the following error: The machine-default permission settings do not grant Local Activation permission for the COM Server application wi...

On windows _fseeki64 does not seek to SEEK_END correctly for large files.

I have reduced the problem to the following basic function which should simply print the number of bytes in the file. When I execute it for a file of 83886080 bytes (80 MB) it prints the correct number. However for a file of 4815060992 bytes (4.48 GB) it prints 520093696 which is way to low. It seems to have something to do with the SE...

Executing another EXE under the same process of the calling EXE

I have one EXE (built in .Net) running on windows. When it runs, it'd get another EXE from server and execute under that same process. Using Process.Start I can execute the server EXE after dowloading but that'd start a new process with an extra step of downloading the EXE residing on the server. But I wanted a better solution. ...

Why does my ASP.Net site running under IIS7 take so long to load after a period of inactivity?

An ASP.NET webpage will take maybe 10 seconds or so the first time the page is loaded, which is understandable since stuff is getting JIT'ed and app domains being loaded, etc. The next requests take only half a second or so. However, if no one hits the site for a few hours, the first request after such a period of inactivity will take ...