PureBasic Forum
https://www.purebasic.fr/english/

New DLL Library
https://www.purebasic.fr/english/viewtopic.php?f=5&t=2901
Page 1 of 1

Author:  BackupUser [ Tue Sep 18, 2001 12:49 am ]
Post subject: 

Restored from previous forum. Originally posted by Mr.Skunk.

Will allow you to call all the 3rd part DLL you want.

Comes with an example to load JPG, JIF, GIF, BMP, DIB, RLE, TGA, PCX formats in PB using the NViewLib (provided in the exemple package)

Read the doc carefully about the CallDLLx() function (special function).

Feel free to ask if you've any problem.


Mr Skunk

Mr Skunk's PureBasic Web Page
http://www.skunknet.fr.st

Author:  BackupUser [ Tue Sep 18, 2001 4:29 pm ]
Post subject: 

Restored from previous forum. Originally posted by Franco.

Excellent work Mr.Skunk, your LIB works good! Very fast loading of images.
The only thing is that when you have more opened windows your window is not on top.
So I changed the code to:

-snip-
Repeat
ev.l=WaitWindowEvent()
If ev.l=#WM_PAINT
BitBlt_(*dc,0,0,Width,Height,*dcm,0,0,13369376)
SetForegroundWindow_(WindowID());<- this added
EndIf
Until ev.l=#PB_EventCloseWindow
-snip-

What I miss in the example is a freeDLL command.
Is this not necessary to unload the DLL from memory?
Well in other languages it is highly necessary because of memoty leaks.



Have a nice day...
Franco

Author:  BackupUser [ Tue Sep 18, 2001 6:48 pm ]
Post subject: 

Restored from previous forum. Originally posted by Franco.

Sorry, my changes works not properly when you build a EXE file.
You have to put the 'SetForegroundWindow_(WindowID())' command
right after the 'OpenWindow' command.
Sorry for that...



Have a nice day...
Franco

Author:  BackupUser [ Wed Sep 19, 2001 4:30 am ]
Post subject: 

Restored from previous forum. Originally posted by Mr.Skunk.

hummm yes, i forgot this command, thanks.

The speed is not due to my library, but to the NViewLib...

It's not necessary to have a freelibrary_() call, as windows will free the libs for you (if they are not used by other apps) at the end of your prog. But If you want to free the Library before the end of your prog (if you need it only once somewhere in your prog), just tell me and i will add a FreeDLL() command...

Is anybody interested by the other commands of the NViewLibs (even if the DLL has some problems with loading most of the Jpeg pictures) ?

And, if someone knows a good free DLL to load pictures (without the NViewLib problems about Jpeg), tell me, i'm searching for...

Thanks


Mr Skunk

Mr Skunk's PureBasic Web Page
http://www.skunknet.fr.st

Edited by - mr.skunk on 19 September 2001 05:43:37

Author:  BackupUser [ Wed Sep 19, 2001 4:43 pm ]
Post subject: 

Restored from previous forum. Originally posted by Franco.

Hi Mr.Skunk,
yes I would appreciate a FreeDLL command. So the programmer can avoid to use a bunch of memory (sometimes some DLL's have a horrendous amount of size)

If you are looking for a free JPEG-DLL thake a look to:
http://heliso.tripod.com/
goto -> Programming -> JPEG Programming you will find what you need.

But what I said before, some DLL's are very big, this one 1.5MB!!!

I found also a possibility to use the Windows OLEAUT32.DLL so you don't have to use external DLL's. While PureBasic has a OLEAUT32 library, I suppose it can be done under PureBasic.
I have freeware sourcecode in BCX-Basic (a mixture of Basic and C) that I can send to you if you want, so you can look how to handle this stuff.
The exe file with this code is only 7200 bytes!
You can load BMP, GIF, JPG, WMF, EMF, & ICO.



Have a nice day...
Franco

Author:  BackupUser [ Wed Sep 19, 2001 6:58 pm ]
Post subject: 

Restored from previous forum. Originally posted by Mr.Skunk.

Hi

Thanks for your link, i will check it.

Yes, i'm interested by your source, if you can send it.

Mr Skunk

Mr Skunk's PureBasic Web Page
http://www.skunknet.fr.st

Author:  BackupUser [ Tue Sep 25, 2001 5:12 pm ]
Post subject: 

Restored from previous forum. Originally posted by Franco.

Hello Mr.Skunk
there is another dll on:
http://jansfreeware.com/jfobjects.htm#jangraphics
In the zip file is a VB example.
Don't know how difficult it would be to use it with PureBasic.




Have a nice day...
Franco

Author:  BackupUser [ Wed Sep 26, 2001 4:43 am ]
Post subject: 

Restored from previous forum. Originally posted by Mr.Skunk.

thanks, for that.
will check this week-end

Mr Skunk

Mr Skunk's PureBasic Web Page
http://www.skunknet.fr.st

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/