Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by korrak93 · Jul 23, 2018 at 03:45 PM · dlldll error

Unity and external DLL loading problems

Hi guys, today I was interested in the possibility to use a thermal printer with unity (just a simple print). I found out that Microsoft has released this set of libraries called POS (Point of Service) that handle very well the interaction between a C# project and a lot of printers.


I tried it our with a very simple C# project it works fine, I just had to install POS and set the reference for the DLL needed. I then tried it inside a Unity scrpit, I put the DLL inside the Plugins folder and it was correctly loaded.

There are no compile errors and it plays without any problem until it reaches the very first line of code in the script where an object from a class defined inside the POS DLL is created (basically the first line that uses something from the DLL).

I can't really understend the error, the documentation is basically non existant and I can't debug inside the DLL. Now the problem is clearly with Unity and its use of external DLL.

Additional information: I used the .NET 4.x compatibility because these DLL are for that. I also tried with older versions of POS that works with <4 .NET but the same line generates another exception (something like Unity isn't able to load the DLL or something else that it requires).

Is it normal that Unity can't use properly DLL that a normal C# project can (the exact same code works fine there)? Is there some trick?

PS: I also tried to insert the whole POS directory (very small, only a few files) inside PLUGINS but nothing has changed

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image mdrunk · Dec 10, 2018 at 06:47 PM 0
Share

Which version of $$anonymous$$icrosoft.PointOfService were you using? did your stack trace end with $$anonymous$$icrosoft.PointOfService.Pos4NetTelemetry.IsCeipOptInEnabled ? did you ever figure out how to fix this?

avatar image hexagonius · Dec 10, 2018 at 07:10 PM 0
Share

what are the dll's for exactly? if NET 2.0 Standard, should work. NET Framework, might not. NET Core, not at all.

avatar image mdrunk hexagonius · Dec 10, 2018 at 07:52 PM 0
Share

they reference 2.0 and work in 4.x. I'm starting to think it has something to do with security and accessing the registry.

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

87 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers

DLL errors 0 Answers

OpenCVSharp missing dll 1 Answer

System.Data dll import type defined multiple times 0 Answers

How do I reference multiple dll files? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges