I have a problem with IJL15.DLL...
My declarations are ;

VB Code:
  1. Private Declare Function ijlInit Lib "ijl15.dll" (jcprops As Any) As Long
  2. Private Declare Function ijlFree Lib "ijl15.dll" (jcprops As Any) As Long
  3. Private Declare Function ijlRead Lib "ijl15.dll" (jcprops As Any, ByVal ioType As Long) As Long
  4. Private Declare Function ijlWrite Lib "ijl15.dll" (jcprops As Any, ByVal ioType As Long) As Long
  5. Private Declare Function ijlGetLibVersion Lib "ijl15.dll" () As Long
  6. Private Declare Function ijlGetErrorString Lib "ijl15.dll" (ByVal code As Long) As Long

I Open my DLL in the application path;

VB Code:
  1. Private Sub WriteJPGLib()
  2. On Error Resume Next
  3. If modJPG.InstalledOK = False Then
  4.     ' IJL15.DLL isn't installed. Wait! I have it in my resource file!
  5.     ' I'm going to write the Intel JPG handler in the Application's path
  6.     ' There's no need to put it in the system or system32 directory... it'll work here
  7.     b = -1
  8.     TargetDLL = App.Path
  9.     If Right(TargetDLL, 1) <> "\" Then TargetDLL = TargetDLL & "\"
  10.     TargetDLL = TargetDLL & "ijl15.dll"
  11.     b = FileLen(TargetDLL)
  12.     If b <= 0 Then
  13.         Dim a As Long
  14.         a = FreeFile
  15.         Open TargetDLL For Output As #a
  16.         Print #a, StrConv(LoadResData("INTEL_JPG", "CUSTOM"), vbUnicode);
  17.         Close #a
  18.         End If
  19.     End If
  20. End Sub

But when i call the library as;
VB Code:
  1. Public Function LoadJPG(ByRef cDib As cdibSection, ByVal sFile As String) As Boolean
  2. Dim tj As JPEG_CORE_PROPERTIES_VB
  3. Dim lR As Long
  4.  
  5.    lR = ijlInit(tj)
  6.    If lR = IJL_OK Then

It gives error saying that it can not find ijlInit.dll ?? although it is exist allready in the app.path!!!!!!!
I need Help