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.
declare "jpeg.dll",LoadImageFile (Hwnd:int,file$:string),int
Just puzzled.
Texas pete
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...
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
Hiden.. ???
Why is hiden?
If is hiden i think that canot be found..
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
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.
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.
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
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