ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 64Bit and 32Bit problem while deploying
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

yogiyang

India
725 Posts

Posted - Aug 03 2018 :  06:16:49  Show Profile  Reply
Hello,

We are facing a very unusual problem in a software that we have developed using ImageEn and IEVision.

The software is compiled in Delphi Seattle for 64Bit Platform.

We have distributed the software to a few users. All the users are using 64Bit versions of Windows. The lowest is Windows 7 (SP1) and the highest is Windows 10.

On around 27 PCs the 64Bit version of out software is not working. It keeps on showing the standard error message about IEVision library not found. Inspite of the fact that the files:
  • ievision64.dll
  • ielib64.dll

are located in the executable folder ifself.

Now the unusual part...

Yesterday we compiled our software for 32Bit Platform and deployed to some of the users on whose PCs 64Bit Platform version of our software is not working.

And to our surprise the 32Bit Platform version of our software worked like a charm.!!!!

I don't understand as to why this is happening.

It is due to ImageEn or IEVision?

If anyone has faced such a problem please help solve this problem.

TIA


Yogi Yang

xequte

38176 Posts

Posted - Aug 05 2018 :  06:38:55  Show Profile  Reply
Hi Yogi

V8 adds a lot more logging information about DLL load failures.

Please take a look at:

https://www.imageen.com/help/IEDLLLoadLog.html

And let me know what information it returns after trying to load on the problematic systems.



Nigel
Xequte Software
www.imageen.com
Go to Top of Page

yogiyang

India
725 Posts

Posted - Aug 06 2018 :  08:36:51  Show Profile  Reply
Hello Nigel,

Thanks for the link.

Here is the logging information:
IEVision Initialization...
ievision64.dll: 0
ielib64.dll: 6442450944
IEVision Version: 4.5.0.0
IEVision Create: FAILED


TIA


Yogi Yang
Go to Top of Page

xequte

38176 Posts

Posted - Aug 07 2018 :  01:59:31  Show Profile  Reply
Hi Yogi

What method do you use to initialize IEVision or IELib in your code?

Also, you should not include both ievision64.dll and ielib64.dll. Does removing ielib64.dll from the folder make any difference?



Nigel
Xequte Software
www.imageen.com
Go to Top of Page

yogiyang

India
725 Posts

Posted - Aug 10 2018 :  03:12:57  Show Profile  Reply
Hello

No removing ielib64.dll does not make any difference.

TIA


Yogi Yang
Go to Top of Page

xequte

38176 Posts

Posted - Aug 10 2018 :  06:13:36  Show Profile  Reply
Hi Yogi

What method do you use to initialize IEVision?

Can you give me the logging information again (when just IEVision64.dll is on the system).


Nigel
Xequte Software
www.imageen.com
Go to Top of Page

w2m

USA
1990 Posts

Posted - Aug 10 2018 :  08:56:45  Show Profile  Reply
Also, make sure you are using the dlls shipped with the version you are using. Old dlls may cause a problem.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

yogiyang

India
725 Posts

Posted - Aug 13 2018 :  08:26:37  Show Profile  Reply
Hello,

Here is the logging information with IEVision64.dll file only placed in the EXE folder:

IEVision Initialization...
ievision64.dll: 0
ielib64.dll: 0


TIA


Yogi Yang
Go to Top of Page

xequte

38176 Posts

Posted - Aug 13 2018 :  23:08:38  Show Profile  Reply
Hi Yogi

What code do you use to initialize IEVision? Have you tried calling it explicitly, e.g.

  if FileExists( ExtractFilePath( Application.Exename ) + 'IEVision64.dll' ) then
    IEInitialize_ievision( ExtractFilePath( Application.Exename ) + 'IEVision64.dll', False)
  else
    raise Exception.create( 'File not found: ' + ExtractFilePath( Application.Exename ) + 'IEVision64.dll' );


Nigel
Xequte Software
www.imageen.com
Go to Top of Page

yogiyang

India
725 Posts

Posted - Aug 14 2018 :  06:17:58  Show Profile  Reply
Hello,
 
Hmm, that means the DLL is not being located.

This is what surprises me because the DLL is in the folder of the executable.

The code that I am using is standard:

sDLLPath := FindIEVisionDLLPath;
  if sDLLPath <> '' then
    IEInitialize_ievision(sDLLPath, False); // Initialize DLL in custom location
if not IEVisionAvailable() then
begin
  ShowMessage('dll not found');
  Application.Terminate;
  Exit;
end;


TIA


Yogi Yang
Go to Top of Page

xequte

38176 Posts

Posted - Aug 14 2018 :  20:30:07  Show Profile  Reply
Hi Yogi

Yes, but what code are you using for FindIEVisionDLLPath?

If you just copied this from the IEVision demos, then they do not check for ievision64.dll (in the coming 8.0.2 they do), only the 32bit files.



Nigel
Xequte Software
www.imageen.com
Go to Top of Page

yogiyang

India
725 Posts

Posted - Aug 14 2018 :  23:58:37  Show Profile  Reply
Hello Nigel,

But that is the code that I am using.

Can you suggest any other way to find and initialize the IEVision DLL?

Do I need to distribute ielib64.dll with my 64Bit applications? Currently I am distributing this file also...

TIA


Yogi Yang
Go to Top of Page

xequte

38176 Posts

Posted - Aug 15 2018 :  16:26:16  Show Profile  Reply
Hi

If you ship IEVision, then do NOT ship ielib.

You should not need to "find" the DLL if it is the same folder asyour app EXE. You only need to call IEVisionAvailable to initialize IEVision.

procedure TMainForm.FormCreate(Sender: TObject);
begin
  if not IEVisionAvailable() then
  begin
    ShowMessage('IEVision not found!');
    Exit;
  end;
  ...



You should NOT need to call IEInitialize_ievision unless you are using a custom DLL location.

But for your testing, please try using the following the code:

function GetIEVisionDLLPath() : string;
var
  sDLLName: string;
begin
  {$ifdef WIN64}
  sDLLName := IEVISION_64BIT_DLL_FILENAME;
  {$else}
  sDLLName := IEVISION_32BIT_DLL_FILENAME1;
  {$endif}

  Result := IncludeTrailingBackSlash(ExtractFilePath(Application.ExeName)) + sDLLName;
end;


procedure TMainForm.FormCreate(Sender: TObject);
var
  sDLLPath: string;
begin
  sDLLPath := GetIEVisionDLLPath();
  if not FileExists( sDLLPath ) then
    raise Exception.create( 'File not found: ' + sDLLPath );
  IEInitialize_ievision(sDLLPath, False); // Initialize DLL in custom location
  if not IEVisionAvailable() then
  begin
    ShowMessage('dll not found');
    Exit;
  end;
  ...



Nigel
Xequte Software
www.imageen.com
Go to Top of Page

yogiyang

India
725 Posts

Posted - Aug 20 2018 :  09:20:57  Show Profile  Reply
Hello Nigel,

After making changes to code as per your suggestions.

Here is the log file that is generated on user PC:


IEVision Initialization...
ievision64.dll: 0
ielib64.dll: 0


TIA


Yogi Yang
Go to Top of Page

yogiyang

India
725 Posts

Posted - Aug 20 2018 :  09:56:42  Show Profile  Reply
Hello Nigel,

I forgot to give the code that I am currently using:


  sDLLPath := GetIEVisionDLLPath();
  if not FileExists( sDLLPath ) then
    raise Exception.create( 'Resource File not found: ' + sDLLPath );

  //Above lines are finds the DLL in the exe folder but IEVisionAvailable() Fails
  if not IEVisionAvailable() then
  begin
    ShowMessage
      ('This application requires the ievision.dll plugin. Please contact our Customer Support');
    memo1.text:= IEDLLLoadLog();
    Memo1.Lines.SaveToFile(ChangeFileExt(Application.ExeName, '.log'));
    Application.Terminate;
  end;



TIA


Yogi Yang
Go to Top of Page

xequte

38176 Posts

Posted - Aug 21 2018 :  00:52:50  Show Profile  Reply
Hi Yogi

Sorry, you forgot to call:

IEInitialize_ievision(sDLLPath, False); // Initialize DLL in custom location


Nigel
Xequte Software
www.imageen.com
Go to Top of Page

yogiyang

India
725 Posts

Posted - Aug 24 2018 :  05:51:22  Show Profile  Reply
Hello Nigel,

Thanks for pointing out my mistake.

I thought that line should only be used if the DLL is located in any folder except the executable folder.

Anyways, the Log after making changes are:

IEVision Initialization...
C:\XXXxxx\ievision64.dll: 0
IEVision Initialization...
ievision64.dll: 0
ielib64.dll: 0


TIA


Yogi Yang
Go to Top of Page

xequte

38176 Posts

Posted - Aug 29 2018 :  03:42:15  Show Profile  Reply
Hi Yogi

The only thing we can think of is to check the ACL (access control) for the DLL. For both the folder and DLL ensure that the users have full access (by selecting the Properties of the item, and checking the Security tab.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: