U2lwin32.dll

Well, here’s a neat little tidbit for you… Crystal Reports people out there..

Need: To query on local (Win32) Env Variables, and utilize in a .NET/Crystal-enabled application
Solution: U2lwin32.dll implementation
Source: https://www.viksoe.dk/code/u2lwin32.htm
Versioning: Crystal Reporst 2008, VS.NET 2015, .NET application compiled as x86 explicitly
Notes: dll is stored in %SYSTEMROOT%\SYSTEM32 of the development machine, and the .NET app is published as a click-once application, with associated .application file
Application is being launched locally via copying the .application file to the local drive, after
installation of the Crystal Runtime (CRRuntime_32bit_13_0_18.msi)
Also, the dll is copied to the target’s folder: “C\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86” (this is for the 32-bit scenario)
Usage: I’m querying %COMPUTERNAME%, for use in a formula in order to gain information as to the launching machines physical location.

Tested on: Windows 10, Windows 7

CategoriesIT

Leave a Reply

Your email address will not be published.