I see the bug

by ComputerGhost (Login ComputerGhost)
R

 

The problem is that (after all of Window's typedefs are stripped of their meaning), the functions are getting wchar_t** when they are expecting wchar_t*.

For example, the FileName variable:

FileName is defined as a WCHAR[0x200] type.

At the GetModuleFileNameW line, FileName (WCHAR[0x200]) gets its address taken (WCHAR[0x200]*)... you basically have a pointer to a pointer to a WCHAR. You cast this to a LPWSTR and it works, but you're pointing to the pointer to the WCHAR, so GetModuleFileNameW fails.


Take off the address-of for the strings, and it should work. happy.gif

Posted on Sep 14, 2011, 10:18 AM

Respond to this message   

Return to Index

Response TitleAuthor and Date
Interesting.Michael Calkins on Sep 15
 Re: Interesting.ComputerGhost on Sep 15
  Re: Interesting.Michael Calkins on Sep 15
   Re: InterestingComputerGhost on Sep 15
    Re: InterestingMichael Calkins on Sep 16
   * const data goes in .rdata, not .textMichael Calkins on Aug 22

 Copyright © 1999-2014 Network54. All rights reserved.   Terms of Use   Privacy Statement