winapi

How can I add Windows DateTimePicker to a win32 Application in c++

I have a Win32 application and i want to Add a DateTimePicker Control, like the one in .NET. I though don't want to include the whole Framework in my application, nor MFC or whatever. How can I add the native control in a Way with the least amount of dependencies? ...

Enumerate all window handles on desktop

Is there a Win32 API way to get an enumeration of all the open windows? Seems like there must be just not sure where to start looking. ...

How to programmatically figure out if a user account is a member of a particular group in Windows?

Given a group name and a user account, I would like to know if the supplied user belongs to a particular group. The user can be a local user or a domain user and the group could be a local group or a domain group and the group could also be nested inside other groups. In short I am looking for a function like bool IsUserMemberOf(User, Gr...

how do i disconnect RDP session programatically?

Hi all how do i disconnect RDP session programatically in c# or c++? Abdul Khaliq ...

Adding leading underscores to assembly symbols with GCC on Win32?

I have a piece of C code that calls a function defined in assembly. By way of example, let's say foo.c contains: int bar(int x); /* returns 2x */ int main(int argc, char *argv[]) { return bar(7); } And bar.s contains the implementation of bar() in x86 assembly: .global bar bar: movl 4(%esp), %eax addl %eax, %eax r...

How can I update the status messages in Firefox from any thread?

I encountered a problem with updating the status message on Firefox from a Plugin code. As the documentation says calling NPN_Status works only when called from the main thread. My requirement is to update the status from any thread within the Firefox process. Any help would be appreciated! ...

Website talking to client application?

I'm working on a desktop application in Delphi 2007 and on a website where content data for this application is maintained. To view this website, the user is basically restricted to Internet Explorer 7 or higher. (Not going to support the rest.) What I am looking for is a way to add a link to the website which would tell my already-runn...

C# - Detect time of last user interaction with the OS

I'm writing a small tray application that needs to detect the last time a user interacted with their machine to determine if they're idle. Is there any way to retrieve the time a user last moved their mouse, hit a key or interacted in any way with their machine? I figure Windows obviously tracks this to determine when to display a scre...

Effort estimation: using C / Win32 or learning C# / .NET

I intend to write a small application to scratch a personal itch and probably make the life of some colleagues easier. Here is what I have: 10+ years of experience in C Plenty of experience in programming against the Win16/32 API in C from the Win3.1 to 2000 days. C library written by myself already doing about 75% of what the applicat...

Is an LSA MSV1_0 subauthentication package needed for some impersonation use cases?

Greetings, I'm working with a vendor who has implemented some code that uses a Windows LSA MSV1_0 subauthentication package (MSDN info if you're interested: http://msdn.microsoft.com/en-us/library/aa374786(VS.85).aspx ) and I'm trying to figure out if it's necessary. As far as I can tell, the subauthentication routine and filter allow ...

help needed on developing Fire wall

Hi All, I am developing one firewall like kind application for my XP machine. I am using pre WFP apis and hardly finding document on those api. I am using PfAddFiltersToInterface to add the filter, it takes one parameter of kind PF_FILTER_DESCRIPTOR. I wanted to know how to fill this structure and some more info on other apis i have...

How to write a lightweight executable like uTorrent

Possible Duplicate: Programming slim C++ programs (like uTorrent) for Windows uTorrent has always impressed me with its 270KB executable and small memory footprint while competing with similar tools which are 30 times its size. I can think of several other tools on my computer that could use such a "debloated" version. What met...

Windows XP Style: Why do we get dark grey background on static text widgets?

We're writing Windows desktop apps using C++ and Win32. Our dialog boxes have an ugly appearance with "Windows XP style": the background to the static text is grey. Where the dialog box background is also grey, this is not a problem, but inside a tab control, where the background is white, the grey background to the text is very notic...

WM_MOUSEHOVER in a global hook

I have implemented custom tooltips for a couple of controls in my application (MFC) but I would like to make it general for all the controls. Right now I am calling TrackMouseEvent in WM_MOUSEMOVE and then catching WM_MOUSEHOVER (both in the overwritten function WindowProc of the control). But this way I have to duplicate code for every...

How can I send a command to a running Java program?

I have a Java program and I want to send a command from my Win32 application. Normally I'd use WM_COPYDATA but what options do I have with Java? ...

IsValidLocale returns FALSE - how to overcome this?

When run on a Spanish version of Windows XP my program invokes LANGID langId = (LANGID) MAKELANGID( LANG_ENGLISH, SUBLANG_DEFAULT ); LCID locale = MAKELCID( language, SORT_DEFAULT ); BOOL isValid = IsValidLocale( locale, LCID_INSTALLED ); IsValideLocale() return FALSE when asked about English locale. Obviously something must be tuned...

Process name change at runtime (C++)

Is it possible to change the name(the one that apears under 'processes' in Task Manager) of a process at runtime in win32? I want the program to be able to change it's own name, not other program's. Help would be appreciated, preferably in C++. And to dispel any thoughts of viruses, no this isn't a virus, yes I know what I'm doing, it's ...

Why can't I find the #define for CSIDL_PROFILES?

I am trying to use SHGetFolderPath() to determine the path of the user profiles folder. The documentation states that CSIDL_PROFILES defines this folder: CSIDL_PROFILES (0x003e) Version 6.0. The file system directory containing user profile folders. A typical path is C:\Documents and Settings. I am using Visual Studio 2005 SP1, and I c...

Can I use Win32 COM to replace text inside a word document?

I have to perform a large number of replacements in some documents, and the thing is, I would like to be able to automate that task. Some of the documents contain common strings, and this would be pretty useful if it could be automated. From what I read so far, COM could be one way of doing this, but I don't know if text replacement is s...

Can't run a service under an account which has no password?

I can start the service correctly if the service's "Log on" account has a password. But when I remove the user password and try again, I got the error: "Error 1069: The service did not start due to a logon failure" Can't a service runs under an account with empty password? ...