JNI: get Window-Handle of JFrame

Hello,
I'm calling a DLL method (written in VC), that needs a Window-handle (HWND) as parameter. How can I get the Handle of my JFrame to pass it into the DLL function?
All samples are designed for getting the HWND of a Canvas. But obviously it does not work with any kind of Frame.
Can somebody tell me ?
Thank you, Lars
P.S. I'm working with SUN 1.4

see this one, i was looking for same thing:
http://forum.java.sun.com/thread.jsp?forum=57&thread=238779

Similar Messages

  • Unable to get Window Handle for the 'AxCrystalActivXViewer' control.

    Hi,
    I have Operating System : Windows 7 and Application developed in VS 2005 and I am using Crystal Report XI licenced version.
    But when I am trying to use TTX(Field Defination) based reports it gives me "Unable to get Window Handle for the 'AxCrystalActivXViewer' control. Windowless ActivX Controls are not supported."
    Please provide me solution for this ASAP as I am stucked on this from long lomg time.
    -Regards
    Swapnil

    Appears you are installing an upgrade version.
    Use these links:
    http://downloads.businessobjects.com/akdlm/crystalreports/crxir2_sp4_full_bld_0-20008684.exe
    http://downloads.businessobjects.com/akdlm/crystalreports/CRYSTALREPORTS06_0-20008684.EXE

  • HELP!!! ... need to get Window Handle using PDA module

    I am trying to find a way to get the current window handle using the PDA module.  I need this handle to call other function via Win dll's.  Has anyone done this before?  Any help would be greatly appreciated (using windows mobile 6.1 and Labview PDA 8.5)  Thanks
    Greycat

    Thanks Mike ...
    I understand that this function does exist, but somehow I am not writing my wrapper properly or calling the function properly because everytime I build my labview app I get a "GetForegroundWindow is a missing VI or C file." - I cannot for the life of me figure this out ... what I was really asking is if anyone has succeeded calling this function and getting the Window Handle.  What I really want to do is run my Labview program on the PDA in full screen mode with no title bar and no SIP button visible or accessible, but to my knowledge, that will take a function call to the aygshell.dll (namely the SHFullScreen function) and that function requires a window handle to work properly ... any more help would be appreciated ... Thanks again
    Greycat

  • Management of window handles across sessions

    Hi All,
    I have a single menu navigation html(image icon per module) for my application modules. Can this navigation menu be used across the new browser sessions created. i.e, the menu need to be having the window handles of all the sessions created on a client m/c.
    Can I acess the window handle in javascript of one session from another session?
    Its ok even if it is IE specific.
    Thanks
    Venu.

    I think the question from me is not clear. For an Application instance, I have the window handles available in the application. What if I open 2 application instances and I need to communicate one window handle of one application instance to another window handle of another application instance...This clearly communicates that these 2 applications are 2 separate session instances. Is it knowing the window names on the client m/c helps...can I get window handle in this case?
    Thanks

  • [JNI] get the window ID

    Hi,
    I'd like to get the window ID of a frame. I'm runing java on Linux.
    I've seen on a web site that I can get it from the JAWT_X11DrawingSurfaceInfo.
    So I did this to get the JAWT_X11DrawingSurfaceInfo :
    JNIEXPORT jlong JNICALL Java_MyFrame_getWindowID(JNIEnv *env, jclass cls, jobject comp) {
      JAWT awt;
      JAWT_DrawingSurface *ds;
      JAWT_DrawingSurfaceInfo *dsi;
      JAWT_X11DrawingSurfaceInfo *dsi_X11;
      jint lock;
      jlong windowID;
      jboolean result;
      /* get the awt */
      awt.version = JAWT_VERSION_1_3;
      result = JAWT_GetAWT(env, &awt);
      assert(result != JNI_FALSE);
      /* get the drawing surface */
      ds = awt.GetDrawingSurface(env, comp);
      assert(ds != NULL);
      /* lock the drawing surface */
      lock = ds->Lock(ds);
      assert((lock & JAWT_LOCK_ERROR) == 0);
      /* get the drawing surface info */
      dsi = ds->GetDrawingSurfaceInfo(ds);
      /* get the X11 drawing surface info */
      dsi_X11 = (JAWT_X11DrawingSurfaceInfo*)dsi->platformInfo;
      windowID = (jlong)dsi_X11->visualID;
      /* resource cleanup */
      ds->FreeDrawingSurfaceInfo(dsi);
      ds->Unlock(ds);
      awt.FreeDrawingSurface(ds);
      return windowID;
    }My pb is that I can't lock my frame. It always crash here : assert((lock & JAWT_LOCK_ERROR) == 0);
    I'm completly lost at the moment, any help will be welcome.
    Thank you for your answers.
    Nicolas

    Linux_Java wrote:
    How do i get the Window Id / handle to java frame.You can't get it from within Java, that much I know, and in fact since it is an OS construct it is meaningless in java. If you are working with MS Windows, I'm guessing that your best bet is to play with some of the functions in the User32 library, such as enumerateWindows and such, and by doing this you'll find out how to get a handle on the JFrame. If it's unix/linux (and given your name, that is a reasonable assumption) then I have no idea.
    If I am giving any actionlistener to my frame that has to be reflected in C windowNo idea what you mean here.
    Anybody can send me the full source code too.Doesn't this kind of go against the philosophy of these forums?
    Also, consider posting this sort of question in the JNI forum where you will have a much better chance of getting a JNI guru who actually knows what he's talking about instead of, well, me.

  • Why i'm getting exception InvalidOperationException: Invoke or BeginInvoke cannot be called on a control until the window handle has been created ?

    I have a backgroundworker1 dowork event and inside:
    private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
    BackgroundWorker bgw = (BackgroundWorker)sender;
    if (bgw.CancellationPending == true)
    return;
    else
    this.BeginInvoke(new MethodInvoker(delegate
    timer1.Stop();
    Button1Code();
    timer1.Start();
    trackBar2.Enabled = false;
    trackBar1.Enabled = false;
    while (true)
    bitmaps = ImagesComparison.get_images_with_clouds(b1);
    for (int i = 0; i < bitmaps.Length; i++)
    ConvertTo1or8Bit.BitmapToGIF(bitmaps[i], @"c:\convertedgifs\" + i.ToString("D6") + ".gif");
    break;
    The exception is on the BeginInvoke part.
    In the last few days i was running the program many times and i didn't have this exception even once.
    And now every times i'm running it i'm getting the exception.
    System.InvalidOperationException was unhandled by user code
    HResult=-2146233079
    Message=Invoke or BeginInvoke cannot be called on a control until the window handle has been created.
    Source=System.Windows.Forms
    StackTrace:
    at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
    at System.Windows.Forms.Control.BeginInvoke(Delegate method, Object[] args)
    at System.Windows.Forms.Control.BeginInvoke(Delegate method)
    at mws.ScanningClouds.backgroundWorker1_DoWork(Object sender, DoWorkEventArgs e) in d:\C-Sharp\Download File\Downloading-File-Project-Version-012\Downloading File\ScanningClouds.cs:line 715
    at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
    at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
    InnerException:
    Line 715 is: this.BeginInvoke(new MethodInvoker(delegate

    Where are you starting the background worker from?  Possibly the constructor of the form?
    It would be greatly appreciated if you would mark any helpful entries as helpful and if the entry answers your question, please mark it with the Answer link.

  • How to Use AccessibleObjectFromWindow API in VBA to Get Excel Application Object from Excel Instance Window Handle

    I need to get the Excel.application object from a window handle using AccessibleObjectFromWindow. I can't seem to make the code work. First, I successfully search for the XLMAIN windows. Then, when I get a handle, I execute the AccessibleObjectFromWindow
    function. It seems to return a value of -2147467262 in all cases. Therefore, I believe that it is returning an error value. I can't figure out how to determine the meaning of this value.
    If it is an error value, I believe that one or more arguments are in error. My best guess at present is that the GUID argument is incorrect. I have tried two GUID values: {00020400-0000-0000-C000-000000000046} and {90140000-0016-0409-0000-0000000FF1CE}.
    I have seen both used in conjunction with OBJID_NATIVEOM. Neither one seems to work. I really would prefer not to use the second one as it has an Excel major and minor version number. I would hate to have to change this code, if a new minor version appeared.
    The attached code has been commented to show which parts have been shown to work and which not. I'm at my wits end and really need help.
    Thanks
    'This module is located in Access 2010, but this is an Excel question.
    Option Compare Database
    Option Explicit
    ' Module-Level Declarations
    'The GetDesktopWindow function and FindWindowEx function work just fine.
    Public Declare Function GetDesktopWindow Lib "user32" () As Long
    Public Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" _
    (ByVal hWnd1 As Long, _
    ByVal hWnd2 As Long, _
    ByVal lpsz1 As String, _
    ByVal lpsz2 As String) _
    As Long
    'I'm not getting the expected output from this function (see below)
    Private Declare Function AccessibleObjectFromWindow& Lib "oleacc.dll" _
    (ByVal hwnd&, _
    ByVal dwId&, _
    riid As GUID, _
    xlwb As Object)
    Type GUID
    lData1 As Long
    iData2 As Integer
    iData3 As Integer
    aBData4(0 To 7) As Byte
    End Type
    Function ExcelInstances() As Long
    ' Procedure-Level Declarations
    ' Value of OBJID_NATIVEOM verified by checking list of Windows API constants _
    on this site: http://www.lw-tech.com/q1/base.htm
    Const OBJID_NATIVEOM = &HFFFFFFF0
    Dim hWndDesk As Long 'Desktop window
    Dim hWndXL As Long 'Child window
    Dim objExcelApp As Object 'Final result wanted: Excel application object
    'Following variable (xlapp) to be set by AccessibleObjectFromWindow function
    Dim xlapp As Object
    Dim IDispatch As GUID 'GUID used in call to AccessibleObjectFrom Window function
    'Set up GUID to be used for all instances of Excel that are found
    Dim tmp1 As Variant 'Return value from AccessibleObjectFromWindow
    ' Executable Statements
    SetIDispatch IDispatch
    IDispatch = IDispatch
    'Get a handle to the desktop
    hWndDesk = GetDesktopWindow 'This seems to work
    Do
    'Get the next Excel window
    'The following statement seems to work. We are finding and counting _
    correctly all the instances of Excel. hWndXL is non-zero for each _
    instance of Excel
    hWndXL = FindWindowEx(GetDesktopWindow, hWndXL, "XLMAIN", vbNullString)
    'If we got one, increment the count
    If hWndXL > 0 Then
    'This works. We correctly count all _
    instances of Excel
    ExcelInstances = ExcelInstances + 1
    'Here is the problem. The following statement executes and returns a value of _
    -2147467262. xlapp, which is passed by reference to AccessibleObjectFromWindow, _
    is set to nothing. It should be set to the object for Excel.application. _
    I believe that this value is not an object. I tried to reference tmp1. in the _
    immediate window. There was no Intellisense.
    'I think that the function in returning an error value, but I can't figure _
    out what it is. I believe that AccessibleObjectFromWindow returns error _
    values, but I don't know where to find their values so I can interpret the _
    function's results.
    'As best I can tell, the hWndXL parameter is correct. It is the handle for _
    an instance of Excel. OBJID_NATIVEOM is set correctly (see constant declaration _
    above). xlapp is passed by reference as a non-initialized object variable, which _
    will be set by AccessiblObjectFromWindow. IDispatch may be the problem. It is set _
    as shown below in the procedure SetIDispatch(ByRef ID As GUID). This procedure _
    appears to work. I can see that IDispatch is set as I intended and correctly _
    passed to AccessibleObjectFromWindow.
    tmp1 = AccessibleObjectFromWindow(hWndXL, OBJID_NATIVEOM, IDispatch, xlapp)
    'Need to write code to test tmp1 for error. If none, then set objExcelApp = _
    object. Also, I exect xlapp to be set to Excel.application
    End If
    'Loop until we've found them all
    Loop Until hWndXL = 0
    End Function
    Private Sub SetIDispatch(ByRef ID As GUID)
    'Defines the IDispatch variable. The interface _
    ID is {90140000-0016-0409-0000-0000000FF1CE}.
    'NOT USING {00020400-0000-0000-C000-000000000046}, _
    which could be the problem
    '9 is release version - first version shipped (initial release)
    '0 is release type - retail/oem
    '14 is major version
    '0000 is minor version
    '0016 is product ID - MS Excel 2010
    '0409 is language identifier - English
    '0 is x86 or x64 - this is x86
    '000 reserved
    '0 is debug/ship
    '000000FF1CE is office family ID
    With ID
    .lData1 = &H90140000
    .iData2 = &H16
    .iData3 = &H409
    .aBData4(0) = &H0
    .aBData4(1) = &H0
    .aBData4(2) = &H0
    .aBData4(3) = &H0
    .aBData4(4) = &H0
    .aBData4(5) = &HF
    .aBData4(6) = &HF1
    .aBData4(7) = &HCE
    End With
    End Sub
    DaveInCalabasas

    I don't think you can return a reference to Excel's main window like that as you are attempting to do.
    Ref:
    http://msdn.microsoft.com/en-us/library/windows/desktop/dd317978(v=vs.85).aspx 
    It's relatively straightforward to return any workbook's window in any given instance, and in turn it's parent Excel app. Try the following and adapt as required (and include error handling) -
    Option Explicit
    Private Declare Function FindWindowEx Lib "User32" Alias "FindWindowExA" _
    (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, _
    ByVal lpsz2 As String) As Long
    Private Declare Function IIDFromString Lib "ole32" _
    (ByVal lpsz As Long, ByRef lpiid As GUID) As Long
    Private Declare Function AccessibleObjectFromWindow Lib "oleacc" _
    (ByVal hWnd As Long, ByVal dwId As Long, ByRef riid As GUID, _
    ByRef ppvObject As Object) As Long
    Private Type GUID
    Data1 As Long
    Data2 As Integer
    Data3 As Integer
    Data4(7) As Byte
    End Type
    Private Const S_OK As Long = &H0
    Private Const IID_IDispatch As String = "{00020400-0000-0000-C000-000000000046}"
    Private Const OBJID_NATIVEOM As Long = &HFFFFFFF0
    Sub test()
    Dim i As Long
    Dim hWinXL As Long
    Dim xlApp As Object ' Excel.Application
    Dim wb As Object ' Excel.Workbook
    hWinXL = FindWindowEx(0&, 0&, "XLMAIN", vbNullString)
    While hWinXL > 0
    i = i + 1
    Debug.Print "Instance_" & i; hWinXL
    If GetXLapp(hWinXL, xlApp) Then
    For Each wb In xlApp.Workbooks
    Debug.Print , wb.Name
    Next
    End If
    hWinXL = FindWindowEx(0, hWinXL, "XLMAIN", vbNullString)
    Wend
    End Sub
    'Function GetXLapp(hWinXL As Long, xlApp As Excel.Application) As Boolean
    Function GetXLapp(hWinXL As Long, xlApp As Object) As Boolean
    Dim hWinDesk As Long, hWin7 As Long
    Dim obj As Object
    Dim iid As GUID
    Call IIDFromString(StrPtr(IID_IDispatch), iid)
    hWinDesk = FindWindowEx(hWinXL, 0&, "XLDESK", vbNullString)
    hWin7 = FindWindowEx(hWinDesk, 0&, "EXCEL7", vbNullString)
    If AccessibleObjectFromWindow(hWin7, OBJID_NATIVEOM, iid, obj) = S_OK Then
    Set xlApp = obj.Application
    GetXLapp = True
    End If
    End Function
    Note as written if an instance does not have any loaded workbooks a reference will not be returned (though a workbook can be added using DDE, but convoluted!)
    FWIW there are two other very different approaches to grab all running Excel instances though something along the lines of the above is simplest.
    Peter Thornton

  • I'm trying to access Window Handle (HWND) in Labview. This is an argument of a DLL. Also I need to get a pointer of an image buffer.

    Call library function in Labview:
    =================================
    Hi all,
    I'm trying to access a DLL using Call library function in Labview.
    1) I have problems in obtaining the window handle (hDC) of an object in Labview.
    2) Also to get the pointer of an image buffer.
    thanks
    Code Warrior
    Take life as it comes! you may never know what's gonna happen Tommorrow

    Bob Y. wrote:
    I'm trying to do something similar right now and coming to the same problems. I am trying to get the image from a Nikon DXM1200 camera that is mounted on a microscope. It has its own commands and capture card and is not playing well with the imaq stuff. I am using their SDK in an effort to get the images into LabVIEW.
    As I said, I am having the same types of problems. I managed to wrap everying into a dll and into a .net assembley, but I have been unable to figure out a way to get it into LabVIEW. I can call either of these things from LabVIEW to make an image capture. But, I have been unable to transfer that image into LabVIEW. I also have been unable to get enough windowing information to get the information into LabVIEW.
    I am not sure what Code Warrior is doing, but here is why I have been tracking this thread with great interest.
    Thanks for the thread,
    Bob
    You might want to look at http://www.hytekautomation.com/products.html. They have a Nikon interface for LabVIEW and since you already have the SDK, the issue mentioned on their site won't be a problem for you. It is for sure much more cost effective to pay them some money for that interface than trying to develop an interface yourself. The issues are quite involved and even if you knew quite some stuff about LabVIEW memory management and its internal C programming interface (and you can get quite some information from looking at the NI-IMAQ VIs too, eventhough they are anything but a nice example for good programming style), it is a work counting into weeks to get it done right.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Njawin and getting a handle to IE popup windows

    I am using njawin to generate mshtml and shdocvw in order to control Internet
    Explorer. I can get IE to come up and I can click links, set inputs, etc. But when I click a link the pops up a new window how do I get a handle to it? I am using the event NewWindow2 which gets called, but there is no reference to the new window passed in.
    Njawin generated Java:
    public void NewWindow2(Object o, ObjectRef objectRef, ObjectRef objectRef1) throws COMException
    MSHTML interface:
    void NewWindow2(
    IDispatch **&ppDisp,
    VARIANT_BOOL *&Cancel
    Please advise� thanks,
    Brian

    I little more info on this one...
    public void NewWindow2(Object o, ObjectRef objectRef, ObjectRef objectRef1) throws COMException
    When the NewWindow2 event is called, a reference to the original parent IWebBrowser2 is passed in the first parameter "Object o". And it looks like the new popup IWebBrowser2 should be passed in the second parameter "ObjectRef objectRef", but unfortunately it's getRef method returns null. The third parameter returns boolean which is correct according to the mshtml interface definition.
    Does the code njawin generate not support these types of events properly? What can I do to make it work?
    Thanks,
    Brian

  • Getting a Windows Handle from an Applet

    how can i do it using jdk1.3? i looked thru the documentation and i didnt see anything. (hopefully i missed something)...thx...sonny

    Which window handle your talking about? Browser window?
    If so use the netscape.javascript pacakage
    import netscape.javascript.*;
    JP

  • How to get a handle which is used in c dll from  javax.smartcardio.card

    good afternoon
    i am using javax.smartcardio.card to operate a sim-card reader .
    but i have a dll which is call sim-card reader by handle.
    how can i get a handle from a javax.smartcardio.card object to pass to the dll
    next is the code .
    c dll prototype declaration
    char DoFormat([in] unsigned long P1�C[in] char * P2�C[in] bool P3,[in][out] char *P4)P1 is a handle
    java code:
    private boolean checkCardReader(boolean isopen)
    boolean r=false;
    try {
    javax.smartcardio.card card;
    TerminalFactory factory = TerminalFactory.getDefault();
    List terminalList = factory.terminals().list();
    terminal = (CardTerminal) terminalList.get(0);
    // establish a connection with the card
    card = terminal.connect("T=0");
    channel = card.getBasicChannel();
    //how can i get a handle which can be used by windows dll .
    }catch (Exception ex)
    System.out.println("Exception : " + ex);
    return r;
    *****************************************************************

    Presumably you are calling a C library method that returns a handle.
    Normally a handle will be a integer type value.
    With such a value you can cast it into a java integer type and then cast it back in different JNI code by passing it to those routines.
    A java long is as big as you can get and will hold most every normal type handle item. You should however verify sizes.

  • Is it possible to get the handle of a HTML UI element in JSPDynpage?

    Hi Experts,
    I am new to Portal Development and my current requirement is as follows:
    User is provided an option to upload a file to KM from the JSP for which i used a HTMLB fileupload UI element. I was able to upload the file to the KM.
    But the client wanted their specific theme for the Upload UI element to be set. The default Browse button was to be replaced by the custom image. We tried using CSS for setting the image as the background image, but failed doing it. We used the following code for achieving:
    JSP Dynpage:
    <hbj:fileUpload  id="docupload"                   
            maxLength="125000"                   
            size="50"   />
    JQuery:
    var funcName = htmlb_formid+"_getHtmlbElementId";
    func = window[funcName];
    var HTMLBElementIdSubmit = eval(func("<UI ID>"));
    $("#"+HTMLBElementIdSubmit.id).removeClass("urUpld ");
    $("#"+HTMLBElementIdSubmit.id).addClass("<custom class>");
    We tried using standard file UI in HTML and we are successful in setting the background image as per the clients requirement using JQuery to replace the standard look using:
    $("[type='file']").removeClass("urUpld");
        $("[type='file']").addClass("btngrey");
    But we are now facing the problem in the controller where the following line is throwing an error as we are unable to get the handle for a standard HTML UI element.
    com.sapportals.htmlb.FileUpload.FileUpload imageupload = (FileUpload) getComponentByName("<ID>");
    Kindly let me know more if either of the 2 points below:
    1. Is there an option to customize the standard HTMLB fileupload UI element as per our choice using Javascript / JQuery?
    2. Is there a way to get the handle in Dynpage controller for HTML UI elements?
    Regards,
    Poojith MV

    Hi Poojith
    Not sure if this would solve your requirment but just in case might be helpful:
    1. We can mix up the HTML and HTMLB components in the JSP Page. However, can access only the HTMLB components in the controller. The following link refers to what customizations are offered by the HTMLB framework:
    [http://www.sapdesignguild.org/resources/htmlb_guidance/]
    2. Another option would be to use AbstractPortalComponents or a simple web app if that's feasible. (where custom UI themes, css and layout are more in control of the developers.)
    Thanks
    Deepak

  • Acrobat Plug In...Could not find external window handler

    When I try to open a pdf file with Adobe Acrobat, my computer gives me a prompt, Acrobat Plug In...Could not find external window handler...
    The problem just started recently.  I am running Adobe Acrobat 6.0 and the ME version of Windows.  The Microsoft help desk told me this was an Adobe problem.
    Can anyone give me some advise?

    Hello.
    I'm getting the same problem.
    Did you find a solution?
    Thanks a lot

  • Use a window handler in a webutil_c_api.invoke

    Hi
    I need to get the window handler of the forms, but I always get 0 from get_window_property( 'my_win',WINDOW_HANDLE )
    and wen I ran the function:
    webutil_c_api.invoke(ps_dll,'TWAIN_AcquireToFilename',func_param_acq);
    the function send me a messagebox of "invalid window handler", then the twain execute well the function and when it finish, the web browser window is closed.
    Can somebody tell me what is wrong ?
    Is not possible to use a C function in a dll with webutil_c_api, that needs a window handler as a parameter
    Thanx in advance

    Hi
    I need to get the window handler of the forms, but I always get 0 from get_window_property( 'my_win',WINDOW_HANDLE )
    and wen I ran the function:
    webutil_c_api.invoke(ps_dll,'TWAIN_AcquireToFilename',func_param_acq);
    the function send me a messagebox of "invalid window handler", then the twain execute well the function and when it finish, the web browser window is closed.
    Can somebody tell me what is wrong ?
    Is not possible to use a C function in a dll with webutil_c_api, that needs a window handler as a parameter
    Thanx in advance

  • Error creating window handle and out of memory

    Hello everyone !
    I am having a .Net Windows application (VB.Net) that creates a lot of reports (the same report document for different clients and dates) for exporting them to PDF.
    While the first 75 reports are performed well the 76th report causes an error while creating the window handle and I get an out of memory error as well.
    Searching this forum and the internet I tried a lot of things to get this problem solved:
    - closing, disposing any report as well as setting it to nothing after exporting it to disk (also doing this for used dataset and datatable)
    - doing a single report operation in an own class that is set to nothing immediately after use
    - using garbage collector (methods: "Collect" and "WaitForPendingFinalizers")
    - defining the report, used dataset and datable within "using .. end using" blocks
    - take a single report object for all exports (implemented as singleton)
    - using a background thread to handle report and operation on it
    - changing registry entry "PrintJobLimit" to an higher value as well as to -1
    But none of my tries helped me so far, it's always the 76th report that collapses.
    Interesting thing: Exporting as PDF is not needed for causing the error (switched this off for all reports to test any difference).
    My system:
    - Visual Studio 2008 and .Net 3.5 Service Pack 1
    - Crystal Reports Basic for Visual Studio 2008 Service Pack 1
    Any help is appreciated.
    Thank You very much,
    M.Deister
    Edited by: M.Deister on Sep 20, 2011 2:17 PM

    Hello,
    Saving the report as RPT doesn't save the data which is why it's failing to log on, you have to export it to RPT format, then use that in your test.
    Also, I assume you are using the Report Engine. Try using InProc RAS to load and run the report.
    Just a few lines of code change is all it needs.
    using CrystalDecisions.CrystalReports.Engine;
    using CrystalDecisions.Shared;
    using CrystalDecisions.ReportAppServer.ClientDoc;
    using CrystalDecisions.ReportAppServer.Controllers;
    using CrystalDecisions.ReportAppServer.ReportDefModel;
    using CrystalDecisions.ReportAppServer.CommonControls;
    using CrystalDecisions.ReportAppServer.CommLayer;
    using CrystalDecisions.ReportAppServer.CommonObjectModel;
    using CrystalDecisions.ReportAppServer.ObjectFactory;
    using CrystalDecisions.ReportAppServer.DataSetConversion;
    using CrystalDecisions.ReportAppServer.DataDefModel;
    using CrystalDecisions.ReportSource;
    using CrystalDecisions.Windows.Forms;
         public class frmMain : System.Windows.Forms.Form
            CrystalDecisions.CrystalReports.Engine.ReportDocument rpt = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
            CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument rptClientDoc;
    private void btnOpenReport_Click(object sender, System.EventArgs e)
        rptClientDoc = new CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocument(); // ReportClientDocumentClass();
        openFileDialog.Filter = "Crystal Reports (*.rpt)|*.rpt|Crystal Reports Secure (*.rptr)|*.rptr";
        //openFileDialog1.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*";
        openFileDialog.FilterIndex = 1;
        //rptClientDoc.MinorVersion();
         if (openFileDialog.ShowDialog() == DialogResult.OK)
              object rptName = openFileDialog.FileName;
            try
                rpt.Load(rptName.ToString(), OpenReportMethod.OpenReportByTempCopy);
                rptClientDoc = rpt.ReportClientDocument;
                btnReportName.Text = rptName.ToString();
                //btnReportName.Text = rptClientDoc.DisplayName.ToString();
            catch (Exception ex)
                MessageBox.Show("ERROR: " + ex.Message);
                return;
            rptClientDoc = rpt.ReportClientDocument;
    Don

Maybe you are looking for

  • Tour Smartphone 9630 not synching. Getting "unknown error message"

    After 6 months of no problems, I am now unable to sync my Blackberry to my computer. I am getting an "unknown error message" what's going on?

  • Error in Single Row Object Type

    Hi Buddies, I have created 2 single row Object Type.It shows as Follows; SQL> create or replace type dob_date as object *2 (Day number,* *3 Month varchar2(12),* *4 year Number);* *5 /* Type created. SQL> create or replace type names as object *2 (Fna

  • How to force english language for VC BI Iview

    Hi, All developments in BI system are english so when users launch VC BI Iview from the portal what ever the logon language in the portal we would like that users get results in english. In the VC iview, for parameter Forced Request Language we selec

  • Iphone 2.01 update troubles

    Prior to updating my phone i had no problems. Post update it crashed and it wouldn't reset. Finally im back up and running but i'm finding in areas where i had a previous connection its now saying "cannot access the network". Anyone else getting this

  • How can i remove duplicate emails?

    1) How can I remove duplicate emails? 2) in main inbox folder of all my accounts, I don't want to see duplicate emails? 3) I want to filter with duplicate emails.