| ahbazzi (45) | ||
|
I am using function GetClassName for a given HWND. The function is giving error: "Invalid access to memory location". I guess the problem is in the out parameter. As per msdn, GetClassName takes:
Any ideas? Please help.. | ||
|
|
||
| freddie1 (847) | |
| Offending code not shown. What does your function call look like? | |
|
|
|
| ahbazzi (45) | |||
|
Hi Freddie I am benefiting too much from your code in www.jose.it-berater.org site.. Anyway, the call of my function is below:
I tried to put & before the clsName_v but didnt work either. I found a work around by splitting the switch statement that I am using. However, I would appreciate if I know where is my mistake. BR | |||
|
|
|||
| guestgulkan (2915) | |||
|
LPTSTR clsName_v means a pointer to a buffer provided by you - Windows will place the class name into this buffer if the call succeeds int numChr is the length of the buffer in characters ; (Note that GetClassName function is available as ANSI and Wide Char versions so beware when calculating the size of the buffer;) Example:
| |||
|
Last edited on
|
|||