IonicWind Software

Creative Basic => General Questions => Topic started by: TexasPete on October 22, 2009, 01:32:34 PM

Title: Declaring Dlls
Post by: TexasPete on October 22, 2009, 01:32:34 PM

' -----Jpeg dll--------------------------
declare "resources\jpeg.dll",DeleteObject(hPic:int,re:int)
declare "resources\jpeg.dll",LoadImageFile (hW,file$:string)
declare "resources\jpeg.dll",ImageWidth(hImage:int)
declare "resources\jpeg.dll",ImageHeight(hImage:int)
declare "resources\image323.dll",ChangeSize(hBmp:int,Hwnd:int,nWidth:int,nHeight:int)



I think that I have done the declarations correctly.

If anyone sees and error I would appreciate and email.

Thanks Texas Pete
Title: Re: Declaring Dlls
Post by: aurelCB on October 22, 2009, 02:45:05 PM
First of all what is jpeg.dll is this from LB?
In Creative Basic you can load jpeg,gif,bmp without dll.s
see example Image View. 

You made errors with your way of declere:
For example:
Declare "Gdi32",DeleteObject(hObject AS INT),INT
is right way for declare api call DeleteObject not like you mean directly trough
declared string after declare command.
by the way if you wish use some dll you must use Api LoadLibraryA
Declare "kernel32",LoadLibraryA(lpLibFileName AS STRING),INT
I use for scintila:
declare "kernel32", LoadLibrary alias  LoadLibraryA( lp:string ),int
declare "kernel32", FreeLibrary( hnd:int )
Title: Re: Declaring Dlls
Post by: ZeroDog on October 22, 2009, 08:18:42 PM
declare "resources\jpeg.dll",LoadImageFile (hW:uint,file$:string)
Title: Re: Declaring Dlls
Post by: TexasPete on October 23, 2009, 05:08:59 AM
Thanks Aurel and zero dog, I now see several of my errors. I will also reread the instuctions. I forgot about loading the library. I also forgot about ulong.
I am aware that CB can load Pictures . I am learning and tinkering a little before I move on with my translation from LB to CB. I realize that I will be able
to remove a number of subroutines that I needed in Lb and will no longer have use for in CB.

Thanks
Texas Pete
Title: Re: Declaring Dlls
Post by: TexasPete on October 23, 2009, 05:55:30 AM
Aurel, Looking at an example made by alyce watson using here image32 dll, I see that she did not use the "loadLibray" from kernel 32. Her demo works fine without it. Aurel is this and undocumented requirement.  I did not find any mention of it under dll in CB Manual.

Any elaboration you may be able to offer would be helpful.

Thanks
Texas Pete
Title: Re: Declaring Dlls
Post by: aurelCB on October 23, 2009, 12:57:24 PM
First of all which demo- for Liberty?I guess?
I find on net that image32.dll is some kind of Trojan!!!!!!
I'm not sure but be careful or better ask her on LB forum about this dll....
Title: Re: Declaring Dlls
Post by: Alyce on October 24, 2009, 02:27:42 PM
Quote from: aurelCB on October 23, 2009, 12:57:24 PM
First of all which demo- for Liberty?I guess?
I find on net that image32.dll is some kind of Trojan!!!!!!
I'm not sure but be careful or better ask her on LB forum about this dll....

A trojan? Of course there is not. The demo is old -- last update 2003. It is for ibasic standard and can be found here:

http://alycesrestaurant.com/ibasic/

I know nothing of Creative BASIC (I use Emergence), but questions regarding IonicWind products belong here, not on another language's forum.

(In the past, I've been asked to share the code used to create the DLL. Sorry, but it is written in C, not in one of the languages here.)
Title: Re: Declaring Dlls
Post by: aurelCB on October 25, 2009, 03:16:34 AM
Just to solve one misunderstanding.
Pete write wrong name - image32.dll is not right.
Name of dll is IMAGE323.DLL which can:
QuoteThe DLL also includes support for loading jpg, bmp, ico, gif, wmf and emf image file

So what is the point ,all this types you can load without any dll-s in Creative Basic.
Advantage of using this dll will be some image effects which is good.
Title: Re: Declaring Dlls
Post by: Alyce on October 25, 2009, 06:04:07 AM
Quote from: aurelCB on October 25, 2009, 03:16:34 AM
So what is the point ,all this types you can load without any dll-s in Creative Basic.
Advantage of using this dll will be some image effects which is good.


You answered your own question. The point is the ability to manipulate the image for many effects.

http://alycesrestaurant.com/images/sample.jpg (http://alycesrestaurant.com/images/sample.jpg)

It appears from the first post that TexasPete wants to load the image, retrieve the dimensions and change the size. All of these can be done in Emergence (I don't have Creative, sorry) or with API calls. There is no need for a third party DLL unless he wants to add effects, like embossing, sharpening, blurring, etc.

(edited to fix typo)
Title: Re: Declaring Dlls
Post by: TexasPete on October 25, 2009, 06:22:09 AM
Right now I am just learning syntax and the ways to put things together.
I appreciate alyce and aurel for all there willingness to share. Here dll does work well for what it does.

Thanks
Texas Pete