I have the following code:
HANDLE h = NULL;
init(h);
dosomething(h);
How do I set “h” in the init function in order to use it in the dosomething function?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to pass the address of
htoinit()as C passes by value:and invoked:
In addition to passing the address of the
HANDLEintoinit(), depending on action required in event of failure to acquire aHANDLE, you may also pass in the address ofDWORDto store the last error in the event of failure to make this information available to the caller: