News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Cant find GetStockObject() [Solved]

Started by lonewolff, March 01, 2009, 06:34:08 AM

Previous topic - Next topic

lonewolff

Hi there!

I cant seem to be able to invoke GetStockObject().
MSDN says to use windows.h and Gdi32.lib

So I have put this at the start of the code

include \masm32\include\windows.inc
include \masm32\include\user32.inc
includelib \masm32\lib\user32.lib
include \masm32\include\kernel32.inc
includelib \masm32\lib\kernel32.lib

But I get an error of 'Undefined Symbol - GetStockObject'.

Any ideas on why this might be?

Thanks in advance

sinsi

You've answered your own question.

include \masm32\include\gdi32.inc
includelib \masm32\lib\gdi32.lib

Light travels faster than sound, that's why some people seem bright until you hear them.

lonewolff

Geez, I was sure I tried that.

Must be getting tired.  :bg

Thanks for your help sinsi

lonewolff

Oh actually, I was misunderstanding things.

The inc files correspond to the lib files do they?

I was thinking in terms for C++ header files.

MichaelW

The MASM32 .inc files perform a similar function to the C/C++ header files, except most of them contain only procedure prototypes, with the constants, structures, etc concentrated in windows.inc. As it is for C/C++, most of them are specific to a .lib file.
eschew obfuscation