Microsoft information protection SDK 1.7.133 - Load library failed issue error - microsoft-information-protection

I was using MIP SDK 1.6 before and I initialised MIP by providing Path. It was working fine.
I upgraded to 1.7 version and now its failing with the Load library failed error.
{"Message":"An error has occurred.","ExceptionMessage":"LoadLibrary
failed for:
[C:\inetpub\wwwroot\teststs\bin\x64\mip_dotnet.dll]",
"ExceptionType":"System.ComponentModel.Win32Exception","StackTrace":"
at
Microsoft.InformationProtection.Utils.SafeNativeMethods.LoadLibrary(String
dllToLoad)\r\n at
Microsoft.InformationProtection.Utils.Loader.LoadDlls(String
dllFolder, String dllName, String[] dllDependencies)\r\n at
Microsoft.InformationProtection.MIP.Initialize(MipComponent
mipComponent, String path)\r\n
Can anyone please help ?

Can you share how you are building the path and setting it in MipContext? Something like this should still work. I've tested this in a .NET project on MIP SDK 1.7.133.
// Set path to bins folder.
var path = Path.Combine(
Directory.GetParent(Path.GetDirectoryName(new Uri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase).LocalPath)).FullName,
Environment.Is64BitProcess ? "bin\\x64" : "bin\\x86");
// Initialize MIP for File API.
MIP.Initialize(MipComponent.File, path);

Related

SkiaSharp SKSvg.Load throws MissingMethodException

I use SkiaSharp libraries on my Xamarin.Core/Xamarin.iOS project.
I try to load an SVG file from the Core library like the following;
var svg = new SKSvg();
Assembly assembly = type.GetTypeInfo().Assembly;
using (Stream stream = assembly.GetManifestResourceStream($"{assembly.GetName().Name}.Images.watermark_light.svg"))
{
svg.Load(stream);
}
The code throws on the "Load" step saying "System.MissingMethodException: Method not found: SkiaSharp.SKTextBlob SkiaSharp.SKTextBlob.CreatePositioned(string,SkiaSharp.SKFont,System.ReadOnlySpan`1<SkiaSharp.SKPoint>)"
My configuration:
Device: Debug|Simulator
Linker Behaviour: Don't link
Xamarin.iOS 15.4.0.0
xcode13.2: 8fc41ae82
Rider IDE: RD-221.5591.20
OS: MacOS Monterey 12.4 (21F79)
Libraries
SkiaSharp v2.88.1-preview.79
SkiaSharp.Views v2.88.1-preview.79
Svg.Skia v0.5.14
SkiaSharp.Svg v1.60.0
CoreLibrary/Images/watermark_light.svg(svg path)
I tried to add SKTextBlob reference to LinkerPleaseInclude.cs as well. But, it should not be the case when the linker behaviour is set to "Don't link". Also a added --linkskip argument for the relevant namespace. None of them worked. Any ideas about the issue?
Thanks!
Try updating to version 0.5.16 https://www.nuget.org/packages/Svg.Skia/0.5.16

Building RXTX with --disable-locks

I need to build RXTX (http://rxtx.qbang.org/wiki/index.php/Main_Page) for a 64 bit platform with --disable-locks. ( the target platform is a Ubuntu Snappy platform so there is a problem with the permissions and lock files).
The .configure --disable-locks and make seemed to run ok.
I got a new .jar file and librxtxSerial.so as a result.
However when I installed them, I get the following error :
java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCommDriver
java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver
Is there something else I need to do?
Are there other object files I need to copy over.
Thanks in advance.
I solved the problem myself.
The problem was that the configure script was not expecting a java version higher than 1.5 as shown here in t he extract :
case $JAVA_VERSION in
1.2*|1.3*|1.4*|1.5*)
#fix_parameters $JPATH/jre/lib/javax.comm.properties
CLASSPATH=".:\$(TOP):\$(TOP)/src:"find $JPATH/ -name RXTXcomm.jar |head -n1
RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)"
JHOME=$JPATH/"jre/lib/ext"
So the paths were not being set up correctly for me.
I changed it to
case $JAVA_VERSION in
1.2*|1.3*|1.4*|1.5*|1.7*)
Then it worked ok.

Win32: Error with CreateTextServices

I'm trying to use CreateTextServices function in TextServ.h. It seem I have to link riched20.lib to project to use this function.
But when I add riched20.lib to Linker/Input/Additional Depedencies, VS say error LNK1181: cannot open input file 'riched20.lib'.
How to fix this error?
I'm using VS 2013, Win 8.1 32 bit.
Had the same issue. I think there's no lib available for recent versions of richedit/msftedit, but textserv.h provides a definition of the function, so what you can do without any need for an extra .lib is this:
// load the dll and get the function address
// PCreateTextServices is declared in textserv.h:
HMODULE h = LoadLibrary(L"msftedit.dll");
PCreateTextServices createTextServices = (PCreateTextServices)GetProcAddress(h, "CreateTextServices");
...
ITextServices svc*;
int hr = createTextServices(NULL, host, (IUnknown**)&svc);
...
svc->Release();
FreeLibrary(h);

QT 5.2 app cannot start (Bad allocation error) when Qt5Core.dll is in app directory

I have a funny problem on my machine
Windows 7 x64, using QT 5.2 for the GUI
I'm not able to start the app I always receive the error
First I thought I had a broken dll, so through some trial and error I found a solution:
I add the QT5Core.dll via enviroment path, and NOT directly to the app folder. Then the programm works. If I copy the dll back to the app Folder, Same problem as before!?!?!?1
I'm really confused, because the error only occurs on my machine?
Debugging doesn't really help,
In code, the error occures here:
MyApplication::MYApplication(int argc, char** argv, int version)
: QApplication(argc, argv, version) // <<< this call fails!
{ }
somebody can help me?
Why is the location of the qt5core.dll a problem?!?!?
UPDATE
I used the profiling function of depends and found the following behaviour:
Failing
GetProcAddress(0x76800000 [c:\windows\syswow64\KERNEL32.DLL], "CreateSymbolicLinkW") called from > "dirone\xxxx.EXE" at address 0x00FF2877 and returned 0x7688CCE9.
First chance exception 0xE06D7363 (Microsoft C++ Exception) occurred in "c:\windows\syswow64\KERNELBASE.DLL" at address 0x765CC41F.
Exception: "bad allocation"
Working
LoadLibraryW("C:\BuildPackages\QT\plugins\platforms\qwindows.dll") called from "dirtwo\QT5CORE.DLL" at address 0x66AA5154.
Loaded "c:\buildpackages\qt\plugins\platforms\QWINDOWS.DLL" at address
0x0F380000. Successfully hooked module.
somehow the path to the qwindows.dll is hardcoded into the dll (there is no environment path to this directory)
If I rename the qwindows.dll or delete it, startup failes again.
BUT the qwindows.dll is bundeld with our product. It is in a subdirectory ./platforms/
AND the files are the same (diff returns equal)
Somebody have some clue what I should try next?
Check if you already have some qt related environmental variables.
Crashes are usually due to this, remove those envronmental variables first. Check whether you have any other qt installed libraries.
it would be better if you can post the cal stacks.
Some other dlls are needed that reside in the directory of the qt5core.dll. When you add this path to the search path the dlls are found. When you simply copy the dll these dlls can not be found. You can check dependencies with the depends tool.
Candidates for the additional dlls are:
icuin51.dll and icuuc51.dll
Found the Problem:
The enviromentvariable:
QT_QPA_PLATFORM_PLUGIN_PATH=C:\BuildPackages\QT\plugins\platforms
was set to the path. If removing this variable, everything works as it should!

Getting error when using facebook authentication in codeigniter

I am using Facebook-Oauth. I am using windows 7 and i am trying to run it in my localserver. I am setting site-url :http://www.domain.com and canvas url : http://www.domain.com/ . I didn't make change any other change in settings in the facebook developer site.But whenever i am trying to run it in my localhost i am getting this error :
1.Message: Use of undefined constant CURLPROXY_HTTP - assumed 'CURLPROXY_HTTP'
2.Message: Use of undefined constant CURLAUTH_BASIC - assumed 'CURLAUTH_BASIC'
Both in
Filename: core/Loader.php
Line Number: 956
I have set the app id and app secrect key in the config file.
$config['facebook_app_id'] = '424824207643973';
$config['facebook_api_key'] = '424824207643973';
$config['facebook_secret_key'] = 'my-app-secretkey';
cURL is most likely not installed correctly or linked up to PHP. Windows does not come with cURL installed (another reason to switch to a *nix based system! but I digress) so you'll need the appropriate dll files to enable it, then link those in via your php.ini file.
With regards to your current error, please check for syntax errors and leave a comment on this answer and update your provided source, and I'll modify.

Resources