-
Notifications
You must be signed in to change notification settings - Fork 4
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
Failed to load the library #1
Comments
Ah, the dll needs to be registered to be able to call it. I should probably make a note on the readme about it. You need to run regasm.exe, eg |
Invalid pointer |
How are you calling it? Is "Invalid pointer" a PHP error, COM error or VB error? Can you get a full backtrace? |
Uncaught com_exception: Failed to create COM object `Universal_CCW.Universal_CCW_Factory': The system cannot find the file specified. |
If anyone ever stumbles upon this 'invalid pointer' issue again, I fixed it by trying to debug it within .net and found out it was the disallow_app nonesense in new() that was causing it. Just comment it out, rebuild and it should work. Without taking the time to investigate any further I believe there is an issue because the keys and/or values in registry dosent exist by default (duh). |
What's the "disallow-app nonsense"? |
The code from line 156 line 164 in Universal_CCW_source.vb: ' Warn user if calling app is on the blacklist
Dim disallow_reg As String() = Ctype(Microsoft.Win32.Registry.GetValue("HKEY_CLASSES_ROOT\Universal_CCW.Universal_CCW_Factory\Application_Security", "Disallow", New String(){String.Empty}), String())
For Each disallow_app In disallow_reg
If disallow_app = Calling_App_Name Then
If MsgBox("WARNING: " & disallow_app & " is attempting to call potentially dangerous code. When this code is allowed to run on websites, it will give the website full access to your system. Due to the extreme security risks this code poses, allowing " & disallow_app & " to use it is highly discouraged. Do you wish to allow this?", MsgBoxStyle.Critical Or MsgBoxStyle.YesNo) <> vbYes Then
Throw New Exception(disallow_app & " is attempting to call this library. Blocked by user.")
End If
End if
Next Due to the Universal_CCW_COM_Register.reg file not being available anymore, the 'HKEY_CLASSES_ROOT\Universal_CCW.Universal_CCW_Factory\Application_Security' registry entry dosent exist and is causing the 'invalid pointer' error for anyone who dosent manually create it. From a security standpoint I guess its not a horrible idea (the blacklist), but it dosent exactly fix the security problem. This is like fixing a leaky dam with duct tape. I consider this project such a hack anyway that you should not run this in any sort of environment where it is likely to be exploited. In other words this should be used in a safe and isolated environment. The blacklist stuff is mentioned, but just barely way down on this page: http://universalccw.sourceforge.net/ |
This fixed my issue, just need to get help with the constructor arguments issue I just posted on here |
COM failed to load the Universal_CCW.dll.
The text was updated successfully, but these errors were encountered: