adeyblue

Member
  • Content count

    151
  • Joined

  • Last visited

Community Reputation

549 Good

About adeyblue

  • Rank
    Member

Personal Information

  1. I don't think there's a log of processes starting by default but you can use WMI to make one: Run wbemtest as administrator (it's in system32\wbem but search will find it) Click Connect, and Connect again in the new dialog Change Method Invocation Options to Asynchronous Click Notification Query Put "Select * from Win32_ProcessStartTrace" without quotes in the box and click apply Now go do what you're doing. The box will fill up with events for processes that are created, though it can take a few seconds after they're launched to be listed. Double click an event and scroll down the properties box, ProcessName is the process that was started and ParentProcessPid is who started it. If the window is created by an already extant process, you might have to write some code for that. SetWinEventHook(EVENT_OBJECT_CREATE, ..). or RegisterShellHookWindow/SetWindowsHookEx(WH_SHELL, ...) will get you notifications of new windows.
  2. Upgrade Update: Reputation Feedback

    I thought the whole point of the move to IPB in the first place was so you didn't have to have all sorts of custom code for things like this. Seems a bit weird that you're now moving back in that direction for essentially fluff things after the upgrading issues you had then
  3. D3d12 in C

    I have no experience with D3D12 but if its headers are like D2D's then [url=http://blog.airesoft.co.uk/2014/12/direct2d-scene-of-the-accident/]the C interface is broken[/url] in respect to the interface functions that return structures. And they're not really bothered about fixing it
  4. When I play games I don't really play anything new. Heck, the last game I bought as it was released was Final Fantasy X, the original version. The one game I do play and perhaps play too much, is Intelligent Qube (or Kurushi since I'm a contrary European) on the PS1. I usually speedrun it, but then I found a high score for the game on Twin Galaxies of 1,244,800 with an IQ record of 506. This was achieved on the default / easiest difficulty, nevertheless if you've played the game you'll understand that they're both pretty great scores. The scoring mechanics for the game are relayed via the tutorial and otherwise easily observable so anybody doing a score attack can gauge how they're progressing and what they need to do. How the IQ score is calculated on the other hand is not public knowledge. So seeing as I like to know how things work, can read PlayStation (MIPS) assembly, and some clever people have fitted debuggers into PlayStation emulators, I went to uncover it. The results I found contained some rather unexpected information. Read the rest of this entry on Just Let It Flow
  5. Plug in to CL

    It's well known that Visual Studio's C compiler hasn't progressed much beyond C89, save for things like variadic macros. What might not be quite as well known is that to rectify this a bit, somebody created a C99 to C89 converter. A decent tool to be sure, but it doesn't integrate well into Visual Studio. Being a seperate program means you have to fudge things to run it instead of cl.exe, or you have to set a pre-build step, save the processed output and then compile those files instead of the ones in your project. It's not terribly friendly for IDE purposes. Wouldn't it be nice if there was a way to intercept the compilation and process the source files as it goes? What isn't well known is that you can do that, with compiler plugins. The good news about these plugins is that unlike IDE ones such as Visual AssistX, the support is directly in the compiler so you don't have to have a pay-for version to use them. You see, not only does cl.exe have the plethora of options it displays as help, it has undocumented ones too. Ones which allow you to change or add compiler passes and pass your own arguments to them. Continue reading on Just Let It Flow...
  6. These functions don't like BITMAP type resource data, only RCDATA type resource data.   Change the IDB_BITMAP1 BITMAP "Image.bmp";   bit in the rc file to IDB_BITMAP1 RCDATA "Image.bmp";   The second stores a copy of the file as is; the first one strips off the BITMAPFILEHEADER from the start of the file. The WIC functions the D3DX functions use (specifically CreateDecoderFromStream) seem to require that header be present or they fail. It ain't there, so they fail which make the D3DX function fail.
  7. Input filtering in Win32

    [quote] while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE | PM_QS_PAINT | PM_QS_...)) InputProc(msg.hwnd, msg.message, msg.wParam, msg.lParam); Still makes the program hang. It never recieves input [/quote] Nothing you can give PeekMessage will make it hang, so without being able to see the code it's probably one of a couple things: 1. Like in the first post, invalid flags are being passed to the only / all PeekMessages and the window hangs because no messages are being retrieved at all. You'd also see that if you run the message pump on a different thread to the one that created the window. 2. There's a rogue Sleep / WaitForSingleObject that rarely returns 3. It's working fine except that InputProc isn't calling DefWindowProc for some window or keyboard messages so certain things it does for you (like letting you double click the title bar to move the window or pressing Alt to start the window menu) aren't happening On a stylistic note, it's not the best idea to call your custom message dispatching function the same thing as the Windows one, especially when they share the same signature. At least, I thought the DispatchMessage in the snippets here was the Windows function before I checked your repo. Or maybe you changed back, and it is! [quote] Does this not imply that there's no need to call DispatchMessage in a PeekMessage loop? [/quote] You don't have to call it, but even if you only explicitly create one window things like COM or plugins (if you allow those) can create other windows that run on the same thread. Without a (Windows) DispatchMessage, any messages picked off the queue intended for them will never make it to their WndProc, unless you do it manually. It also does other stuff like translate unicode messages for non-unicode WndProcs and vice versa. It's not anything you couldn't do yourself though.
  8. back_inserter or end()

    You could also (ab)use the fact that accumulate is implemented in terms of addition and use that to concat a bunch of strings in a container. The need to provide the starting point takes away some elegance points but it's still serviceable. [code] // include <numeric> std::wcout << fieldTitle << L'\t' << std::accumulate(dest.begin(), dest.end(), std::wstring()) << std::endl; [/code]
  9. If you add dumpbin /exports $(TargetPath) as a post-build event for the dll/exe project generating the lib & exp, the build output will tell you what functions are being exported. I know VS 2008 has a bug where certain build options will cause the project to export std::_Init_locks which in turn will generate an exp & lib for otherwise non-exporting projects. I don't know if they fixed it though.
  10. CheckInterfaceSupport Method

    There's nothing wrong really. If you convert that number to hex you get: [font=courier new, courier, monospace]0x80011000D008E ..8|17| 13| 142[/font] it's just packed into word sized values with the larger value. You can get the individual parts using the high and low parts of the large_integer with the word extraction macros: [code] std::wostringstream outs; outs << L"Your computer has " << num_adapters << L" display adapter(s). D3D driver version is " << HIWORD(lrg_int.HighPart) << L'.' << LOWORD(lrg_int.HighPart) << L'.' << HIWORD(lrg_int.LowPart) << L'.' << LOWORD(lrg_int.LowPart); [/code] It would be nice if the CheckInterfaceSupport help page documented this, but maybe it's dependent on what the driver vendor provides so there's no set format for it.
  11. std::get_temporary_buffer & std::return_temporary_buffer. I am convined nobody has ever used these functions for anything, ever.
  12. You can also set the _NO_DEBUG_HEAP environment variable to a non-zero value to stop it from occuring. You used to be able to set it from the Environment part of Project Properties->Configuration->Debugging but that was in VS2008, it may have changed in more recent versions.
  13. You (OP) have a problem everybody seems to run into when doing this at some point. You call CreateWindow: this->hwnd == NULL CreateWindow sends WM_NCCreate - you set the window data, this->hwnd still == NULL CreateWindow sends the other messages it sends - you call Wnd->WndProc, you pass this->hwnd to DefWindowProc but this->hwnd is still NULL CreateWindow finally returns, after a check only now is this->hwnd set to a valid value Long story short, you handle who knows how many messages by passing a NULL hwnd to DefWindowProc or to Begin/EndPaint. The easiest way to fix it is to assign this->hwnd in WM_NCCreate.
  14. [quote name='Ashaman73' timestamp='1350540264'] You may also know that what it doesn't have, is a defined API so us normals can leverage it programmatically. Us normals use normally [url="http://www.zlib.net/"]zlib[/url]. [/quote] Haha, yeah I'm well aware of that. It's not such a good tool to show how to simulate dragging and dropping in Windows though. The zipping aspect is just a useful angle a) to base it on and b) fit it in with the 'unseen side of Windows' theme of my blog.
  15. If you haven't been living under a rock (or in a non-Windows world) you'll know that since XP, Windows has had zip file extraction and creation. You may also know that what it doesn't have, is a defined API so us normals can leverage it programmatically. But there are ways and means. Think about it, the usual way you'd interact with zip files is through the shell. You'd highlight a bunch a files and "Send To" a Compressed Folder or drag them into an existing folder and voila. There's obviously some code behind that's actually doing those things, and since you can do them from 'Open File' dialogs and the like, it can't be code within the Explorer executable. You can search Google all you want, but you'll only find that MSDN isn't sandbagging and there are no directly exported functions to create zips. What you may find is that shell32 and friends do have functions and interfaces to duplicate the Shell's methods of dragging, dropping and sending to, so that seems a good lead to follow... Continue reading on Just Let It Flow