FotisSs wrote:
Is that typecasting needed, given that both char* and LPCTSTR are pointers.
Unicode issues aside, no, and not because they are both pointers. It's because the function's signature will treat the pointer argument as a const and not change it. On the other hand, if you had a function that was expecting a LPTSTR and you were passing it a const pointer, then casting would be an issue.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons