tsxy2007 / google-breakpad

Automatically exported from code.google.com/p/google-breakpad
0 stars 0 forks source link

Compiler problems with VisualStudiao 2010/64 bit. #560

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run gyp to create a visual studio project.
2. Open VisualStudio 2010, and select to build for x64 (64-bit).
3. Compile

What is the expected output? What do you see instead?
I get a compiler error:

crash_generation_app.cc(365): error C2065: 'GWL_HINSTANCE' : undeclared 
identifier

What version of the product are you using? On what operating system?

Breakpad is updated from trunk today. OS==Windows 2012 server, 64 bit using 
Visual Studio 2010.

Please provide any additional information below.

A possible solution (that makes it compile and link) is to replace line 365 
with:

  HINSTANCE instance = (HINSTANCE)GetWindowLongPtr(wnd, GWLP_HINSTANCE);

I am however not qualified to judge the correctness. Microsoft recommends using 
this function: 
http://msdn.microsoft.com/en-us/library/windows/desktop/ms633584%28v=vs.85%29.as
px

I was a bit worried that the cast to HINSTANCE would not be good, but I see 
this construction in numerous examples on the web.

Original issue reported on code.google.com by kristofe...@dgbes.com on 13 Jan 2014 at 2:55

GoogleCodeExporter commented 9 years ago
Sounds good, will do: https://breakpad.appspot.com/1104002/

Original comment by thestig@chromium.org on 18 Jan 2014 at 12:37

GoogleCodeExporter commented 9 years ago
Thanks for the quick reply. Have a good weekend!

Original comment by kristofe...@dgbes.com on 18 Jan 2014 at 2:34

GoogleCodeExporter commented 9 years ago
http://code.google.com/p/google-breakpad/source/detail?r=1276

Original comment by thestig@chromium.org on 21 Jan 2014 at 7:23