Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not use interop zxing after registering #45

Closed
BobTB opened this issue Oct 4, 2017 · 10 comments
Closed

Can not use interop zxing after registering #45

BobTB opened this issue Oct 4, 2017 · 10 comments
Assignees
Labels
Milestone

Comments

@BobTB
Copy link

BobTB commented Oct 4, 2017

I followed instructions, copied both zxing.dll and zxing.interop.dll to c:\windows and from there with admin rights run register.cmd
It registered, but now in VBA Access, I can not add a reference. It is not listed, and if clicking on browse, and selecting the dll , I get the error - "Can't add a reference to the specified file."

How can I add this to work?

@BobTB BobTB changed the title Can not register interop zxing Can not use interop zxing after registering Oct 4, 2017
@micjahn
Copy link
Owner

micjahn commented Oct 5, 2017

Did you try a restart of Access and/or the whole computer?

@BobTB
Copy link
Author

BobTB commented Oct 5, 2017

Yes I did. It did not help.

@micjahn
Copy link
Owner

micjahn commented Oct 9, 2017

which version of access do you use?

if it works it should like the following screenshot:
grafik

@BobTB
Copy link
Author

BobTB commented Oct 10, 2017

I had to install VisualStudio2017, run it as administrator, and build zxing.interop. After this it is visible in VBA.
Now the question is, how can this be done without installing visual studio and building it on every computer. The register.com if run from c:\Windows dir does not work (run as Administrator) It is registered successfully but not visible in VBA. I really don't know what is wrong. I checked the registry and it seems to be ok. What is the difference when running it with regasm vs building it from Visual Studio? I am on Windows 10 PRO 64 bit and am using a 32 bit office, so there should not be a problem.

I found this, http://edndoc.esri.com/arcobjects/9.2/NET/9826f81b-278c-49cc-a912-ab8d86f5e91e.htm
and it seems an installer has to be made for it to work. Any ideas?

@BobTB
Copy link
Author

BobTB commented Oct 10, 2017

I checked the registry and when run form VS2017 as described above it looks like this:

image

What I will try next is to put the dll somewhere else, not in c:\windows and run register.cmd on a computer which does not have visual studio installed, to see if it shows up in VBA (it does register no matter what, but does not show up in the VBA)

@BobTB
Copy link
Author

BobTB commented Oct 10, 2017

I also noticed that building in VS there is the tlb file created. Can this be the problem? Should I use regasm /tlb ?

@BobTB
Copy link
Author

BobTB commented Oct 10, 2017

@micjahn
Copy link
Owner

micjahn commented Oct 10, 2017

I thought the TLB file would be created because of the /tlb parameter:
"%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\regasm.exe" /codebase %~dp0zxing.interop.dll /tlb %~dp0zxing.interop.tlb

I have to check it again.

@micjahn
Copy link
Owner

micjahn commented Oct 23, 2017

It looks to me that there is an issue if the register.cmd is executed on 64bit windows.
Please try it manually with the following command:
"%SystemRoot%\Microsoft.NET\Framework64\v4.0.30319\regasm.exe" /codebase C:\Windows\System32\zxing.interop.dll /tlb C:\Windows\System32\zxing.interop.tlb

@jdoyle-fts
Copy link

jdoyle-fts commented Jan 19, 2022

I found that running register.cmd DID work OK (as long as the full path to the zxing.interop files did NOT contain spaces).
It did then appear as an available reference in my VB6 projects, but was listed just as

port of the java based barcode scanning library for .net (java zxing 29.07.2019 21:30:35)

and NOT as

ZXing.NET: port of the java based barcode scanning library for .net (java zxing 29.07.2019 21:30:35)

Before trying to rebuild the project in Visual Studio (as suggested above) try looking for this entry.
Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants