The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Astro on July 28, 2009, 05:11:29 PM

Title: Problem Calling API Function
Post by: Astro on July 28, 2009, 05:11:29 PM
Hi,

I've got a problem calling an API.

Building...
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997.  All rights reserved.

Assembling: enumusb.asm
enumusb.asm(120) : error A2006: undefined symbol : SetupDiGetClassDevs
enumusb.asm(148) : error A2006: undefined symbol : SetupDiEnumDeviceInterfaces
enumusb.asm(172) : error A2006: undefined symbol : SetupDiGetDeviceInterfaceDetail
enumusb.asm(215) : error A2006: undefined symbol : SetupDiDestroyDeviceInfoList

If I add the prototypes to the top of the source, I get "unresolved external symbol" errors instead.

Any help appreciated.

AFAIK I need to use functions in SetupAPI.

Best regards,
Astro.
Title: Re: Problem Calling API Function
Post by: Slugsnack on July 28, 2009, 05:14:32 PM
include \masm32\inc\setupapi.inc
includelib \masm32\lib\setupapi.lib
Title: Re: Problem Calling API Function
Post by: dedndave on July 28, 2009, 05:20:30 PM
include \masm32\include\setupapi.inc
includelib \masm32\lib\setupapi.lib

you were very close, though, Mike - lol
Title: Re: Problem Calling API Function
Post by: Slugsnack on July 28, 2009, 05:24:02 PM
wahhh how do you know my name.. ?
Title: Re: Problem Calling API Function
Post by: dedndave on July 28, 2009, 05:28:51 PM
it is in the path on your other thread about piping - lol
i read all your stuff
i haven't got to gui porgramming, yet (soon, though)
i want to learn a bit more about the pentium instruction sets (mmx, sse, etc)
and a few more API functions i haven't played with
then, i'll be ready to learn gui
Title: Re: Problem Calling API Function
Post by: Astro on July 28, 2009, 06:29:13 PM
When you're having one of those days, you just know you should have gone back to sleep.  :eek

I could have sworn I already looked for that. I ended up looking in the MS Driver SDK for it.

Arrrgh!!

Thanks.

Best regards,
Astro.