Getting physical sector of a filesystem directory entry
Is there a way to know the sector/cluster number a directory entry in Window? If there's a separate or absent solution for NTFS/FAT32, it's ok, I can live with it. Thanks, Max ...
Is there a way to know the sector/cluster number a directory entry in Window? If there's a separate or absent solution for NTFS/FAT32, it's ok, I can live with it. Thanks, Max ...
After intensive searching why certain workstations wouldn't perform a certain action when just being started up in the morning (...) I've discovered that GetPrivateProfileInt just returns the default value and doesn't bother to set GetLastError to something non-zero when the network-subsystem hasn't activated yet (e.g. because the DHCP c...
In my application I disable the Start menu using 'LowLevelKeyboardProc'. But i get the following error when i pressing the tab key continuously. The Error.. Unhandled exception at 0x00352d58 in Timer_soosai.exe: 0xC0000005: Access violation reading location 0x0000000c. 00352D58 mov eax,dword ptr [ecx+0Ch] /*This is th...
For a file on disk, is the Win32 function FlushFileBuffers as reliable and certain as closing the file using CloseHandle then re-opening the file using CreateFile? Are there circumstances where CloseHandle then CreateFile are better because they save the data correctly to disk when FlushFileBuffers does not? ...
Edit : Fixed, the issue was with the spawned EXE that did not handle the parameters properly (perl script that was byte compiles) Thanks again. Max. (probable duplicate of http://stackoverflow.com/questions/1135784/createprocess-doesnt-pass-command-line-arguments) Is there a difference between passing an argument vs. passing a par...
I am trying to set a global GetMessage hook on all threads. This is my DLL: #include <windows.h> __declspec(dllexport) LRESULT CALLBACK GetMsgProc(int nCode, WPARAM wParam, LPARAM lParam) { MessageBeep(0); return CallNextHookEx(NULL, nCode, wParam, lParam); } As you can see, it's not much. I just want it to call MessageBeep when...
I have an application loading a library containing a callback function for a global GetMessage hook. I get the procedure and pass it to SetWindowsHookEx to be set for all running threads. The problem is that I want the DLL function to, under a certain circumstance like a keypress, tell the original application to exit, not all applicati...
I know that we can use CoLoadLibrary and DllGetClassObject to get the IClassFactory interface and get the COM component interface without registering the DLL. But what about a COM component in an EXE? Is there a way that I can get a COM component interface from an EXE-type COM server by just providing a different file path? ...
My application is something like the Spy++ application: i want to be able to automatically retreive all the different controls of the active window (any application) and their children, and for each control i want to know the type, the name, and the value (caption or text). I am using a C# windows app. what is the solution to iterate ...
Is there a function (SSEx intrinsics is OK) which will fill the memory with a specified int32_t value? For instance, when this value is equal to 0xAABBCC00 the result memory should look like: AABBCC00AABBCC00AABBCC00AABBCC00AABBCC00 AABBCC00AABBCC00AABBCC00AABBCC00AABBCC00 AABBCC00AABBCC00AABBCC00AABBCC00AABBCC00 AABBCC00AABBCC00AABBCC0...
I'm working on a win32 DialogBox based app. This uses DialogBox() to create the dialog box, and has a dialog box procedure which does all the usual things. The dialog box has some static text controls on it, and generally I'm showing text in these via SendDlgItemMessage() from within the dialog box procedure. However at one point the ...
Couple of years ago i used some tool to monitor what event messages were being sent to a window. I can't remember the name right now. Can someone please tell me some tool with this functionality. ...
Hi I'm a beginner. Can anyone please tell me how to disable the task switch keys using c# ...
Ok, let's see if this all makes sense. Today, as I began working on a small project, I ran into an error I can't seem to get over. The function of the program I am working on is to read data from a pipe (which is the output of another program) and update an HWND ("edit") control dialog using WinAPI. Now, I've been successful at updating ...
I'm having trouble adding items onto a ListView control. When I try to add items to my ListView, nothing happens. I was using this code before, and it didn't work. I have 3 columns, with the SubItem values set to 1, 2, and 3. LVITEM item; item.mask = LVIF_TEXT; item.cchTextMax = 6; item.iSubItem = 1; item.pszText = TEXT...
Hello, I am trying to write a GUI program for a command line program in Win32 using WinAPI (so please no MFC). In my current attempt, I am creating an input pipe and an output pipe to read/write data. However, my problem comes in when I attempt to continuously read from a program or to simply write after a single read due to the way I h...
Hi there, I'm writing some Perl which takes TV shows recorded on Windows Media Center and moves/renames/deletes them depending on certain criteria. Since the Perl runs fairly frequently, I'd like to cleanly determine whether or not the file is in use (in other words, the show is in the process of being recorded) so I can avoid doing an...
I need to access the Win32 window handles of some of my WPF windows so I can handle Win32 activation messages. I know I can use PresentationSource.FromVisual or WindowInteropHelper to get the Win32 window handle, but I am running into problems if the WPF window has not been created yet. If I use PresentationSource.FromVisual and the wi...
My program uses SetWindowsHookEx to set a global hook function in my DLL. However I want the DLL to work with a file so I need it a file to be opened once. I can't use DllMain's DLL_PROCESS_ATTACH because it's called multiple times. What is the best solution to my problem? ...
I have been doing a lot of searching and still can't seem to figure out how to fix my issue. I am writing a GUI program (in WinAPI so no MFC please) to communicate with another program (command line based). I am using anonymous pipes since everything is local (but perhaps named pipes would be better?) which then I use CreateProcess(); to...