News:

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

Problem Calling API Function

Started by Astro, July 28, 2009, 05:11:29 PM

Previous topic - Next topic

Astro

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.

Slugsnack

include \masm32\inc\setupapi.inc
includelib \masm32\lib\setupapi.lib

dedndave

include \masm32\include\setupapi.inc
includelib \masm32\lib\setupapi.lib

you were very close, though, Mike - lol

Slugsnack

wahhh how do you know my name.. ?

dedndave

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

Astro

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.