Jump to content
  • Imagina que você tá lá no Linux, macOS ou mesmo no Windows e quer saber quantos são e quais os parâmetros da função, por exemplo, CreatePipe(), da API do Windows. O que você faz? Bom, se estiver num ambiente gráfico, pode buscar na internet, mas no Linux é muito mais rápido usar o man né? Só que o man contém as funções da API do Linux, não do Windows. E agora? Pensando nisso, o @Leandro Fróes implementou o manw. Olha que maravilha:

    > .\manw64.exe createpipe
    CreatePipe function (namedpipeapi.h) - Win32 apps
    
    Exported by: Kernel32.dll
    
    Creates an anonymous pipe, and returns handles to the read and write ends of the pipe.
    
    BOOL CreatePipe(
      [out]          PHANDLE               hReadPipe,
      [out]          PHANDLE               hWritePipe,
      [in, optional] LPSECURITY_ATTRIBUTES lpPipeAttributes,
      [in]           DWORD                 nSize
    );
    
    Return value: If the function succeeds, the return value is nonzero.If the function fails, the return value is zero.
    
    Source: https://docs.microsoft.com/en-us/windows/win32/api/namedpipeapi/nf-namedpipeapi-createpipe

    E não para nas funções da API do Windows. É possível buscar uma estrtura por exemplo:

    > .\manw64.exe -s PROCESS_INFORMATION
    PROCESS_INFORMATION (processthreadsapi.h) - Win32 apps
    
    Contains information about a newly created process and its primary thread. It is used with the CreateProcess, CreateProcessAsUser, CreateProcessWithLogonW, or CreateProcessWithTokenW function.
    
    typedef struct _PROCESS_INFORMATION {
      HANDLE hProcess;
      HANDLE hThread;
      DWORD  dwProcessId;
      DWORD  dwThreadId;
    } PROCESS_INFORMATION, *PPROCESS_INFORMATION, *LPPROCESS_INFORMATION;
    
    Source: https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/ns-processthreadsapi-process_information

    E tem muito mais. 🙂

    Código-fonte e releases para vários sistemas operacionais disponíveis no repositório do autor no Github.

     Share


    User Feedback

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest

    • This will not be shown to other users.
    • Add a review...

      ×   Pasted as rich text.   Restore formatting

        Only 75 emoji are allowed.

      ×   Your link has been automatically embedded.   Display as a link instead

      ×   Your previous content has been restored.   Clear editor

      ×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...