Все вопросы: [winapi]

2 231 вопросов

похожие теги:
0
голосов
4ответов
933 просмотров

DLL Injection/IPC question

I'm work on a build tool that launches thousands of processes (compiles, links etc). It also distributes executables to remote machines so that the build can be run accross 100s of slave machines. I'm implementing DLL injection to monitor the child processes of my build process so that I can se...

6
голосов
4ответов
5312 просмотров

C++ Console Application, hiding the title bar

I have a Windows console application written in C++ and want to hide/remove the complete title bar of the console window, including the close, min/max controls etc. I searched a lot but didn't found anything useful yet. I inquire the console HWND with GetConsoleWindow and tried to change the co...

0
голосов
1ответов
1441 просмотров

How to use AccessibleObjectFromWindow WinAPI function in Delphi?

http://msdn.microsoft.com/en-us/library/dd317976(VS.85).aspx STDAPI AccessibleObjectFromEvent( __in HWND hwnd, __in DWORD dwObjectID, __in DWORD dwChildID, __out IAccessible **ppacc, __out VARIANT *pvarChild ); What is IAccessible** equivalent in Delphi (2009)?

1
голосов
1ответов
430 просмотров

Active Wait in Windows I/O Driver

Continuing the question in: Keep windows trying to read a file Thanks to accepted answer in that question I realized that keeping windows waiting for data is a driver responsability. As i'm using Dokan, I am be able to look into the driver code. Dokan complete the IRP request with a STATUS_END...

1
голосов
3ответов
589 просмотров

Is there a Windows hook for when the internet is connected/disconnected?

I could do an endless timer checking IsInetOffline(), but I would prefer a hook callback that tells me when I plug/unplug the ethernet network cable or connect to wireless internet. Is there such a thing in the Windows API?

1
голосов
2ответов
857 просмотров

MapViewOfFile with pointers between threads

I have some programs that use MapViewOfFile to share data, but I am getting strange access violations that seem to be from accessing the mapped file data. Some of the shared data has pointers, however these pointers are only set and used by one process, but by several threads within the process....

0
голосов
5ответов
1706 просмотров

How do I archive a set of files using Perl on Win32 while retaining file paths?

PROBLEM FOUND. I'm leaving the question here, though, in case others run into the same problem I ran into. It looks like I encountered a bug or a weird feature in WinZip 11. When I double click the test2.zip file to see its contents, WinZip tells me the path to the data file is "allcapsname" in...

4
голосов
4ответов
2695 просмотров

How to return an instance from a DLL?

I am programming a DLL. I have to return an instance of TBitmap to the host application. The DLL has another UNIT, wich is a Form, that it has a TImageList for storing images. I wrote a function that I want to return an Image from the TImageList (from the DLL to the host application. How can I do...

4
голосов
1ответов
1301 просмотров

How to change the color of a textual cue when sending an EM_SETCUEBANNER Message?

When you send an EM_SETCUEBANNER message, you get a grey textual cue in your edit control. How do you change the color of the textual cue in Win32/C ?

1
голосов
1ответов
3508 просмотров

How can I continuously read from the serial port in a Perl Win32::GUI program?

I would like to use the Win32::SerialPort module under Windows XP to read a text string from a COM port. There is a scale attached to the serial port which continuously sends the current measured weight. Since I'm also using Win32::GUI I need a way to read that non-blocking. What's the best way ...

0
голосов
1ответов
482 просмотров

How to Know If I am in a Terminal Service (TS) Session?

Is there any windows API function to check if I am in a terminal service session?

1
голосов
2ответов
184 просмотров

Cross platform COM development

COM as we know is language and platform independent standard, but all the time I see only articles on developing COM components on Windows. Could you share your thoughts on how to develop a true cross-platform application.

0
голосов
1ответов
289 просмотров

ImageList and BltBit - ting

I am having trouble in CE BltBit from a previously created compatable hdc to device's hdc. The following code works: hdc = pdis->hDC; FillRect(hdc, &(pdis->rcItem), (HBRUSH)GetStockObject(BLACK_BRUSH)); ImageList_Draw(himl, imageIndex, hdc, 15 , 30, ILD_NORMAL); However the fol...

0
голосов
1ответов
1373 просмотров

Can't read global mutex created with Createmutex

I created a mutex in one app; the code is: HANDLE global_mutex = CreateMutex(NULL, FALSE, "mcdonalds"); if(global_mutex) { wxLogMessage("created successfully."); } else { wxLogFatalError("Unable to create the mutex"); } then I read it from my other program Public Declare Function GetL...

0
голосов
3ответов
1582 просмотров

develop an application similar to windows explorer

Is it possible to use windows api and c# to develop an application similar to windows explorer [treeview,listview]. ImageList imageList = new ImageList(); if (folder != null && System.IO.Directory.Exists(folder)) { try ...

1
голосов
1ответов
1634 просмотров

COMException when using Windows API Code Pack

I downloaded Windows® API Code Pack for Microsoft® .NET Framework from http://code.msdn.microsoft.com/WindowsAPICodePack/Release/ProjectReleases.aspx?ReleaseId=3077 ERROR On testing the solution on VS 2008,I get error in line IKnownFolderManager knownFolderManager = (IKnownFolderManager)new ...

0
голосов
1ответов
1975 просмотров

Creating a Windows Forms Control (C++)

trying to run this basic form control example on msdn. At step 1 of the portion "To add a custom property to a control" we place the ClickAnywhere code in the public section of the class. First error: "error C2144: syntax error : 'bool' should be preceded by ';'" Is this syntax correct ...

1
голосов
1ответов
752 просмотров

CryptEncrypt() API

is it normal to get the junk bytes at end of buffer when this function returns?

1
голосов
3ответов
552 просмотров

What is a good, free solution for Richtext editor and convertion to HTML?

Simple situation. I'm trying to write my own blog with a minor twist. Part of the blog will be controlled from a client application instead of a web interface. Basically, I'm still in the design phase and haven't written a single line of code. But I'm trying to combine several techniques into an ...

0
голосов
1ответов
789 просмотров

Is it possible to change a background color of an edit control inside edit?

I am writing a GUI wrapper for windows api right now ( i can't use qt or mfc ). The library itself is extremely basic. After subclassing windows common controls ( and wrapping them into the classes ) i have faced a problem. As far as i know (and i hope i am wrong), only parent control can handle ...

1
голосов
2ответов
4870 просмотров

How to receive feedback from a Windows MessageBox?

I know its possible to do something like this with Windows: MessageBox(hWnd, "Yes, No, or Cancel?", "YNCB_YESNOCANCEL); But how do I react to what the user pressed (like closing the window if they clicked "yes")?

2
голосов
5ответов
6355 просмотров

Hook into the Windows File Copy API from C#

Is there a way to hook into the Windows File Copy API from C#? I'm aware this would require unmanaged code, but a code sample or starter would be helpful. I've already seen the C++ code, but it's all greek. UPDATE: I apologize, I should have been more clear about my intentions. I wish to actu...

0
голосов
2ответов
479 просмотров

Which APIs can be used to display different desktop wallpapers on a multi-monitor system?

It seems Windows is unable to display different background images on different monitors on a multi-monitor system out of the box. But I noticed there are quite a few commercial applications available which provide this feature. Which APIs can be (mis-)used to provide this functionality? If there...

2
голосов
2ответов
2011 просмотров

How can I detect if there is a webcam connected to the PC?

I have the source code for taking a picture via webcam, but I need to know if there's a webcam connected to the PC. If there's no webcam, the program won't call the function for taking photos. If necessary, I need to know which window's Api I have to use in this case. Language: Visual Basic 6 us...

6
голосов
1ответов
4373 просмотров

How do I prevent programmatically the "Program Compatibility Assistant" in Vista (and Windows 7) from appearing?

I develop a C++ program which might use adobe flash, although it is not essential. I use CoCreateInstance to create the flash object, and if it fails, I know flash is not installed so I don't use it. However, in Vista (and I think Windows 7 as well), when flash is not installed, after leaving the...

2
голосов
2ответов
794 просмотров

How to read out the boot order?

Is there any way to get the boot order programmatically, on Windows ?

6
голосов
5ответов
3749 просмотров

How can I get the IP address of a network printer given the port name using the Win32 API?

How can I get the IP address of a network printer given the port name, using win32 API? I tried looking into the PRINTER_INFO_* structs, but it seems it is not present there.

0
голосов
3ответов
271 просмотров

Keep windows trying to read a file

I'm working in a sort of encapsulation of the windows filesystem. When the user request to open a file, windows calls to my driver to provide the data. In normal operation the driver return the file contents which is cached, However, in some cases the real file is not cached and I need to downlo...

0
голосов
2ответов
6194 просмотров

Checking if a Socket has closed in C++

I have a small application that redirects the stdout/in of an another app (usually command prompt or bash for windows). The problem is that if the connection is interrupted the my process has no idea and it never closes because of this line: WaitForSingleObject(childProcess.hThread, INFINITE) ...

5
голосов
4ответов
3847 просмотров

detect Windows Explorer copy operation

Is there any way to detect whenever a copy operation starts in Windows Explorer. kind of like in SuperCopier : SuperCopier Website ? and log files involved in the operation ? and such ? I've browsed through Supercopier code and I can't find the part which deals with detecting the copy operatio...