• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 

LPT comp no longer works after upgrade to 9.19?

Started by chedges, June 30, 2011, 09:50:59 am

Previous topic - Next topic

Roman Novgorodov

Hello

Thank you for your information.

Please check your email.

We will upload to ShareIT and Plimus needed files soon.

Roman Novgorodov
DeepSoftware LLC
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

chedges

Hi Roman,

It seems that I still have a problem :(

I seem to be getting a lot of Access Violations when I test the LPT Demo with 9.20 full version.

When I click on the activate checkbox I get an A/V. In the log I find only this

[13/07/2011 14:26:35] nrComm Lib v9.20 Pro Windows 7 [6.1.7601] Service Pack 1
[13/07/2011 14:26:35] TnrLptDriver Open()
[13/07/2011 14:27:36] nrComm Lib v9.20 Pro Windows 7 [6.1.7601] Service Pack 1
[13/07/2011 14:27:36] TnrLptDriver Open()

I still have copies of the 9.19, 8.22 and 9.20a versions of the LPT demo that we have tested and they
seem to work fine when I activate the port :(

I've ensured that there are no old copies of nrComm on the path and I've deleted all old .dcp and bpl files so there is no chance of problems. Re-installing does not help either :(

Any ideas?

Thanks,

Roman Novgorodov

Hello

Thank you for your information.
Please remind me your Delphi version.

Roman Novgorodov
DeepSoftware LLC
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

chedges

Hi Roman,

Primarily D2007 but we do use D2009 as well.


Roman Novgorodov

Hello

Did you receive our email with new download link yesterday evening?

Roman Novgorodov
DeepSoftware LLC
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

chedges

Hi Roman,

No, I did not recieve a email :( Could you resend?

Thanks,

Chris.

Roman Novgorodov

Hello

Email with link is sent again.

Please check your spam folder or antispam settings.

Roman Novgorodov
DeepSoftware LLC
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

Roman Novgorodov

Hello

Your smtp server blocks our hoster.

Please read following:

Thank you for your information.

It is strange but we can not reproduce exception.

Please send to me full sources of your demo and compiled EXE too.

Good luck!

Roman Novgorodov

DeepSoftware LLC
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

chedges

I've sent you this as an email but just in case you did not get it....

Hi Roman,

I seem to eventually get an error when activating the port and from that point on I always get the error. Rebooting does not help?

I've traced into the code and have located where I think the error is happening.

Putting a breakpoint on the indicated line is never reached. It seems the
IsWow64 method is causing an Access Violation on my machine.

It's a 32bit Win7 machine.

I've attached a small demo app but I guess you will not replicate this.
The older versions of nrComm do not suffer from this problem :(


function TnrDriverBase.CreateService: Boolean; var hSCMan, hService: SC_HANDLE;
    s, sDir:string;
    dwEr:cardinal;
    flWow64:boolean;
begin
  Result := False;
  flWow64 := IsWow64(); <--- seems to be causing the error

//  StopService( );
//  RemoveService();
  Logging(dlDebug, 'CreateService ...'); <--- Breakpoint here never hit
  if not FileExists(fDriverFileName) then begin
    if Length(ResName) = 0 then exit;
    if Length(fDriverFileName) = 0 then begin
      SetLength(sDir, MAX_PATH + 2);

Roman Novgorodov

Hello

Thank you for information.

We tested your compiled EXE on following PC's:

XPSP2 32bit, Win 2003 server 32bit, Win7 x64, Win 2008 R2 x64

There is no exceptions after Button1 click.

If you think that exception raises in IsWow64(), please set break point on it and take a look.
Its code is very simple and can not generate AV exceptions ...

When we can not open your project sources because it refers to Unit5 in 'Unit5.pas' {Form5};

We modified DPR and rebuild your demo.

Also please try new EXE from attachment.

Roman Novgorodov
DeepSoftware LLC
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

chedges

Hi Roman,

This seems to have improved things. In a small test app I am able to print.

I'm getting some strange behaviour when I build my real app using the new version. I can open the LPT port but when I check the LPT.Pins property
I get a range check error if I try pins 1 and above, pin zero is ok

e.g 

LPT.Active := True;
Tmp := LPT.Pins[1]; <-- range check error?

This only happens in my main application though?  Any Ideas?

chedges

July 25, 2011, 11:26:19 am #27 Last Edit: July 25, 2011, 11:32:40 am by chedges
Sorry Roman,

I still have serious problems with 9.21 :(

I'm still trying to get it to work reliably on Win7 32bit so I tried Win7 64bit incase it worked any better. It doesn't :(

I'm getting this error every time when trying a simple application



I've attached the very simple application that I used to test this.

I'm also getting reliability problems on Win7 32bit. I've not tracked down the problem yet but I'm getting range check errors when I read values from the .Pins property.

It seems to only happen with my real application. I'm creating the LPT port inside a thread would that be causing the problem?

nrComm 8.22 works perfectly in every way apart from it does not work on 64bit :( what changes were required to make this work on 64bit? can I add them to the 8.22 source?

9.20+ just does not seem to be working reliably for me and this is becoming a critical problem.

is there anything else I can provide as I *have* to get this working very quickly

Roman Novgorodov

Hello

Thank you for your information.

Possible your Win32 machine have old version of SYS driver that can be still available after old versions of nrComm.

Please try to find and remove following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\nrio

And try again.

Roman Novgorodov
DeepSoftware LLC
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

chedges

Roman,

The 64bit machine did have that registry key but deleting it did not fix the problem?