Thread View: pl.comp.lang.c
5 messages
5 total messages
Started by Borneq
Wed, 18 Jan 2017 09:27
Parametry innego procesu Win&Lin
Author: Borneq
Date: Wed, 18 Jan 2017 09:27
Date: Wed, 18 Jan 2017 09:27
9 lines
1226 bytes
1226 bytes
Do startu mojego programu wymagane jest by wcześniej był uruchomiony bitcoind i to z parametrem -zmqpubrawblock=tcp://127.0.0.1:28332 oraz -zmqpubrawtx=tcp://127.0.0.1:28332 Linux: ps -Al |grep "bitc" daje mi informacje. Jest jedna możliwość: podkatalogi katalogu /proc a tam plik cmdline, ale jak próbowałem zrobić to pod Double Commanderem, pliki mają długość zero. Windows: jak to zrobić pod Windows?
Re: Parametry innego procesu Win&Lin
Author: Borneq
Date: Thu, 19 Jan 2017 06:56
Date: Thu, 19 Jan 2017 06:56
5 lines
1037 bytes
1037 bytes
W dniu 18.01.2017 o 10:27, Borneq pisze: > jak to zrobić pod Windows? https://msdn.microsoft.com/en-us/library/aa394558%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396 ?
Re: Parametry innego procesu Win&Lin
Author: Borneq
Date: Thu, 19 Jan 2017 07:36
Date: Thu, 19 Jan 2017 07:36
10 lines
1233 bytes
1233 bytes
W dniu 18.01.2017 o 10:27, Borneq pisze: > jak to zrobić pod Windows? Używam CreateToolhelp32Snapshot ale zwraca mi tylko moduły; OpenProcess otwiera ale co dalej? https://gist.github.com/borneq/8e5885773c315cd85ac75eb2a3f4bada Pod Linuxem mam zrobione, potrzebuję pod Windows Może https://msdn.microsoft.com/en-us/library/aa394558%28v=vs.85%29.aspx ?
Re: Parametry innego procesu Win&Lin
Author: Borneq
Date: Thu, 19 Jan 2017 07:55
Date: Thu, 19 Jan 2017 07:55
23 lines
1624 bytes
1624 bytes
W dniu 19.01.2017 o 08:36, Borneq pisze:
> W dniu 18.01.2017 o 10:27, Borneq pisze:
>> jak to zrobić pod Windows?
>
> Używam CreateToolhelp32Snapshot ale zwraca mi tylko moduły;
> OpenProcess otwiera ale co dalej?
> https://gist.github.com/borneq/8e5885773c315cd85ac75eb2a3f4bada
for (int i = 0; i < cbNeeded / sizeof(DWORD); i++)
{
HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION |
PROCESS_VM_READ,false, ProcessIds[i]);
if (hProcess != 0)
{
char buf[MAX_PATH];
DWORD ret = GetModuleBaseNameA(hProcess, NULL, buf, MAX_PATH);
buf[ret] = 0;
printf("%d %s\n", ProcessIds[i],buf);
CloseHandle(hProcess);
}
}
Podaje nazwy, ale dla wielu np. dla zwykłego Chrome nie podaje (?)
Re: Parametry innego procesu Win&Lin
Author: Borneq
Date: Thu, 19 Jan 2017 08:00
Date: Thu, 19 Jan 2017 08:00
5 lines
1119 bytes
1119 bytes
W dniu 19.01.2017 o 08:55, Borneq pisze: > Podaje nazwy, ale dla wielu np. dla zwykłego Chrome nie podaje (?) Wiem! Bo mam Windows 64 bitowy a skompilowałem na 32 bity; na 64 bity jest OK
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads