windows

How to get the code page of the current keyboard layout?

My non-Unicode application needs to be able to process Unicode keyboard input (WM_CHAR/etc.), thus receive the 8-bit character code then internally convert it to Unicode. 9x-compatibility is required, so using most Unicode APIs is not an option. Currently it looks at the language returned by PRIMARYLANGID(GetKeyboardLayout(0)), and loo...

Cron on XAMPP (windows)

I am developing a site locally using xampp. I would like to configure cron, so the dev environment is the same as the production environment. However, my system is windows vista. Is there any way to do this, or am I forced to accept that my dev and production environments will be forks? ...

Make windows batch file not close upon program exit

It's all in the title. When the program is over, I want it to say "Press any key to continue..." so I can scroll thru the output. ...

Move contents of a writable shared folder while someone possibly copying new files

In simple: How can I move files from a shared folder without interrupting a just-copying network user in the windows environment? Extended: We have two seperate network. Copying files from one network to other is done from only one point and it is done by IT people. I want to automate the copying process as follows: A pc(ServerA) in ...

Writing to Windows registry?

Hi, I develop a utility that has to write into Windows registry. I'm wondering if users who have not administrator rights, can write to registry. I tried the "HKEY_LOCAL_MACHINE" and it is locked. Is there any section in registry that these users can write into? If not - what rights are necessary for users to write into registry if they...

LsaEnumerateLogonSessions error

Hello! I have a Windows service which starts another application using CreateProcess. Thus, the application runs with SYSTEM privileges. This application calls LsaEnumerateLogonSessions, which returns the error code 8 (Not enough storage is available to process this command.). The service and the application are run under Windows 7 x64....

Windows equiv of the 'head' command

Is there a way to simulate the *nix head command in DOS? I have a file and I want a way to stip off the first n-lines of text. For example: D:\>type file.txt line one line two line three D:\>*[call to head]* > result.txt D:\>type result.txt line two line three ...

How would I handle a close request for in a non-windowed application?

I'm working on a C++ Windows application, that runs as a process but not a windowed application (does not have WndProc). It has it's own message loop, which is used to process a quit message, and that's how we safely exit the application from within it's self. What I want to do is somehow send a message to the process from another proce...

What is the best way to create a nested opengl canvas

I would like to write a library that draws some opengl on a given window handle. How can I initialize an opengl-context inside a given window? Is it possible to do that platform independent using SDL or some other library? ...

getsockopt sensible for SOCK_STREAM + BTHPROTO_RFCOMM ?

I'm connecting to a bluetooth socket like so, SOCKET s = socket(AF_BTH, SOCK_STREAM, BTHPROTO_RFCOMM); SOCKADDR_BTH bthSockAddr; bthSockAddr.btAddr = addr; bthSockAddr.addressFamily = AF_BTH; bthSockAddr.port = BT_PORT_ANY; bthSockAddr.serviceClassId = SerialPortServiceClass_UUID; if ( 0==connect( sOut, (sockaddr*)&bthSockAddr,sizeof...

SSL Certificate only works within Local Network

I am running windows server 2003 standard and have installed the ssl cert as per Godaddy's instructions. Let me know what information you need from me. Attempting to access the website securely outside of our network the page does not load. Thanks in advance! ...

Selecting TS redirected printer by name

I maintain an application running on Windows that allows the user to specify that certain reports are always sent to a specific printer. I am currently storing PRINTER_INFO_2::pPrinterName for each configured report into the registry. When the report is run, I use EnumPrinters() to locate the correct printer and pass the appropriate ...

Python sendto() not working on 3.1 (works on 2.6)

Hi! For some reason, the following seems to work perfectly on my ubuntu machine running python 2.6 and returns an error on my windows xp box running python 3.1 from socket import socket, AF_INET, SOCK_DGRAM data = 'UDP Test Data' port = 12345 hostname = '192.168.0.1' udp = socket(AF_INET,SOCK_DGRAM) udp.sendto(data, (hostname, port)) ...

Best Installer Packages in Windows

Hi guys, Can somebody give me a top 5 of Installer Packages Creator aside from WIX and MSI? The said installer creators has the folowing capabilities: Supports MSI Has scripting capabilities Custom/user-defined U.I. Has product-key or authorization-key capability Has a boot-strap loader for .NET frameworks Thanks in advance, Glenn ...

Windows 32-bit virtual memory page mapping issue

Hello everyone, I am learning from here about Windows 32-bit virtual memory page mapping, (I am targeting modern Windows versions, like Vista, Win 7, Server 2003/2008 32-bit versions.) http://blogs.msdn.com/ericlippert/archive/2009/06/08/out-of-memory-does-not-refer-to-physical-memory.aspx Two confusions, user space virtual memory ...

Windows/DOS Assembly - Simple Math

Hi there... I'm currently learning Windows/DOS assembly. I'm just making a small program that adds two base 10 integers, and outputs the solution to standard output. Here is my current code: org 100h MOV al,5 ADD al,3 mov dx,al mov ah,9 int 21h ret I'm confused as to why when that is compiled, I get the error: error: invalid co...

PHP exec on Windows Server 2008

I have installed PHP as a module in IIS on Windows Server 2008, am am having great difficulty trying to execute command-line programs from within a PHP script. I can execute the PHP code fine using php-cgi.exe and php-cli.exe, which leads me to believe that it might be a permissions issue. However, I can execute some commands, like shu...

Catching LoadLibrary() errors gracefully

I'm working on a piece of C++ software which runs on all Windows versions between Windows XP and Windows Vista. In my code, I developed a DLL which links against a standard library (the Qt library). Once my software is deployed, it's not unusual that the user doesn't have the exact same Qt build on his system but a slightly different con...

BHO or Command Button for explorer

Hi I am trying to develop a command button that would appear on windows explorer. I can do this for an NSE but what I want to do is make the button visible on every explorer window. I want it to work for windows 7 and vista. I know it is possible as I have seen office Groove do it, and I am not sure if I have to implement the IExplorer(...

How can I open a file found by File::Find from inside the wanted function?

I have code like below. If I open the file $File::Find::name (in this case it is ./tmp/tmp.h) in my search function (called by File::Find::find), it says "cannot open the file ./tmp/tmp.h reason = No such file or directory at temp.pl line 36, line 98." If I open the file directly in another fuction function, I am able open the file. C...