windows

Peer verifying with libcurl and SSL

I'm POSTing data to a HTTPS server using libcurl compiled with openssl using Visual Studio 2008 in windows and it all works fine with CURLOPT_SSL_VERIFYPEER set to 0. I've tried following http://curl.haxx.se/docs/sslcerts.html and just about every "SSL and SECURITY OPTIONS" option in the manual. I'm wondering what the right combination o...

How to control the mouse pointer outside our application

Hi, I want to control the mouse pointer with my application and be able to interact with other programs using my program, For example I want my application to be able to click on a button on another application How should I go about solving this problem? (Any programming language would work, also if you have any suggestion please let m...

How can an application load a DLL without its name?

I have disassembled a VB6 application that calls a function in a DLL library, but I can't find any reference to the DLL in the disassembly. How can the calling code load this DLL? It is dynamically linked, as I can observe the effects of removing and replacing the DLL. I'm using IDA Pro Free, the calling application is a VB6 app, and ...

Is it possible to create a Windows shortcut using PHP?

I'm writing a script to tidy up a bunch of media spread across my hard drives, and it works pretty well so far at home (on my Mac) as I use symlinks in a directory to give the impression that everything is organised in one location, whilst the actual data is spread across the 4 drives. Unfortunately, I have to use Windows at work, and o...

Best graphical source code diff viewer/editor for code comparison and merging?

The options for source code diff viewing/editing/merging seem to be: Free: Tortoise Merge Meld * WinDiff WinMerge * DiffMerge * KDiff AJC Diff Diffuse Commercial: Total Commander's Diff viewer * Beyond Compare * Delta Walker * Araxis Merge * Are there any other options? (Wikipedia suggests a few) What's your favorite tools fo...

Sync Content on Multiple Servers

We have a site which sits on two load balanced application servers (Win 2K3) which comprises a C#/ASP.NET app and a bunch of static content which changes on a daily basis. My question is, what's the best way to keep the static content in sync. In Win2K8 we'd be able to point both servers at a shared directory but not in Win2K3. Ther...

DLL function not exported: Unable to find an entry point named TestFunc.

I'm busy getting to know a tiny bit of C/C++, and interop with C#. I've checked several examples of creating a simple Win32 DLL and using this from C#, but when I try and call into my DLL, I get the runtime error: "Unable to find an entry point named TestFunc". My DLL looks like this, and I created it from a Win32 DLL project, with the...

Loading user profile from a service

In a service, I try to use the following code to launch a program : HANDLE hPipe; HANDLE hToken; PROFILEINFO stProfileInfo; char szUserName[64]; DWORD dwUserNameSize = 64; // Take the identity of the client ImpersonateNamedPipeClient(hPipe); // Retrieve the user name (DOMAIN\USER) GetUserNameEx(NameSamCompatible,szUserName,&dwUserName...

How can I atomically replace a file on a webserver so it's latest version is continually available?

I'm working on a project that generates Google Earth KML files and saves the file to a web-accessible directory. It's running on Windows with ActivePerl. (not my preferred platform but it's what I must work with.) The method I'm using for this is: write to temp.kml, use File::Copy to copy temp.kml to real.kml. This occurs once a seco...

uses undefined struct compile error - C

The compiler doesn't know where stat.h is? Error: c:\Projects\ADC_HCI\mongoose.c(745) : error C2079: 'st' uses undefined struct '_stat64' #include <sys/types.h> #include <sys/stat.h> static int mg_stat(const char *path, struct mgstat *stp) { struct _stat64 st; //<-- ERROR int ok; wchar_t wbuf[FILENAME_MAX]; to_uni...

nmake - simple question about escaping

Hi I'd like to make below nmake code to produce check.mak file with the following contents: $(A) instead I get the following error: "NMAKE : fatal error U1040: internal error : macro expansion" Any suggestions? My nmake version is 9.00.30729.01 (VC 2008). OPTION = A FILE = check.mak all : @echo "$$($(OPTION))" > $(FILE) ...

Custom URL protocol in windows - emailing links

I have a custom URL protocol for an application I'm working on (as defined here: http://msdn.microsoft.com/en-us/library/aa767914.aspx). This protocol works fine, I can go to Start -> Run and type: foo:1_1 And my application launches as expected. If I create a web page that has a link of that type, it works as expected (I get a warnin...

fsutil hardlink doesn't work?

I was looking for a way to create hard links under Windows and I found this page: http://technet.microsoft.com/en-us/library/cc788097.aspx To try it out, I created a file (1.txt) on the root of my C: drive with 100 lines of the following content: C:\1.txt (2.598 bytes): test test test test test Then I open the command prompt and typ...

How can I add a custom url handler on Windows. Like iTunes itms://

I would like telnet://blah to open putty and not the native windows telnet client. I don't even know what this 'feature' is called under windows so I'm having no luck find any information about it. Thanks in advance, Jan ...

What is the maximum amount of data that can be loaded into a Windows form control?

Hello, What is the maximum amount of data I can load onto a form control? My application consumes too much memory and hangs when more than 500,000 records are added to any windows forms control in my experience. Any clues? Thanks ...

Is windows's setsockopt broken?

I want to be able to reuse some ports, and that's why I'm using setsockopt on my sockets, with the following code: sock.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR,1) However, this doesn't really work. I'm not getting a bind error either, but the server socket just isn't responding (it seems to start , but if I try to connect to ...

Can Maven generate exe files and mac os x apps?

Hi all, Lets say you created a little Java Desktop app with a jar and some dependencies and possibly a license text file. I know there are plenty of Ant tasks that can generate installers, executables and proper Mac OS X applications including packaging them as ".dmg" files. Examples would be JarBundler and Launch4j Does similar things...

How to enumerate all ActiveX elements with WMI?

Is it possible to enumerate all (or just enabled) ActiveX elements (*.dll, *.ocx) with WMI script? Motivation: ActiveXHelper ...

WPF focus textbox after Window is restored/activated from minimized state

Hello, I have a simple WPF application where user is able to minimize my application window. After user restores Window from minimized state I need to set focus to certain TextBox. If user before minimizing Window has not changed focus, then after restoring application everything is fine. But problem comes when user has changed focu...

suggest any tutorial or ebooks for Driver development in windows (NDIS)?

Hi guys, i wanna write Driver for my network adapter .For the suggest any e books or online tutorial for Driver development? ...