The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Darrel on April 22, 2006, 11:15:39 AM

Title: unresolved external symbol _EnableTheming@4
Post by: Darrel on April 22, 2006, 11:15:39 AM
This is the error I am recieving when compiling the following code.
.386
.model flat,stdcall
option casemap:none

include \masm32\include\WINDOWS.inc
include \masm32\include\kernel32.inc

EnableTheming PROTO :DWORD

includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\uxtheme.lib

.data

.data?

.const

IDI_LOGO equ 500

.code

Start:
INVOKE EnableTheming,TRUE ;uxtheme.dll

INVOKE ExitProcess,eax ;kernel32.dll

END Start


I built the uxtheme.lib according to Make .LIB from dll (http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q131/3/13.asp&NoWebContent=1)
Title: Re: unresolved external symbol _EnableTheming@4
Post by: Mincho Georgiev on April 22, 2006, 11:23:10 AM
To use invoke, you need to have a prototype of the function, otherwise you need to use push args and call Function.
In the best case you can get ,you can use

EnableTheming PROTO C:VARARG

Otherwise ,you will have to load the DLL ,find the function and calling it.
Title: Re: unresolved external symbol _EnableTheming@4
Post by: Darrel on April 22, 2006, 12:14:48 PM
Thanks shaka

EnableTheming PROTO C:DWORD

worked.