How to Initialise an instance of GUITHREADINFO

77 Views Asked by At

I have declared the following

GUITHREADINFO gui;

The Coverity complains that gui is not initialised.

Can you please tell me how do I initialise it?

Best Regards

Chintan

1

There are 1 best solutions below

1
On

Well, you obviously need to populate the structure members with relevant data, but you can initialise it to zeros before doing so like this:

GUITHREADINFO gui = {0};

Before using it, refer to MSDN to see what data should be set in each field. For exmaple:

gui.cbSize = sizeof(GUITHREADINFO);

// ... etc.