win32api

unknown array length in python ctypes

I'm calling a C function using ctypes from Python. It returns a pointer to a struct, in memory allocated by the library (the application calls another function to free it later). I'm having trouble figuring out how to massage the function call to fit with ctypes. The struct looks like: struct WLAN_INTERFACE_INFO_LIST { DWORD ...

Where to find the win32api module for Python?

I need to download it for Python 2.7, but can't seem to find it... ...

Programming with C/C++ in Ubuntu linux

How to display beginning sector of each partition in ubuntu ?like in windows there is an API to call disk structure in c/C++ .. any suggestions will be help full. ...

How do I get the URL of the visible tab in Firefox/IE/Chrome?

No, this is not a send me teh codez request. I am writing a small utility for my own amusement. In this regard, I need the utility to read the URL from the visible/active tab on any of the three browsers (Firefox, IE, Chrome) that are currently open, and then go off and do something with that URL. I am assuming I'll need to PInvoke for...

NetServerEnum returns 58, can't find this error code in the documentation

NetServerEnum returns error code 58, can't find this error code in the documentation. What does it means? ...

get handle from process

how can access to main window handle from process ? ...

I'm having problems with WaitForDebugEvent EXCEPTION_DEBUG_EVENT

I'm starting an Explorer.exe instance with CreateProcess (flags NORMAL_PRIORITY_CLASS + DEBUG_PROCESS + DEBUG_ONLY_THIS_PROCESS), and then I'm doing this: procedure FakeDebugProcess; var wDebugEvent : DEBUG_EVENT; begin fillchar( wDebugEvent, sizeof( wDebugEvent ), 0 ); repeat if WaitForDebugEvent( wDebugEvent, INFINITE ...

How do you call Win7 Taskbar API via Ruby Win32API module?

I am writing plugins for Google SketchUp using their Ruby API. One of the common problems we (SketchUp scripters) have is that when a script is performing intensive operations it locks up the SketchUp UI and there is no way to see the progress of the current process. What I would like to do is call the new Taskbar API in Windows7 in a h...

WSAEventSelect with FD_ACCEPT, recv returns WSAEWOULDBLOCK

I'm trying to setup a socket that won't block on accept(...), using the following code: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.bind(("127.0.0.1", 1234)) event = win32event.CreateEvent(None, True, False, None) win32file.WSAEventSelect(sock.fileno(), event, win32file.FD_ACCEPT) sock.listen(5) rc = win32event.WaitFor...

Grab server (SSL) certificate using WIn32 API

I'm relatively new to Win32 programming & I was wondering if there is any thing similar to openssl's s_client; for e.g "openssl s_client -showcerts -connect". Bottom line, I want to grab the server certificate using Win32 API directly. Is that possible? ...

C++ application to detach secondary monitor

I am trying to create an application to detach a secondary monitor from Windows boxes (long story). Here is Microsoft's sample code that I used as a basis: http://support.microsoft.com/kb/308216/en-us Here is my code: #include <iostream> #include <windows.h> void DetachDisplay() { BOOL FoundSecondaryDisp = FALSE; D...

Use unmanaged FindFirstVolume to enumerate volumes in C#

I am trying to enumerate drives that are mounted without a direve letter so I can obtain the remaining space on each of the drives. This application must work with Windows XP so the Win32_Volume class is not available. When the following code is executed, a System.ExecutionEngineException is thrown. using System; using System.Text; us...

Python and win32 API - using a C file

With ActiveState Python comes a win32api module. I need to implement something that monitors directories recursively for file-changes. Actually there's an example in the MSDN library using C. I don't know whether the win32api bindings are sufficient for something like this. Can I import this into a Python project? Because it may be easi...

C#: How to wake up system which has been shutdown?

Is there any Win32 API for waking up a system that has been shut down, at a specific time? I have seen a program named Autopower On which is able to power the system on at a specified time. ...

Library for making Win32 windows?

Hello all! I want to experiment with some D3D programming, but I hate writing code to create and manage Win32 windows. I really don't like the native Win32 API. Is there any libraries or helper classes out there that make it easier to create and manage Win32 window objects? Thanks ...