dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Arianax

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Exception Errors when doing 'Process Walking' with EnumServicesStatusEx...

    I'm getting a ton of seemingly random Exception Errors when doing Process Walking with Process32Next() and when enumerating Services associated with the process SvcHost.exe (found during Process...
  2. Re: [RESOLVED] EnumServicesStatusEx and Process Walking - How to allocate and free me

    The code is still triggering a range of Exception Errors if it is run more than once during the same execution...

    When I close the window that outputs the data from GetProcessNext() and...
  3. Re: EnumServicesStatusEx and Process Walking - How to allocate and free memory?

    Found a fairly comprehensive set of functions() to do the requested operations now... especially thanks to your input @VictorN and @IgorVartanov :



    if(handleName != INVALID_HANDLE_VALUE &&...
  4. Re: EnumServicesStatusEx and Process Walking - How to allocate and free memory?

    Yes, I know.


    EnumServicesStatusEx(SCM, SC_ENUM_PROCESS_INFO, SERVICE_WIN32, SERVICE_ACTIVE, NULL, 0, &pcbBytesNeeded, &lpServicesReturned, &lpResumeHandle, NULL);

    if(GetLastError() ==...
  5. Re: [RESOLVED] CreateToolHelp32Snapshot and listing Services under Svchost.exe... How

    Could you provide sample allocation code?

    I think I might be getting it wrong since I use the name of my LPENUM_SERVICE_STATUS_PROCESS struct as the handle to the memory allocation:

    ...
  6. EnumServicesStatusEx and Process Walking - How to allocate and free memory?

    This is in C/C++:

    I'm doing Process Walking ( https://docs.microsoft.com/en-us/windows/win32/toolhelp/process-walking ) through a PROCESSENTRY32 struct made with...
  7. [RESOLVED] EnumServicesStatusEx and Process Walking - How to allocate and free memory?

    Got another question:

    About Memory Management in EnumServicesStatusEx().

    What's the best way to capture the amount of memory needed from the first call to EnumServicesStatusEx() (where the 5th...
  8. Re: CreateToolHelp32Snapshot and listing Services under Svchost.exe... How to?

    It seems it's far more simple to iterate through the LPENUM_SERVICE_STATUS_PROCESS struct than I previously guessed or grasped...

    I used this code, supplied for those who might also encounter this...
  9. Re: CreateToolHelp32Snapshot and listing Services under Svchost.exe... How to?

    The documentation advises against using that function because it changes with updates to the OS so its functionality cannot be guaranteed.

    I was thinking more along the lines of finding out a...
  10. Re: CreateToolHelp32Snapshot and listing Services under Svchost.exe... How to?

    Yes, of course.

    I'm aiming to try to list the Services hosted by each instance of 'SvcHost.exe'. I iterate through each process using Process32First and then Process32Next (called 'Process...
  11. [RESOLVED] CreateToolHelp32Snapshot and listing Services under Svchost.exe... How to?

    I have created a SnapShot of all the processes running by using CreateToolHelp32Snapshot.

    I then iterate through all the processes by using Process32First and Process32Next as detailed in the...
  12. Re: SetFocusRect with CheckBox (no .rc file). How to?

    Aaaaaand, it turns out the Checkbox automatically draws a focus rect when clicked on or when highlighted with tab.

    I just had a background that made it impossible to see the focus rect...

    For...
  13. Re: SetFocusRect with CheckBox (no .rc file). How to?

    Answering my own question here, heheh:



    Use GetDC(the Checkbox's HWND);
  14. [RESOLVED] SetFocusRect with CheckBox (no .rc file). How to?

    Can't seem to infer how to get a focusrect (dotted-line rectangle) around a WinAPI checkbox.

    Have tried DrawFocusRect() and also SendMessage() using SET_FOCUS. Maybe I got some parameters wrong?...
  15. Re: CreateDialog() without using Resource.h and '.rc' file..?

    Oh I found the error...

    I was forgetting to call DefWindowProc(hWnd, msg, WP, LP); in my AboutProc message handler:




    LRESULT CALLBACK AboutProc(HWND hWnd, MSG msg, WPARAM WP, LPARAM LP)
    {
  16. Re: CreateDialog() without using Resource.h and '.rc' file..?

    The dialog box doesn't appear.

    Main window becomes inactive when I call CreateWindow() but no Dialog Box appears.
  17. Re: CreateDialog() without using Resource.h and '.rc' file..?

    Oh... I found THIS:

    https://www.codeproject.com/articles/13330/using-dialog-templates-to-create-an-inputbox-in-c

    Let me know if there's anything else to add... :wave:
  18. CreateDialog() without using Resource.h and '.rc' file..?

    Trying to create a Modeless Dialog Box in WinAPI but without using a predefined Resource file.

    How would I go about doing that with CreateDialog()?

    Documentation states for the second...
  19. Re: Changing the Small and Big icons of a window using LoadImage... How to?

    IT WORKS!!!

    It turned out that I needed to convert the standard 24-Bit BMP file into a .ico file using a specialized Icon Converter piece of software.

    The only strange thing is:

    I still...
  20. Re: Changing the Small and Big icons of a window using LoadImage... How to?

    I was thinking the same thing... it must be the .ico file...

    I have made this file simply by saving a 16x16 .bmp with MSPAINT as a 256color bitmap with the file extension .ico:

    I get the error...
  21. Re: Changing the Small and Big icons of a window using LoadImage... How to?

    No improvement.
  22. Re: Changing the Small and Big icons of a window using LoadImage... How to?

    HICON hIconSm = (HICON)LoadImage(NULL, L"Icon.ico", ICON_IMAGE, 0, 0, LR_LOADFROMFILE | LR_DEFAULTSIZE);

    if(hIconSm == NULL)
    {
    MessageBox(hWnd, L"Icon returned NULL!!", L"Error", MB_OK);


    ...
  23. Re: Changing the Small and Big icons of a window using LoadImage... How to?

    I have specified:


    wc.hIconSm = LoadIcon(NULL, IDI_APPLICATION);

    Under WNDCLASSEX;

    Does LoadImage() and SendMessage() override this?

    I have placed LoadImage() and SendMessage()...
  24. Re: Changing the Small and Big icons of a window using LoadImage... How to?

    hIcon = 16x16, 24-Bit, BMP with file extension '.ico'

    Do I need to convert it to .ico? It already has that file extension...
  25. Re: Changing the Small and Big icons of a window using LoadImage... How to?

    So it's an error, but I don't know what type of error or what is causing it... so it's not much help. :(

    Any further ideas as to what I should try to fix this? I have done lots of research but...
Results 1 to 25 of 37
Page 1 of 2 1 2


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)