winapi

C++/CLI Missing MSVCR90.DLL

I have a c++/cli dll that I load at runtime and which works great in debug mode. If I try and load the dll in release mode it fails to load stating that one or more dependencies are missing. If I run depends against it I am missing MSVCR90.DLL from MSVCM90.DLL. If I check the debug version of the dll it also has the missing dependency, b...

Win32 error 0n2*** ERROR:symbols could not be loaded for ntoskrnl.exe during Lightmass/AO rendering

PC is shutting down during Lightmass/AO rendering only, CPUs never ovr 70c, Video Cards 65c..no overheating.... runs ANY game in 200+FPS : Unable to load image \SystemRoot\system32\ntoskrnl.exe, Win32 error 0n2*** ERROR: Module load completed but symbols could not be loaded for ntoskrnl.exe and the debugger gives me.Probably caused by : ...

Why in C++ do we use DWORD rather than unsigned int?

I'm not afraid to admit that I'm somewhat of a C++ newbie, so this might seem like a silly question but.... I see DWORD used all over the place in code examples. When I look up what a DWORD truly means, its apparently just an unsigned int (0 to 4,294,967,295). So my question then is, why do we have DWORD? What does it give us that the i...

How to get the Drive Letter for the DevicePath

Dear All, I am using Win32 API. Really i do not understand how to get the drive letter for DevicePath of a USB stick . can you pls explain it to me ( what i have is SP_DEVICE_INTERFACE_DETAIL_DATA DevicePath using this Device path i get VID AND PID of the usb device my device path looks like below "\?\usb#vid_1a8d&pid_1000#3580940...

WIN32 visual c++

I would like to write a simple program in c++. After the program is done i would like to get my answers in form of a graph or picture that would give some certain information if i click on a certain area. i have only written console apllications in c++ before and don't really have a clue where to start with the graphic part of it all. C...

Win32: How do I get the listbox for a combobox

I'm writing some code and I need to get the window handle of the listbox associated with a combo box. When looking in spy++, it looks like the parent of the listbox is the desktop, not the combo box. How can I programmatically find the listbox window handle? ...

Global low level keyboard hook freezing in c# .net 3.5

Hi, i have a frustrating problem with registering global hook. I am using this class in my windows application: using System; using System.Diagnostics; using System.Runtime.InteropServices; using System.Windows.Forms; class InterceptKeys { private const int WH_KEYBOARD_LL = 13; private const int WM_KEYDOWN = 0x0100; private...

what's the difference between GdipBitmapLockBits and CreateDIBSection

GdipBitmapLockBits works on pBitmaps, requires locking ? CreatDIBSection gives you a DIBsection, doesn't require locking ? which method is better for working with raw pixel data ? Here are two implementations for finding the difference between two images using each method. ...

C++ Printing: Printer jams, what am I doing wrong?

I have a problem with printing in C++. As far as I know, this code used to work on my previous printer, but ever since I got another one (an HP C7280) it started giving problems. Whenever I try to print anything, even an empty page, the page JAMS the printer. I have to manualy remove the page from the printer. I have no clue why this is ...

Win32: Reading WS_VSCROLL style from a combo box (or list box)

I'm iterating through the controls in a dialog and I'm trying to determine if a combobox was created with the WS_VSCROLL style. The style, obtained from GetWindowLong(hwnd, GWL_STYLE), doesn't contain the WS_VSCROLL bit (0x200000), even when I know it was set on create. Clarification: I am looking to see if the ComboBox was created ...

How do I have my apps dialog box pop up and take focus from the current running app?

I know this type of thing is looked negatively upon but I write software for people with disabilities and sometimes good gui practices don't make sense. In this case, the user interacts with a assistive interface and under certain conditions, my control app needs to prompt the user with a question. My background process creates a dialog ...

is it possible to programmatically check the service provider for a cell number?

is there a database or API available where i can enter a cell phone number and it will spit out whoever the providor is like tmobile or verizon? ...

C++ - Basic WinAPI question

Hello! I am now working on a some sort of a game engine and I had an idea to put everything engine-related into a static library and then link it to my actual problem. Right now I achieved it and actually link that library and every functions seem to work fine, except those, which are windows-related. I have a chunk of code in my libr...

Find UTC Offset given a city

In C++ on Windows, given a city, lets say london or newyork or sydney or singapore etc.. how do I find the UTC offset for each of them, ie the function should be able to accept a city name and return the UTC offset in the current scenario ie taking into account daylight savings. Any ideas how this can be done using win32 APIs ...

Programming for a 32-bit environment vs programming for a 64-bit environment / Build configurations

I was looking at some same code (a sample MS Visual Studio C++ project) recently with multiple build configurations (Release/Debug, Win32/x64). My question: What is the difference? I guess I understand Release/Debug (Release = finalized version of project, Debug = version used to run in debugger), but what things need to be considered w...

SetWindowHookEx and execution blocking

Hello, I just wonder... I mainly use .NET but now I started to investigate WINAPI calls. For example I am using this piece of code to hook to the API functions. It starts freezing, when I try to debug the application... using System; using System.Diagnostics; using System.Runtime.InteropServices; using System.Threading; using System.Win...

Difficulty trying to stream an image in a windows mobile API without invoking the inbuilt camera API

Hi I am working on trying to create an API on Asus Windows Mobile 6 phone that can capture an image/video with some visual cues/feedback(such as a box drawn in the middle) while the user is capturing the image/video. While it is possible to invoke the inbuilt camera capture application of the mobile phone, but it is difficult to play a...

How to get the volume GUID

Dear all, I am using win32 api with C++. I would like to know how I can get the volume GUID using a "device path". My device looks like this: \\?\usb#vid_04f2&pid_0111#5&39fe81e&0&2#{a5dcbf10-6530-11d2-901f-00c04fb951ed} Thanks. ...

c++ repaint window

i got a window with an image in it. but when its a little picture i first need to resize the window before i can see it, the screen doesnt refresh/repaint. how can i fix this? ...

GetVolumeNameForVolumeMountPoint returns false

Hi.. To get the volume GUID i tried the code like below int len = wcslen( pDetData->DevicePath); pDetData->DevicePath[len] = '\\'; pDetData->DevicePath[len+1] = 0; #define BUFFER_SIZE MAX_PATH WCHAR volume[BUFFER_SIZE]; BOOL bFlag; bFlag = GetVolumeNameForVolumeMountPoint( pDetData->DevicePath, volume, BUFFER_SIZE ); int loginErrCode...