winapi

Login dialog for Windows client application

Is there a Win32 function I can call to show a Windows login dialog? E.g., Internet Explorer and Visual Studio's Team Explorer both show a credentials dialog when accessing a website - how can I show that dialog? I have a .NET Windows client application that uses the logged in Windows user identity when communicating to web services. T...

Modifying or hiding a form's caption tooltip

We have an MDI form which contains some number of child forms which have varying captions showing the currently loaded document's filename. When the child forms are maximized their title text gets placed in the parent window's title bar which often results in the text being too long to fit in the bar and Windows is nice enough to add el...

How to create a virtual printer in Windows?

I want to create a virtual printer driver for Windows. Where should I start? The WDK has some printing drivers examples, but nothing I can use. MSDN doesn't seem to be very helpful. There are a lot of virtual printers for Windows out there (mostly they generate PDFs), how do they do it? Any links to the documentation I seem to miss are...

HWND Creation Time

Hi Friends, I am new to this community, while working with 1 of my automation script I am encountering an issue, I wanted to get HWND’s, creation time. I am having a set of HWND in an array which I have retrieved from FindWindowEx, I want to find in array which HWND is created last depending upon system time I do not have enough knowle...

How to find a child of a parent unmanaged win32 app

Basically I am looking for a win32 method to invoke in C# to set the focus to a children of an unmanaged application. But first I need to find the child control's handle which is the problem. Any useful win32 functions to solve this? ...

SendInput() Keyboard letters C/C++

I am trying to use SendInput() to send a sentence to another application (Notepad) and then send it hitting the Enter Key. Any code snippets? Or help ...

Why does calling the InternetReadFileEx function with IRF_NO_WAIT flag still wait?

I'm using a synchronous wininet request and calling InternetReadFileEx() with the IRF_NO_WAIT flag, but the function still blocks waiting for data. Why is that? ...

how to write hello world in assembler under windows?

Hi I wanted to write something basic in assembly under windows, I'm using nasm, but I can't get anything working. How to write and compile hello world without help of c functions on windows? thx ...

is there a global function in windows to lists the files in a dir ?

Hi, which function windows is calling to list the files in a directory ? thanks ...

How can I be notified when a new window is created on Win32?

Is there a way using Win32, to register for notifications when a new window is created. I'm trying to keep a list of current open windows, but am now just polling the list of current windows using EnumWindows(). Anyone done something similar? Thanks ...

How to use win32 API's with python?

Hello, how to use win32 API's in python? what is the best and easiest way to do it? can you please provide some examples? thanks in advance ...

Why doesn't WinHTTP work while debugging?

I am using WinHTTP (WinAPI interface) in a C program. When I'm running the relase build from outside the ide (that is, without any debugger. IDE is VS2008) it works fine. However, if I run it inside the debugger (either the release or the debug build), or if I run the debug build from outside, WinHTTP won't work right. The status callb...

Any way to know the URL being fetched?

I wanted to know is there any way programmatically in win32, where I can get the URL being fetched from browser. Like for example as we have MIB table, which shows data sent and received from Ethernet card, can we get the URL being fetched from system Thanks in advance. ...

GetOpenFileName lpstrInitialDir (directory)... not working for URL (SharePoint)

I bring up a GetOpenFileName dialog, enter a URL to a SharePoint sever, and it lets me browse that server using the Web Client Service (WebDAV mini-redirector). I am trying to get the initial directory to come up as that URL, but it seems to ignore it (using OPENFILENAME struct's lpstrInitialDir. Local paths work fine. EDIT: Paul re...

Basic SIP client to provide VoIP in Win32 application?

Hello I'd like to write a small IVR application with Asterisk, and provide a Delphi client that can SELECT all unanswered calls from a database and provide a "Call" option when the user right-clicks on a record. So I need a basic SIP client just to dial out, and also handle incoming calls for those users who are OK with a headset inste...

Programatic desktop icon placement

I am looking for a way to programatically get/set the icon positions on the desktop. Clearly there is some "state" stored in a somewhere. Does anybody know here? I am trying to get a proof of concept going on ANY platform so if you know how to do it on XP in gnome, KDE or Mac OS I would really like to hear about it. ...

How should a Windows Service return information from a custom command

I have a windows service running as part of my application. If I wish to communicate with it via the service handle I can issue custom commands (eg, 'start worker'). Ultimately, this will be a call to the Win32 ControlService() function. What is the best way to return a block of data from such a command? Specifically, I want to return ...

Windows LogonUser Function Works with Old Passwords?

Hey Folks, I am using the LogonUser function (http://msdn.microsoft.com/en-us/library/aa378184(VS.85).aspx) to authenticate users. However i have found that if a user changes their password (ie from Password1 to Password2) both passwords will then work. However i would like it so that only the current password can be used. Is there some...

Is there a way to get SendInput to work with an application using GDK?

I have an application that can successfully inject keyboard input using the SendInput API with the UNICODE flag set. This causes WM_KEYUP and WM_KEYDOWN messages to be generated with the VK code of E7 (VK_PACKET), which gets appropriately translated into the correct WM_CHAR message. This works in all the applications I have tried except ...

Method to intercept child process filesystem activity

I have a small command-line application written in C that acts as a wrapper/launcher for other programs (think: xargs). The application is written to compile on FreeBSD/Linux (via fork()/exec()) and Windows (CreateProcess()). In addition to being able to intercept, inject, or otherwise manipulate the command-line arguments for the chil...