I would like to create a COM application using VC++6.0 wherein I require the complete screen to be captured using the PrintScreen (VK_SNAPSHOT) functionality and the output to be printed out (send to Printer). I could use the keyboard event with VK_SNAPSHOT but I failed to send it to the Printer.
I have a function like this
void fn_VersionInfo(const char** EngineVersionInfo)
I have to initialize a string into "EnginneVersionInfo" variable of function parameter. Can any body help me.
You pass it a pointer to a pointer to a bunch of chars.
In C/C++, the most basic string is a pointer to a bunch of chars, usually NULL terminated.
So, we can say that fn_VersionInfo takes a pointer to a string. So you pass a pointer to a string.
That could either be a string you create yourself, or one that function creates for you. I suspect the latter, but you'll have to read the documentation to discover that.
Where is this function from? Does it have any documentation? Can you read the source?
If you let it create a string, who is responsible for deleting it afterwards?
Answering that last question will answer your original question.
*Not* looking for the answer to my last question means you will at best get bad habits, at worst will make your software crash when two parts of it try and tidy up the same variable twice.
ps, I appear to be dishing out lessons in paranoid programming today. Like there's any other kind...
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[^]