NO

Recent Posts

Pages: 1 2 [3] 4 5 ... 10
21
Windows questions / Re: Working with WMI
« Last post by bitcoin on June 24, 2019, 08:03:34 pm »
Thank you, it works! Can you tell me - if I want to track process always (forever) , will it be enough to replace Sleep (10000) to Sleep(INFINITE)? Or no?

I want to code service or program , that must works always, with windows startup to shutdown.
22
Windows questions / Re: Working with WMI
« Last post by TimoVJL on June 24, 2019, 06:45:23 pm »
for that frankie's example:
Code: [Select]
HRESULT STDMETHODCALLTYPE EventSink_Indicate(IWbemObjectSink *this, long lObjectCount, IWbemClassObject **apObjArray)
{
for (int i = 0; i < lObjectCount; i++)
{
printf("Event occurred %d/%d\n", i, lObjectCount);
IWbemClassObject *pIWbemClassObject = apObjArray[i];
//IWbemClassObject *pIWbemClassObject = *apObjArray;
VARIANT vcn;
HRESULT hr;
if (!(hr = pIWbemClassObject->lpVtbl->Get(pIWbemClassObject, L"__Class", 0, &vcn, NULL, NULL)))
{
if (vcn.vt == VT_BSTR)
printf("%ls\n", vcn.bstrVal);
VariantClear(&vcn);
}
else
printf("error: 0x%Xh\n", hr);
if (!(hr = pIWbemClassObject->lpVtbl->Get(pIWbemClassObject, L"TargetInstance", 0, &vcn, NULL, NULL)))
{
IUnknown *pUnk = vcn.punkVal;
IWbemClassObject *pIWbemClassObject1;
if (!(hr = pUnk->lpVtbl->QueryInterface(pUnk, &IID_IWbemClassObject, (void **)&pIWbemClassObject1)))
{
VARIANT vcn1;
if (!(hr = pIWbemClassObject1->lpVtbl->Get(pIWbemClassObject1, L"Name", 0, &vcn1, NULL, NULL)))
{
printf("%ls\t", vcn1.bstrVal);
VariantClear(&vcn1);
}
VARIANT vcn2;
if (!(hr = pIWbemClassObject1->lpVtbl->Get(pIWbemClassObject1, L"Handle", 0, &vcn2, NULL, NULL)))
{
printf("%ls\n", vcn2.bstrVal);
VariantClear(&vcn2);
}

}
VariantClear(&vcn);
}
else
printf("error: 0x%Xh\n", hr);
}

return WBEM_S_NO_ERROR;
}
23
Windows questions / Working with WMI
« Last post by bitcoin on June 24, 2019, 02:44:54 pm »
Hello, I don't know how use WMI, because its terrible COM everywhere  :(

This sample https://github.com/Frankie-PellesC/fSDK/tree/master/Samples_and_Tests/WMI/Notifications_WMI

How (and where) I can get new (created) process name and handle?

I want to write some monitoring tool, to track CreateProcess (and suspend it). How to do it? Help please
24
Bug reports / Debugging is very slow on my laptop
« Last post by matze on June 24, 2019, 04:54:14 am »
Hello, I have a problem with Pelles C, version 9.00.9.
Debugging a win64 GUI application is very slow; each execution step takes a few seconds: the current line is executed quickly and jumped to the next line. After that, Pelles C is occupied with itself and is not usable for me for a few seconds. In version 8, this problem does not occur so far, which is why I have not yet used the latest version of Pelles C to work. I have a laptop with fairly slow processor (Pentium Silver N5000) and Windows 10 Professional.
greeting Matze
25
Beginner questions / Re: defined constant to identify Pelles?
« Last post by Harvey on June 23, 2019, 10:46:45 am »
Perfect. Thanks.
26
Beginner questions / Re: defined constant to identify Pelles?
« Last post by TimoVJL on June 23, 2019, 10:14:50 am »
__POCC__
__POCC_TARGET__

with compiler option /Ze:
_WIN64
27
Beginner questions / defined constant to identify Pelles?
« Last post by Harvey on June 23, 2019, 10:04:33 am »
I want to determine in my c code if it is being compiled by Pelles .... (and what else like 32bit or 64bit)
Something like:
#ifdef PELLESC
 ...
#endif

Thank you
28
Windows questions / Re: How do I define WinProc?
« Last post by Abraham on June 21, 2019, 07:24:18 am »
Clearly, like TimoVJL showed without stating, you are missing your function prototype by having the function below WinMain.

I prefer to have WinMain at the bottom of my source code so that I do not have to deal with having prototypes. Even though a prototype is just a copy and paste of a single line.
29
Work in progress / Re: fSDK© - Frankie's SDK for PellesC
« Last post by TimoVJL on June 18, 2019, 06:28:39 pm »
PellesC don't support COMDAT  :(

So one source and an UNICODE support source file DxErrW.c for library
Code: [Select]
// DxErrW.c
#define UNICODE
#include "DxErr.c"

EDIT: DXUT
30
Work in progress / Re: fSDK© - Frankie's SDK for PellesC
« Last post by Abraham on June 18, 2019, 05:28:48 pm »
DxErr.lib in "DirectX SDK June 2010" is not linking because of external dependencies.

Clarify: This issue occurs with Windows 10, and maybe those that have Windows SDK.

I've made changes.
Use this one, and compile manually DxErr.lib for your settings:
x86 or x64.
Static Single Thread, Static Multi-Thread, or Dynamic Multi-Thread.
Pages: 1 2 [3] 4 5 ... 10