September 26, 2020, 06:32:54 pm

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Cb Doesn't find Dll

Started by TexasPete, April 08, 2010, 04:24:03 am

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TexasPete

I have the following Dll that I am using with my program. When I First load my program and then try to run it. It gives me the error message that it could not fine the dll. I have placed the dll in the same folder with the program.  In my other language this was fine. Do I need a complete path in order to stop this from happening. If I save my program using "Save As " and then try to run it. The program finds the Dll without problem.

Code Select


declare "jpeg.dll",LoadImageFile (Hwnd:int,file$:string),int



Just puzzled.
Texas pete

aurelCB

April 08, 2010, 05:18:25 am #1 Last Edit: April 08, 2010, 05:21:31 am by aurelCB
Do you load dll with LoadLibraryA api first?
Try use Getstartpath+(dll.name).
I try in code which you send me but dont work on my computer ???

Infact i dont find any dll with name jpeg.dll i only find image323.dll...
forum for hobby programming:<br />https://aurelsoft.ucoz.com

TexasPete

April 08, 2010, 06:39:04 am #2 Last Edit: April 08, 2010, 06:43:23 am by TexasPete
Aurel, I will check for the jpeg.dll and I will try getstartpath.
I haven't tried the load api yet . I will do so some time today.

Thanks
Texas Pete
I am tying int the snap to grid code for the movement routine today.
Aurel the jpeg.dll is a hidden file, sorry I forgot that I had applied that
to the properties

aurelCB

April 08, 2010, 08:08:09 am #3 Last Edit: April 08, 2010, 01:03:03 pm by TexasPete


Hiden.. ???
Why is hiden?
If is hiden i think that canot be found..
forum for hobby programming:<br />https://aurelsoft.ucoz.com

TexasPete

Aurel,
I change the declare to include GetStartPath and it works. However , the other dll I use now does not work. If I Save the program file using "Save As" and then run the program, the program comes right up.

I find this to be perplexing. It is like the Startpath is changing and I havn't done anything.

Perplexed ,
Texas Pete

aurelCB

Pete..
I really dont understand what's heapend with your computer.
maby you have problems with registry.Try clean registry and defragment disk.
I never had similiar problems.
forum for hobby programming:<br />https://aurelsoft.ucoz.com

Ionic Wind Support Team

When you "run" a CBasic program it is not running in the directory that the source it located in, it is running in the directory that the IDE is running it.

Copy the DLL either to the windows/system32 directory or to the C:\Program Files\Ionic Wind\Creative BASIC directory while you are creating your program.  After you build the executable then you can put the DLL in the folder that your executable exists in.

Ionic Wind Support Team

TexasPete

Thanks Paul, That solved a problem.
Why can I just tell it where the dll is using getstartPath. It worked on one dll but not the other.
Thanks Texas Pete

LarryMc

Quote from: TexasPete on April 11, 2010, 08:32:52 am
Why can I just tell it where the dll is using getstartPath.
'Cause you can't ;)

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library