- Get Started
- LPV Modules
- FAQ
- Contact & Support
The error indicates the LPV libraries are not well registered for your platform.
- Make sure there's NO special character in the path of the registration file, like @ ( ) * & . Rename the folder with special characters.
- Re-register by run the runner/reg_run_as_admin.bat script as administrator.
The error occurs when Visual Studio or MSBuild can't find the Windows SDK requested by your project in the expected location.
The demo projects target the 10.0.16299.0 Windows SDK. If you don't have that version installed, you may right-click on the project node, under the Configuration Properties > General > Target Platform, select any available one.
To resolve this issue, upgrade the project to use the current Visual Studio toolset, or use the Visual Studio Installer to install the specified build toolset.
The demo projects use Visual Studio 2017 (v141) toolset. If you don't have VS 2017 or 2015 installed, you may right-click on the project node, under the Configuration Properties > General > Platform Toolset, change to any available one.
"afxwin.h" represents the MFC library. To build MFC demo projects, make sure you have MFC libraries installed. And please noted, the MFC library is not included in any Express edition.
Same as Compile Failure Q1, it's due to the LPV libraries are not well registered, please follow the corresponding solution.
You need to call CoInitializeEx when your program starts and CoUnitialize when it terminates.
For multi-threading application, make sure you call CoInitializeEx/CoUnitialize for EVERY thread that create and use LPV classes.
You should do it before create and initialize LPV classes.
The best place to do this is in InitInstance and ExitInstance of your MFC application. For example:
BOOL CMFCApp::InitInstance(){// You may use COINIT_MULTITHREADED or COINIT_APARTMENTTHREADED based on the requirement of your application.// For example, use COINIT_APARTMENTTHREADED for MFC application, COINIT_MULTITHREADED for other cases.// If you are not sure, read more in https://docs.microsoft.com/en-us/windows/win32/learnwin32/initializing-the-com-libraryCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);// etc.CWinApp::InitInstance();}INT CMFCApp::ExitInstance(){CoUninitialize();return CWinApp::ExitInstance();}
1. Make sure LPV modules are well-registered and licensed. See and follow the steps in Compile Failure Q1.
- Make sure COM is well-initialized in the current thread. See the steps in Q6.
If you are using the x86 LPV libraries. You just need to compile the project in x86(32bit), then restart Visual Studio.
If you are using the x64 LPV libraries. Since Visual Studio is natively 32bit, it cannot do GUI editing in some components (e.g. LDisplay control) in 64bit. To resolve this error, you should:
- Register the 32bit and 64bit LPV libraries if you have not.
- Change the solution to x86(32bit) and close Visual Sutdio.
- Open your solution or project containing LDisplay control with Visual Studio.
- Confirm your solution is under x86(32bit) configuration now, and open your cs file containing LDisplay control. If the error is still there, start from step 2 again more carefully.
- Switch your configuration to x64. Then your cs file can be opened and edited error-freely before you restart Visual Studio again.
1. Make sure LDisplay module is well-registered and licensed. See and follow the steps in Compile Failure Q1.
- Make sure the thread that creating the control is initialized using COINIT_APARTMENTTHREADED, since the ActiveX control and its container needs to be running in single-thread apartment. Note: it's still allowed to initialize other threads with COINIT_MULTITHREADED.
- For MFC applications, make sure you call AfxEnableControlContainer() in the application's InitInstance function to enable support for containment of OLE controls.
The error occurs when the script failed to load LPV modules.
It's commonly due to absence of the correct Visual C++ Redistributable Package. You may have to download then install one from Microsoft's official website(https://support.microsoft.com/en-us/topic/the-latest-supported-visual-c-downloads-2647da03-1eea-4433-9aff-95f26a218cc0), or our link.
The error indicates the script is failed when execute the registration function.
It's possible that you didn't run the script as administrator, or the install path of LPV contains any invalid char. Please stop the script, then follow the solution in Q1 to re-check and re-register.