UserLibs

Blitz3D Forums/Blitz3D Beginners Area/UserLibs

Delerna(Posted 2005) [#1]
I have been checking out some of the win32 examples from the Userlibs code archive.
I have added the necessary decl files (downloaded from the Userlids archive) in my user libs folder, and I have closed and reopened my Blitz3D IDE.

Everytime I try to run the example I get a
"Function not found" error on the win32 function call in the example file. I have checked that the name for the call in the example and the name for the declaration in the decl file are the same.
What am I doing wrong


Hujiklo(Posted 2005) [#2]
Does it come with BB files to 'include' in your startup BB that you're not 'including'?


Rhyolite(Posted 2005) [#3]
Their is usualy a .dll file which is also best placed in the userlibs directory and your application/game directory.

Rhy :)


Delerna(Posted 2005) [#4]
Hujiklo
No, there are no includes in any of the source

Rhyolite
The examples are using the win32 dll's (kernal32.dll,user32.dll etc). My understanding is that they will be used from the windows system32 directory. Even so, I tried copying one of them to the userlibs directory and still got the same error.

Thanks guys for the hints


Here is an example of my exact scenario.

In my userlibs directory I have a file called "user32Decls.bb"
In that file there is a function declaration api_SystemParametersInfo%(uAction%, uParam%, lpvParam$, fuWinIni%):"SystemParametersInfoA"

Now I have a Blitz3D program that I downloaded and modified slightly (Name changes) from the forums that looks like.

; Required Userlib
; .lib "user32.dll"
; api_SystemParametersInfo%(uAction%, uParam%, lpvParam$, fuWinIni%):"SystemParametersInfoA"

AppTitle "Change Desktop Wallpaper by Eikon"
Graphics 640, 320, 16, 2

Const SET_WALLPAPER% = 20
Const UPDATE_INI_FILE% = 1

file$ = "Cash Out.bmp" ; Change to path of the wallpaper

ret% = api_SystemParametersInfo(SET_WALLPAPER%, 0, file$, UPDATE_INI_FILE%)
If Not ret% Then RuntimeError "Set Wallpaper failed!"



When I run that program I get

Function api_SystemParametersInfo not found

I could be way off base here but from the help file reguarding the userlibs directory I get the impression that blitz3D reads the decl files from there when it loads and adds any function declarations it finds there to its command list. It seems to me that that is not happening.
Any help would be appreciated


Delerna(Posted 2005) [#5]
Now that seach is no longer "Temporarily disabled" I have been able to find the answer to my problem. Thanks for trying Hujiklo and Rhyolite

Um, the problem was, in case your interested was the file extension I gave my decl file.

it needs to be filename.decls not filename.bb

(Sheepish grin)