Referencing DLL in JApplet

i have native elements i wish to include in one of my JApplets
I've tested the DLL using a command line style program, and it connects fine. Hence I am confident the DLL itself was built properly.
However, when i use an init() method instead of a main() (start with appletviewer instead of java.exe), it gives an access denied message. Are applets 'not allowed' to open DLLs. If not, there must be some sort of security setting that I have overseen
i use this code in the JApplet subclass, outside other methods
static {
try {
System.loadLibrary("MyWindow");
} catch (Exception e) {
JOptionPane.showMessageDialog(frame, e.getMessage());
}any help loading native elements in JApplet would be appreciated
mike

Mike,
Chris is correct. You will have to sign the applet. What's more...you are correct you will have to copy the dll to the users filesystem. I have been working on this for a couple weeks and here are my findings.
Project:
Create an applet that can access the clients com ports.
Requiremnents:
Comm port access requires the win32com.dll, the comm.jar api code and the javax.comm.properties files.
Findings:
The ONLY way for native library access(i.e to the dll) is for that DLL to reside on the clients local drive. I tried everything and did a ton of research...I even despeartely tried to change the java.lang.Classloader (which was of course forbidden). There's a private vector in Classloader that stores the native libraries and the only way to get added to that vector is to be one the local hard drive.
What this means:
You either need the client to already have the dll installed or you need your applet to write it to their filesystem. Also if you are using the loadLibrary method instead of the load method you must make sure the dll is written to a location that is in the user's path.
The ONLY way to write a file to the clients machine is to have file write permission. To do this your applet will have to be signed. It may not be elegant but that's all you've got.(Or you can ask the user to edit their java.policy file...ha!). Signing really isn't that big of a deal...scary would be allowing you to access the DLL without signing your code....yikes!
Conclusion:
Once you have written the dll to the users local system (in my case the win32com.dll) my signed applet along with the signed version of the comm.jar are able to open and communicate with the com ports. If you would like some code snippets or more detail on my implementation I'd be happy to post them
P.S. Anyone implementatingthe java.comm example specifically will also have to copy the javax.comm.properties file to the users drive. Otherwise the driver intializer will return name cannot be null ...you could probably fix this if you modified the comm package slightly but it's a bit of a blackbox since sun isn't giving away the source code

Similar Messages

  • AppX Packager: directory structure for referenced .dll(s)

    I'm trying to use precompiled NuGet packages, like zlib, for WinRT Universal App development. Everything installs and compiles just fine, but running app ends up with "Unable to locate DLL" exception. Apparently, zlib.dll ends up copied into AppX\bin\v120\Win32\Debug\dynamic\cdecl
    instead of just AppX. If I manually copy .dll to AppX folder, everything works as a charm.
    I've set up a test solution like that:
    TestDLL.Windows (a dynamic library project, referenced from TestDLLApp.Windows)
    TestDLL.WindowsPhone  (a dynamic library project , referenced from TestDLLApp.WindowsPhone)
    TestDLL.Shared (.dll shared codebase)
    TestDLLApp.Windows (a windows 8.1 app project)
    TestDLLApp.WindowsPhone  (a windows phone 8.1 app project)
    TestDLLApp.Shared (app shared codebase)
    Resources\DLL (a folder with .dll just for testing purposes)
    packages (this is where installed NuGet packages go)
    Observations:
    TestDLL output (testdll.dll) goes into AppX folder (correct)
    TestDLL referenced .dll from "Resources\DLL" folder goes into "AppX\TestDLL" (incorrect, unable to locate DLL)
    TestDLL NuGet .dlls go into folder like "AppX\TestDLL\bin\v120\Win32\Debug\dynamic\cdecl" (incorrect, unable to locate DLL) 
    TestDLLApp referenced .dll from "Resources\DLL" folder goes into "AppX" (correct) 
    TestDLLApp NuGet .dlls go into folder like "AppX\bin\v120\Win32\Debug\dynamic\cdecl" (incorrect, unable to locate DLL)
    What am I doing wrong? How to setup packager to output .dlls into AppX forder?

    Hi James,
    I'm afraid, NuGet packages are already implemented via custom build .target with conditional copy tasks:
    <Target Name="zlib_redist_AfterBuild_v120_and_Win32_and_Release_and_dynamic_and_cdecl" Label="v120 and Win32 and Release and dynamic and cdecl" Condition="( $(PlatformToolset.ToLower().IndexOf('v120')) &gt; -1 Or '$(PlatformToolset.ToLower())' == 'windowskernelmodedriver8.0' Or '$(PlatformToolset.ToLower())' == 'windowsapplicationfordrivers8.0' Or '$(PlatformToolset.ToLower())' == 'windowsusermodedriver8.0' ) And '$(Platform.ToLower())' == 'win32' And ( $(Configuration.ToLower().IndexOf('debug')) == -1 ) And '$(Linkage-zlib_redist.ToLower())' == 'dynamic' And '$(CallingConvention-zlib_redist.ToLower())' == 'cdecl'" AfterTargets="zlib_redist_AfterBuild">
    <Copy SourceFiles="$(MSBuildThisFileDirectory)../..//build/native/bin/v120\Win32\Release\dynamic\cdecl\zlib.dll" DestinationFolder="$(TargetDir)" SkipUnchangedFiles="true" />
    </Target>
    As I understand, $(TargetDir) is a root folder of a project output. I've looked through MSBuild output and seems that one to blame is .resfiles/.pri generator task. Here's what I see in generates layout.resfiles:
    TestDLL\bin\v120\Win32\Debug\dynamic\cdecl\zlib.dll
    I.e. MSBuild decides internal path for each file automagically. Any way to tune that?
    Interestingly enough, I've googled around and found no mentioning of this problem anywhere. Am I alone with this problem or no one uses prebuild NuGet packages in their WinRT development?

  • Dependencies of a referenced DLL not copied to assembly folder

    Hi all,
    I am developing an addin for excel with VSTO, but I have a problem with a referenced library and its dependecies.
    I use the Webkit.NET library, which works fine in any Windows Forms Application.
    The problem is, that the referenced DLL has a lot of dependencies. But copying those into the BIN folder does not work, as the library is dynamically loaded, when using the class in the addin at runtime. The location of the WebkitBrowser.DLL is at some temporary
    assembly location, where it sits completely isolated, and does not find its dependencies:
    C:\Users\JFX\AppData\Local\assembly\dl3\AYCKH6VV.6KL\40RJQYK1.QJN\47c69582\0005881f_f946cb01
    How do I get Visual Studio to copy all needed dependencies (dll.manifest among others..) into that location
    OR keep it from copying that DLL into that location, but instead load it from the BIN folder?
    Simply setting the "LocalCopy"-flag to "True" doesn't help. It still gets loaded from that location.
    Any help is much appreciated!
    Regards, Jonas
    [DD] Link to Jonas’ preceding thread concerning .dll references from the VSTO section:
    Include indirect dependencies of a dependency

    Hi,
    Your issue is not related to VS IDE, it is out of
    support range of VS General Question forum which mainly discusses the usage of Visual Studio IDE such as
    WPF & SL designer, Visual Studio Guidance Automation Toolkit,
    Developer Documentation and Help System and
    Visual Studio Editor.
    Based on your another case about the same issue:
    https://social.msdn.microsoft.com/Forums/de-DE/22f27fd9-548c-411d-986f-e5d6a80cfacb/include-indirect-dependencies-of-a-dependency?forum=vstode, you find the cause of this issue with Eugene Astafiev’s help:
    shadow copying cannot be disabled for VSTO addins, which confirmed your issue is more related to VSTO instead of Visual Studio itself. And Eugene Astafiev gave some explanation for the cause and provide some suggestions for your scenario.
    I recommend discussing your issue with VSTO experts on that thread.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Why after referenced dll files to my project they are not on my release directory when i build the project ?

    This is a screenshot of my visual studio csharp the References and properties part of the dll's:
    You can see on the right the 3 problem files are the directx dll files.
    When my brother is running the program he get exception say one or more of the dll files is not found.
    I sent him the 3 dll files he tried to put them from where he was running the program he also tried to put them at the directory they are in my place: C:\Temp\radarscan\dlls\DLL'S\Microsoft.DirectX.DLL
    He created this directory and put them there but it didn't help.
    I was sure once i referenced the dll files they are in my program no need to have them. And at least to have them in the directory where you running the program from but it's not working.
    What i want is that my brother and anyone else that will run the program will not need the dll files on his pc and if he does need them so to have them in the directory where you are running the program from will be enough. How can i solve it ?

    Still not working. Tried Samir solution but same problem my brother on his computer getting exception:
    This is the code the line where the exception happen 142:
    private void ScanClouds_Load(object sender, EventArgs e)
    Boolean bl = InitializeDirectX();
    if (bl == false)
    MessageBox.Show("Error initializing directX!");
    Application.Exit();
    And in the method init:
    private Boolean InitializeDirectX()
    DispMode = Manager.Adapters[Manager.Adapters.Default.Adapter].CurrentDisplayMode;
    D3Dpp = new PresentParameters();
    D3Dpp.BackBufferFormat = DispMode.Format;
    D3Dpp.PresentFlag = PresentFlag.LockableBackBuffer;
    D3Dpp.SwapEffect = SwapEffect.Discard;
    D3Dpp.PresentationInterval = PresentInterval.One; //wait for vertical sync. Synchronizes the painting with
    //monitor refresh rate for smoooth animation
    D3Dpp.Windowed = true; //the application has borders
    try
    D3Ddev = new Device(Manager.Adapters.Default.Adapter, DeviceType.Hardware, pictureBox1.Handle,
    CreateFlags.SoftwareVertexProcessing, D3Dpp);
    D3Ddev.VertexFormat = CustomVertex.PositionColored.Format;
    D3Ddev.RenderState.Lighting = false;
    D3Ddev.RenderState.CullMode = Cull.CounterClockwise;
    //load imagesBmp to panelTexture
    //panelTexture = Texture.FromBitmap(D3Ddev, imagesBmp, Usage.Dynamic, Pool.Default)
    backTexture = TextureLoader.FromStream(D3Ddev, mymem);
    //scannerTexture = TextureLoader.FromFile(D3Ddev, @"D:\Buttons\Radar\radar.png");
    scannedCloudsTexture = new Texture(D3Ddev, 512, 512, 1, Usage.Dynamic, Format.A8R8G8B8, Pool.Default);
    //sprite is used to draw the texture
    D3Dsprite = new Sprite(D3Ddev);
    return true;
    catch
    return false;
    The 3 dll files are: Microsoft.DirectX.Direct3D.DLL, Microsoft.DirectX.Direct3DX.DLL, Microsoft.DirectX.DLL
    The question is why he is getting this exception ? Realy it dosent see/find the dll files ? Or maybe his machine not supporting this directx files ? Strange.
    Another thing when i put my mouse on the hard disk on the dll files i see a baloon tip say the:
    File description: Microsoft Managed Direct3D Debug 
    Maybe the problem is that the dll files of the directx belong to the debug directory but i make my program to be build in the release directory ? 
    In any case i can't find any solution yet. This is the exception message:
    System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.DirectX.Direct3DX.dll' or one of its dependencies. The specified module could not be found.
    File name: 'Microsoft.DirectX.Direct3DX.dll'
       at mws.ScanningClouds.InitializeDirectX()
       at mws.ScanningClouds.ScanClouds_Load(Object sender, EventArgs e) in d:\C-Sharp\Download File\Downloading-File-Project-Version-012\Downloading File\ScanningClouds.cs:line 142
       at System.Windows.Forms.Form.OnLoad(EventArgs e)
       at System.Windows.Forms.Form.OnCreateControl()
       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at System.Windows.Forms.Control.CreateControl()
       at System.Windows.Forms.Control.WmShowWindow(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ContainerControl.WndProc(Message& m)
       at System.Windows.Forms.Form.WmShowWindow(Message& m)
       at System.Windows.Forms.Form.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

  • How to load views in an MVC 5 project from a referenced DLL

    I wish to compile some controllers, models and views into a single assembly and then include it in mvc projects as needed.
    I initially tried using a class library and packaging EF6, MVC etc into the library, but the project that referenced library was unable to find and serve the views.
    I tried to write a Virtual Path Provider (using this example), but if each view does not have a unique name (eg. Index in various subfolders) then I get
    an error:
    "resource name cannot be used more than once".
    Another complication of this seems to be that even if I can get the VPP to serve the file (through treachery and deceit), the application complains:
    "'ModelType' is not declared. It may be inaccessible due to its protection level."
    If I try to inherit from System.Web.Mvc.WebViewPage, as reccommended in the example linked above, I get an error:
    "The 'inherits' keyword is not allowed when a 'ModelType' keyword is used."
    It seems that it is a 'close but not quite' scenario.
    I would really prefer to NOT embed the views as resources anyway.  According to
    this post I should be able to create the dlls as MVC projects themselves and then include them in other projects (Full-Fat MVC Project).  It is claimed:
    "if you follow this approach you can use the routes, controllers and views as if they were part of the main web app."
    However, when I tried this I wasn't able to get the view engine to look into the dlls.
    How can I make the view engine see the dll and the pathed views within it?

    I would recommend posting your question to the MVC sub forum under ASP.NET:
    http://forums.asp.net/1146.aspx/1?MVC
    Paul ~~~~ Microsoft MVP (Visual Basic)

  • Keycodedecoder.dll failure still there in Crystal Reports 2010 SP1

    Hi
    I have a problem with getting an error that busineesobjects.licensing.keycodedecoder.dll not found for version 13.0.2000.0.
    I am using Crystal Reports for Visual Studio 2010 Support Pack 1 (where I thougt this problem was resolved)
    The exception does not show up by default but if I subscribe to the AssemblyResolve event I can see that the common language runtime tries to bind the keycodedecoder assembly and fails.
    You can reproduce it by creating a .Net 4 windows forms project in Visual Studio 2010 and have Crystal Reports 2010 SP 1 installed. Here is the code for reproducing it:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Diagnostics;
    using System.Drawing;
    using System.IO;
    using System.Linq;
    using System.Reflection;
    using System.Text;
    using System.Windows.Forms;
    using CrystalDecisions.CrystalReports.Engine;
    namespace CR2010error
      public partial class Form1 : Form
        ReportDocument doc = null;
        public Form1()
          InitializeComponent();
          AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(QFE);
        private void button1_Click(object sender, EventArgs e)
          doc = new ReportDocument();
        private Assembly QFE(object sender, ResolveEventArgs e)
          // Format of e.Name:  [name-without-exe-and-dll], Version=[version], Culture=[culture], PublicKeyToken=[key]
          Assembly assembly = null;
          string[] parts    = e.Name.Split(',');
          if (4 <= parts.Length)
            assembly = HandleSignedAssembly(parts[0].ToLower().Trim(), parts[1].ToLower().Trim(), parts[2].ToLower().Trim(), parts[3]);
          return assembly;
        private enum FailType { NoFail, FileNotExist, NoVersionInfo, QfeError, LoadError, };
        private Assembly HandleSignedAssembly(string name, string version, string culture, string keyToken)
          if (name.ToLower().EndsWith("xmlserializers") || name.ToLower().EndsWith(".resources"))
            return null;
          Assembly assembly   = null;
          string[] parts1     = version.Split('=');
          string   wantVer    = parts1[1].Trim();
          string[] parts2     = wantVer.Split('.');
          int      wantMajor  = Convert.ToInt32(parts2[0]);
          int      wantMinor  = Convert.ToInt32(parts2[1]);
          int      foundMajor = -1;
          int      foundMinor = -1;
          string   path       = CreateFullPath(name);
          string   exception  = "";
          FileVersionInfo fvi = null;
          FailType failType   = FailType.NoFail;
          try
            if (!File.Exists(path))
              failType = FailType.FileNotExist;
          catch (Exception e1)
            failType = FailType.FileNotExist;
            exception = e1.Message;
          if (FailType.NoFail == failType)
            try
              fvi = FileVersionInfo.GetVersionInfo(path);
              foundMajor = fvi.FileMajorPart;
              foundMinor = fvi.FileMinorPart;
            catch (Exception e2)
              failType = FailType.NoVersionInfo;
              exception = e2.Message;
            if (null != fvi)
              if (wantMajor != foundMajor || wantMinor != foundMinor)
                failType = FailType.QfeError;
              else
                try
                  assembly = Assembly.LoadFrom(path);
                catch (Exception e3)
                  failType = FailType.LoadError;
                  exception = e3.Message;
                  assembly = null;
          if (null == assembly)
            Message_SignedAssembly(failType, exception, path, name, wantVer, null == fvi ? null : fvi.FileVersion);
          return assembly;
        private void Message_SignedAssembly(FailType failType, string exception, string path, string nameOfDll, string wantVersion, string foundVersion)
          StackTrace st;
          StackFrame sf = GetOriginatingStackFrame(out st);
          string referredBy = "";
          if (null != sf)
            if (-1 != sf.GetFileLineNumber())
              referredBy = string.Format(msgSource1, sf.GetMethod().DeclaringType, sf.GetMethod().Name, sf.GetFileLineNumber(), sf.GetFileColumnNumber());
          string reason = "";
          if (failType == FailType.FileNotExist)
            reason = string.Format(msgReason1, path);
          else if (failType == FailType.LoadError)
            reason = string.Format(msgReason2, exception);
          else if (failType == FailType.NoVersionInfo)
            reason = string.Format(msgReason3, exception);
          else if (failType == FailType.QfeError)
            reason = string.Format(msgReason4, wantVersion, foundVersion);
          else
            return;
          string msg = string.Format(msgBase1, referredBy, nameOfDll, reason);
          MessageBox.Show(msg, "QFE Resolver failed", MessageBoxButtons.OK, MessageBoxIcon.Warning);
          MessageBox.Show("StackTrace: " + st.ToString());
        private string CreateFullPath(string name)
          if (name.EndsWith(".resources"))
            name = name.Substring(0, name.Length - ".resources".Length);
          return AppDomain.CurrentDomain.BaseDirectory + name + ".dll";
        private StackFrame GetOriginatingStackFrame(out StackTrace st)
          st = new StackTrace(true);
          StackFrame sf = null;
          for (int i = st.FrameCount - 1; 0 <= i; --i)
            StackFrame frame = st.GetFrame(i);
            string s = frame.GetMethod().Name;
            if (frame.GetMethod().Name == "QFE")
              break;
            if (null != frame.GetFileName())
              sf = frame;
          return sf;
        #region Message
        static string msgBase1 =
    @"The program has failed to resolve a reference to a dll.
    Referenced dll is
    .dll
    Reason for failing:
        static string msgSource1 =
    Referred by
        static string msgReason1 =
    @"The referenced file does not exist. Searched for file:
    Copy the missing referenced file and retry again.";
        static string msgReason2 =
    @"The referenced file cannot be loaded.
        static string msgReason3 =
    @"Version information could not be obtained from the referenced file.
    Recompile the referenced file and retry again.
        static string msgReason4 =
    @"The referenced file is not compatible with the requested version.
    The requested version was , but the found file has version .
    According to the rules of QFE, these versions are not considered to be compatible.
    Replace the referenced file with a compatible version and retry.";
        #endregion

    I am only having version 13 (SP1) installed on my computer.
    If I run modules I can not see that crpe32.dll is loaded but there are fourteen other Crystal dll's loaded all with version 13 (from the below path)
    c:\program files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\
    Yes I konw it's just a warning but it's really enoying and I think it's bad if you said all references to this keycodedecoder.dll has been removed in version 13 but this warning has been there in the beta version and the final version and now also in the SP1 version, and you have told us it has been fixed at least for the SP1 version.
    I have tried my test project on a lot of other computers here at the company and we all get the same error so it's strange if you can't reproduce it. Can I e-mail you a zip-file of my test project or attach it in some way at this forum?
    I am running a 32 bit version of Windows 7 with CRforVS_redist_install_32bit_13_0_1 installed.
    Regards Tony

  • C:\SC\crviewer.dll could not be loaded

    Moved application source code from laptop to new desktop. Crystal Reports XI SP2 is installed on new desktop. When I open VB6 project, I get message "c:\sc\crviewer.dll could not be loaded -- Continue loading projects?" This application worked on my laptop. I no longer have the laptop. Need help to resolve references. Other messages I get are: "Errors during load. Refer to c:\SC\frmViewReport.log for details." and "Errors occured during load." When I run the application, I get "Compiler error: Method or data member not found"
    In frmViewReport.log I have the following line:
    Line 66: Class CRVIEWERLibCtl.CRViewer of control crvReport was not a loaded control class.
    Steps for Reconstruction    
    1. Open VB6
    2. Select project to open
    3. See error "c:\sc\crviewer.dll could not be loaded -- Continue
    loading projects?"
    Operating System: Windows XP

    First will executables I create run on the end users computers?
    - yes they will. But we need to be clear on what version of the runtime is the app using. CR 8.5, or CR XI? (more on that later)
    Second, in Crystal Reports XI, do I even need to have crviewer.dll?
    - absolutely - if you are using the RDC. There are two core components to the RDC; the craxdrt.dll and the crviewer.dll
    Is there a different activeX control in Crystal Reports XI that replaces the need for crviewer.dll?
    - no there is not
    Third, why does the crviewer from Crystal Reports 8.5 solve the problem?
    - most likely because there is a reference to that version of the viewer in the project. Go to Project menu, references and see what the projects is referencing.
    Are the VB6 project references really the root cause.
    - absolutely
    Forth, is there some sort of problem that causes my application not to find the crviewer.dll in C:\Program Files\Common Files\Business Objects\3.0\crystalreportviewers11\ActiveXControls?
    - yup. the CR XI components are not being referenced in the app. Again, go to Project, references. The two references for CR XI are; crystal ActiveX Report Viewer Library 11.0 and Crystal Reports ActiveX Designer Runtime Library 11.0. I'll bet my bottom dollar that these are not the referenced dlls...
    Is the DLL not correctly registered?
    - nothing to do with registering. I'm quite sure you'd be getting different errors.
    Now, back to question 1. To determine the runtime your app is actually using, I recommend you use the modules utility from here:
    https://smpdl.sap-ag.de/~sapidp/012002523100006252802008E/modules.zip
    Run, your app, then start modules, get a log created. Expand the "by process" node, select your app exe. Then go to the View menu and select Details. See what CR dlls are loading. I'm sure it will all be version 8.5
    Ludek

  • Referenced Assembly BihConsumerInterop could not be found

    We have a fairly big SharePoint project where we use TFS, kicking of a build runs some tests and everything works as expected, but we get a warning:
    CA0060 : The indirectly-referenced assembly 'BihConsumerInterop, Version=14.0.0.0, Culture=neutral, PublicKeyToken=48e046c834625a88' could not be found. This assembly is not required for analysis, however, analysis results could be incomplete. This assembly
    was referenced by: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI\Microsoft.Office.Server.Search.dll.
    Now the solution according to other blogposts is to add the referenced DLL to the project, but it seems i cannot find anything about the assembly BihConsumerInterop, so I was wondering if there was anyone that knows a bit more about this DLL :)

    We are trying to execute unit tests on our build server and running into the same problem.
    It seems that BihConsumerInterop cannot be found anywhere on the server.
    We've tried adding Microsoft.Office.Server.Search.dll to the GAC, but this error still persists.
    Would love to hear from Microsoft on this before installing SharePoint on our server.
    zaanglabs.com |
    charliedigital.com | linkedin.com/in/charlescchen

  • How to validate prerequisite for ODP and Oracle Client connection

    Hi.
    I have a very simple application on .Net that connect to Oracle using ODP (was compiled with Oracle.DataAccess dll 10.2).
    I want to check "connection prerequisite" (application will be able to connect to DB) before installing this aplication on other computers?
    How can I check that ODP.NET version 10.2 or higher is installed on target host (registry check is not enopugh)?
    I know that I can check ODP entries in registry - but this will not check Oracle Client and compatibility between client and ODP.
    Also, if ODP was installed by ODAC XCopy installation - registry may be not updated by new ODP entry.
    And - if I am installing on the computer, DB was installed on, Oracle Client can be not installed separately.
    And one more issue: When I tried to run "test connection" method from installation, that use referenced dll on machine, that has only ODAC (with ODP) 11, - "Oracle.DataAccess.Client.OracleException The provider is not compatible with the version of Oracle client at Oracle.DataAccess.Client.OracleInit.Initialize()
    at Oracle.DataAccess.Client.OracleConnection..cctor()" error message was thrown (policies for both ODAC 10.2 and 11 are exists in GAC (assembly), pointing to Oracle.DataAccess 11 from ODP 2x bin).
    So, How and which components can I check to ensure appropriate versions of ODP and Oracle Client were installed and application will be connected?
    Thank you in advance!

    Hi,
    You could check for the presense of Oracle.DataAccess.dll in the GAC. Bear in mind you'd also want to check the version and whether a policy files exists as well as a newer version + policy file will work too (but not without the policy file).
    That wouldn't confirm the install is valid and works though, and I don't know of a way you could easily check that, apart from perhaps simply trying to run a small exe that attempts a connection to the database.
    With respect to the type initializer exception, that occurs when ODP cant find the right oraops*.dll or oci.dll, usually due to the wrong one being found, but can also occur if one is not found at all. Quite often this is due to the application including ODP in its bin directory rather than letting ODP get picked up out of the gac. Prior to 10.2.0.2.20, ODP loads the dependencies based in PATH so multiple homes can cause it as well. 10.2.0.2.20 and higher ODP loads dll's based on DLLPATH registry entry.
    Hope it helps,
    Greg

  • C# Acrobat 8 vs. Acrobat 4

    Hi,
    I am currently switching the referenced DLL in a C# project from a prehistoric Acrobat 4 to an Acrobat 8 equivalent.
    My Question is what DLLdo I have to use now?
    Previously it used to be done like the following (using the ACRODISTXLib.dll):
    ACRODISTXLib.PdfDistiller myDist= new ACRODISTXLib.PdfDistillerClass ();
    myDist.OnJobFail +=new ACRODISTXLib._PdfEvents_OnJobFailEventHandler(handle_OnJobFail);
    myDist.FileToPDF(inputPostScript, outputPDF, jobOptions);
    For the new version it also states in the SDK that the above methods should be used, the problem is that I can not find the same methods in the DLL installed by Acrobat Prof 8. What I got is this:
    AdobePDFMakerX.Distiller acro8 = new AdobePDFMakerX.Distiller();
    //There is no "OnJobFailEventHandler
    acro8.DistillFile(inputFilename, outputFilename, promptForOutputName);
    So what should I actually be using (or why does the SDK still mention the PdfDistiller) ?
    Kind regards!

    After completely removing all Acrobat Products and making a new clean installation of Acrobat 8 the problem is solved, the ACRODISTXLib can be retrieved from the \Adobe\Acrobat 8.0\Acrobat\acrodist.exe as a reference in VS C#.

  • CE 10 - Slow printing from Report Viewer in Win Server 2K3

    Post Author: JacobK
    CA Forum: General
    I'm not very familiar with Crystal reports, we are having slowness issues when printing from the web through report viewer in Win2K3.  Recently upgraded from Win 2000 to 2K3.  Same crystal version, CE 10.  On the 2000 system this report printed fine.  Now there is a delay in bringing up the report in viewer and then an extreme delay when printing.  This report prints normally when printing directly from Crystal.
    Any ideas?
    Thanks in advance.

    OK so I have updated VS 2010 to SP 1, and installed CR2010. Within my project I have updated the referenced .dlls
    CrystalDecision.CrystalReports.Engine
    CrystalDecision.ReportAppServer.ClientDoc
    CrystalDecision.ReportSource
    CrystalDecision.Shared
    CrystalDecision.Web
    I updated the web.config assembly entries to match the new version # (13.0.2000.0) and the app compiles.
    However, now when I try to run a report I receieve the following error...
    An error of type <System.Web.HttpException> occurred
    Error Details: The 'PageToTreeRatio' property cannot be set declaratively.
    I am sure I need to make some code changes but I cannot find this "PageToTreeRatio" attribute anywhere in my .asp code. Is this something you are familiar with? Is this parameter in the report itself?
    As I mentioned before the reports were built in CR10 Deveoper (not in Studio) is that the source of this problem? Will I have to rebuild all the reports in VS2010?
    Thank you for all the help so far, I am a lot closer than I was yesterday!!
    -C

  • File or assembly name SAP.Connector, or one of its dependencies not found

    Hello there,
    Something very strange is overcoming me when experimenting a little bit with the SAPConnector:
    I developped a class that is accessing the proxy-class generated by the SAPConnector wizard and I have put it into a class library. No problems so far.
    When I am accessing the class library from into a windows application, no problems are signalized...
    However when I try to execute the BAPI from another class library project, I always get the following message:
    File or assembly name SAP.Connector, or one of its dependencies, was not found.
    I am testing with the following configuration:
    - Visual PC 2004
    - .Net-framework 1.1 and .Net-framework 2.0
    - Visual Studio 2003 and Visual Studio 2005
    I tried both SAPConnector 1.0.3 and 2.0, but both return the same message.
    Thanks in advance!
    Greetz,
    Sven

    SAP.Connector.DLL (and SAP.Connector.Rfc.DLL in 2.x) must be available for the project to load. The easiest is to put the two DLLs into GAC (which is the default in NCo 2.x). You can also have them in you application directory. The reason that you don't see a problem if you are using NCo directly is the fact that VS automatically copies directly referenced DLLs into the target directory. This is not (allways) the case for inderectly referenced DLLs.

  • Troubles to start an applet

    Hello,
    I have Java Plug0in 1.3.1_04 installed and no any others.
    I use the following code to invoke java plug-in
    <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    width="100%" height="100%" align="middle" id="ViewerApplet" name="ViewerApplet"
    codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">
    <PARAM NAME = "code" VALUE="com.mydomain.myproject.myclass.class">
    <PARAM NAME = "archive" VALUE="myarchivefile.jar">
    <PARAM NAME = "codebase" VALUE="/mycodebase/">
    <PARAM NAME = "type" VALUE="application/x-java-applet;version=1.3.1_04">
    <PARAM NAME = "MAYSCRIPT" VALUE="true">
    <PARAM NAME = "scriptable" VALUE="true">
    <PARAM NAME="cache_archive" VALUE="lib1.jar,lib2.jar,lib3.jar,lib4.jar">
    No JDK 1.3 support for APPLET!!
    </OBJECT>
    When I try to invoke the Java Plug-in I get a message:
    "Java Plug-in 1.3.1_01 cannot be located because values in the registry key HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Plug-in\1.3.1_01 is not found or is not longer valid"
    There is "Java(TM) Plug-in 1.4 Fatal Error" in the title bar of this message dialog.
    I use Win2000.
    Search for "1.3.1_01" haven't returned anything.
    {8AD9C840-044E-11D1-B3E9-00805F499D93} key mentions only 1.3.1_04 related stuff.
    Search for "CAFEEFAC-0014-0000-0000-ABCDEFFEDCBA" have not returned anything.
    What can cause the problems?
    Thanks in advance!
    Alex

    David,
    Thanks.
    There are 2 places in the registry where things can go
    wrong when calling a plugin dynamically:
    HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\...
    search for 8AD9C840-044E-11D1-B3E9-00805F499D93 in the
    registry and cross reference the information with what
    is under the JavaSoft key.
    Also make sure that the referenced DLL exists at the
    location referenced (look at the InProcServer32
    keyword).Checked. Everything is correct and pointing to 1.3.1_04 related stuff.
    You may also want to consider uninstalling all your
    JRE's and then reinstalling them. Did that and it didn't help. I tried both ways, just reinstall (like any Windows application) and install by request.
    I tend to think that security issues may be involved, this is within a corporate network.
    Thanks,
    Alex

  • Dotfuscator fails to rename references in one executable

    I am using Dotfuscator CE with VS2012, the input assemblies contain 3 exe's with many dll's. Each of the exe's reference one of the dll's, but after obfuscation one of the exe's is still calling the un-obfuscated class & method name in the dll, so it
    fails. Yet the other 2 exe are correctly calling the renamed version of the class & method. None of the input assemblies are configured for library mode as it is not required for anyone to access any of these dll's afterwards.
    After some experimentation, it seems that the original build order of the assemblies seems to affect the outcome. i.e. if I rebuild the failing exe after the other 2 exe's, it seems that Dotfuscator gets it right if I run it again!
    Why would it matter what order the exe's are built in? None are set to reference specific versions of the common dll.

    Hello Marchant,
    >>Can this be right? Why do the exe's need to be built at the same time or after the referenced dll's?
    I am not sure this issue caused by the Dotfuscator tool since I am not experienced with it and , as far as I know, from the. NET's point of view, after we modified a dll, we have to rebuild the application which has a reference to this dll to update it.
    You could try to made a test without the tool.
    Since you are using this tool, you could also post this issue to the site which you download it as:
    https://visualstudiogallery.msdn.microsoft.com/d0ac8a14-bc36-4afb-89d1-41078948dabe
    You could start a discussion in the “Q AND A“ tab.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Using CsXmpToolkit

    Hi,
    I'm attempting to use the c# wrapper for the Xmp SDK, CsXmpToolkit.
    This may be more of a C# question than a specific Xmp SDK question, but this seems like the best forum, so here goes.
    Right now, I'm just trying to get some simple tests running, but it seems like when I run my tests, the CsXmpToolkit classes can't find the necessary XmpToolkit libraries.
    For example, in the CsXmpToolkit code, there's stuff like this:
            [DllImport("XmpToolkit", EntryPoint = "XMPFiles_Initialize1", CharSet = CharSet.Auto)]
            private static extern bool XMPFiles_Initialize1();
    this is how the C# code binds/wraps around the XmlToolkit code.
    however, when I run tests on this stuff, like so:
                XmpFiles.Initialize();
    I get the error
    System.DllNotFoundException: Unable to load DLL 'XmpToolkit': The specified module could not be found.
    now, this is my first time dealing with this [DllImport business, so perhaps I'm missing something simple.
    However, I'm noticing a few things:
    1. I don't have any dlls for XmpToolkit. There's some .lib files, like
    C:\CsXmpTk\SE.Halligang\XmpToolkit\lib\XMPCoreStaticRelease.lib
    and
    C:\CsXmpTk\SE.Halligang\XmpToolkit\lib\XMPFilesStaticRelease.lib
    is that what CsXmpToolkit is trying to load when it calls
    [DllImport("XmpToolkit",   ?
    2. relatedly, the referenced "dll" in DllImport is "XmpToolkit" , not "XmpToolkit.dll", .lib, or .anything else.
    what does that mean?
    is there some build procedure I need to do on CsXmpToolkit to get this to work?
    Has anyone been successful with this stuff?
    any help would be greatly appreciated, and rewarded with a off-hours tour of the Met, if you're in the area..
    thanks very much!
    don undeen
    Metropolitan Museum of Art

    I had no end to the troubles trying to get the XMPToolkit to compile and work correctly.  Ended up hiring someone to write an easy CS wrapper.  I first mentioned in this this post and have since had several individuals and companies use it.  Contact me if you're interested (contact info in the mentioned post).
    Cheers,
    Glenn Rogers, PMP
    GRR Systems, Inc.
    Developer of DBGallery: The Photo DATAbase

Maybe you are looking for