Window Handle getHWND() for jdk 5.0

Does the following getHWND() method works for jdk 5.0?
public int getHWND () {
     DrawingSurfaceInfo drawingSurfaceInfo;
     Win32DrawingSurface win32DrawingSurface;
     int hwnd = 0;
     drawingSurfaceInfo = ((DrawingSurface)(getPeer())).getDrawingSurfaceInfo();
     if (null != drawingSurfaceInfo) {
          drawingSurfaceInfo.lock();
          win32DrawingSurface = (Win32DrawingSurface)drawingSurfaceInfo.getSurface();
          hwnd = win32DrawingSurface.getHWnd();
          drawingSurfaceInfo.unlock();
     return  hwnd;
}Thanks in advance.
sg
New Jersey

Hi Jim,
I tried to get HWND by referring from http://java.sun.com/j2se/1.3/docs/guide/awt/AWT_Native_Interface.html
The only difference i made is that I'm passing container instead of canvas to get HWND.
I declared native method in java as:
public native int getHWND(Container window);I got " Null drawing surface" for that from the follwing code line of my VC++ source code.
JNIEXPORT jint JNICALL Java_com_AccesControls_getHWND
  (JNIEnv *env, jobject, jobject window)
/* Get the drawing surface */
    ds = awt.GetDrawingSurface(env, window);
    if (ds == NULL) {
        printf("NULL drawing surface\n");
        return;
}Do you have any idea why awt.GetDrawingSurface(env, window) returns null?
I would be appereciate your any suggestion regarding this topic.
Kirti
Message was edited by:
Kirti_Mistry

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

  • Why does multiple handles created for the file File (RW-) C:\Windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4940_none_d08cc06a442b34fc

    I am analysing the file handles created by my desktop application and when i generate a report using handle.exe, in report i could see multiple file handles created for 
    1) File  (RW-)   C:\Windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4940_none_d08cc06a442b34fc
    2) File  (RW-)   C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2
    I could see around 80 entries of file1 and around 5-10
     file 2 .
    What my understanding about the WinSxS, should load the dll only once and should keep referencing the same dll. But what my results out from handle.exe contains multiple file handles created. Is there a glitch in system or is it expected behavior? If there
    is a problem how to fix it?
    My system configuration is as follows
     OS windows7 enterprise edition , service pack1..
    64 bit os,  intel core i7 processor
    .net framework 4.5
    Thanks
    Srikanth

    As this thread has been quiet for a while, we assume that the issue has been resolved. At this time, we will mark it as ‘Answered’ as the previous
    steps should be helpful for many similar scenarios.  <o:p></o:p>
    If the issue still persists and you want to return to this question, please reply this post directly so we will be notified to follow it up. You
    can also choose to unmark the answer as you wish.  <o:p></o:p>
    In addition, we’d love to hear your feedback about the solution. By sharing your experience you can help other community members facing similar
    problems.  <o:p></o:p>
    Thanks!<o:p></o:p>
    Arnav Sharma | http://arnavsharma.net/ Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading
    the thread.

  • 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

  • Windows handles left open after opening and closing registry key

    When I open a registry key with 'Create Registry Key.vi' or 'Open Registry Key.vi' and thereafter close it with 'Close Registry Key.vi', there are 2 Windows handles left open. As my program polls the registry for changes repeatedly, my system crashes because after a certain time of use, no handles are available anymore.
    I'm using Windows XP and Labview 8.6.
    The VI in the attachment illustrates the problem (reading and writing of values are left out as these have no influence on the problem).
    How can I read and write the registry, without leaving open handles?
    Ruud
    Attachments:
    Registry-handles.vi ‏12 KB

    Dear Ruud,
    thank you so much for your post on our webforum. I noticed that this is a known issue for Labview 8.6, a while ago it was reported with a Corrective Action Request (CAR# 132471). The issue should be resolved with Labview 2009. I wasn't able to reproduce the issue wit Labview 2010, the number of handles stayed arround 28000,
    best regards,
    Martijn S
    Applications Engineer
    NI Netherlands
    Attachments:
    handles.JPG ‏104 KB

  • 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

  • Windows handle of the Main Window of the SAPGUI

    Hi experts,
    i need to have the window handle value of the window of the Main MDI window of the SAP GUI from ABAP, does anyone know a FunctionModule or something like this to retrieve this information?
    I need to retrieve information about the geometry of the window (Like the coordinates of the window,..).
    (For 46C)
    Can anyone help me?
    Many thanks and regards,
    Gianpietro Dal Zio

    If this is not something you hope to do programatically .. MS's SPY++ utility will be of assist. If you wish to do it programmically .. I'm a newbie and am unaware of an FM to do it, though if it is possible to call a WIN API Function from ABAP, that may be a course you could persue

  • I am having a problem installing the x86 drivers on a Windows 2008 server for a hp 4000n.

    I am having a problem installing the x86 drivers on a Windows 2008 server for a hp laserjet 4000n.

    Hi all,
    Sylonious, did you manage to sort this problem out? I have been experiencing similar problems. I think my problem was because I had many different versions of JDKs. I have done a complete re-install. I would be really grateful to you (and anyone else) for help with this problem.
    I have re-installed JSDK1.4.2_03, set the "path" variable to "C:\JSDK1.4.2_03".
    When I compile using "javac" I get an error saying "javac" is not recognised.
    When I compile using "C:\j2sdk1.4.2_03\bin\javac Freq.java" no error is thrown.
    Every time I try to run a java file, I always get the NoClassDefFound error. When run with the -verbose option, files are loaded from C:\Program Files\Java\j2re1.4.2_03\bin - is this correct?
    I have removed all previous references to java in the registry editor.
    Please help !
    Regards,
    Vipul

  • 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

  • Where can I get a java API specification for jdk 6 update 7?

    Where can I get a java API specification for jdk 6 update 7?
    About jdk-6u7-windows-i586-p.exe

    Flying_eagle wrote:
    I don't know what is it called. I think maybe it's a specification about api that lists java api and explains how to use them.
    Such as a html file just like a dictionary.Well, the API documentation I posted a link of in reply #1 is not an explanation of how to use the Java classes. It is more a reference. When you need a thorough explanation, I recommend doing some tutorials, or buying a book.

  • New handlers for JDK Logging

    Does anyone know of any OpenSource Handlers for JDK Logging such as a JMS Handler, JDBC Handler, SMPT Handler or Daily Rolling File Handler? I would love to use JDK instead of Log4J, but the latter supplies these handlers (appenders) out of the box.

    Huh?
    If you are looking for open source anyways then why not just use log4j?

  • Where is Support for Windows Update issues for Windows Server?

    Where is Support for Windows Update Issues for Windows Server?
    Windows Update keeps prompting to install an important update, KB2871690 and continually fails with error code 0x800f922
    I ran all the fixes I can find, it still fails.
    I also tried the manual install, fails.
    Microsoft used to provide no charge support for Windows Update issues. They additionally offer online fixes  for other versions of windows, but not server, and I can't find a forum.
    I also cannot ignore the update, it continually prompts.
    I ran the windowsupdate.diagcab and it continually states it fixes Windows Update error 0x80070057, by resetting windows update data store. It further states it fixes Problems installing recent updates.
    But it doesn't. I've run it 50 times, and it says the same thing every time.
    So there is no support for windows update, and no support for windowsupdate.diagcab.
    What's the deal?

    I've done the SFC/ SCANNOW and DISM
    here is the cbs.log
    What are we looking for?
    2013-12-04 19:48:19, Info                  DISM   PID=1612 TID=1616 Scratch directory set to 'X:\$WINDOWS.~BT\Windows\TEMP\'. - CDISMManager::put_ScratchDir
    2013-12-04 19:48:19, Info                  DISM   PID=1612 TID=1616 DismCore.dll version: 6.2.9200.16384 - CDISMManager::FinalConstruct
    2013-12-04 19:48:19, Info                  DISM   PID=1612 TID=1616 Scratch directory set to 'X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360'. -
    CDISMManager::put_ScratchDir
    2013-12-04 19:48:19, Info                  DISM   PID=1612 TID=1616 Successfully loaded the ImageSession at "X:\$Windows.~BT\sources" - CDISMManager::LoadLocalImageSession
    2013-12-04 19:48:20, Info                  DISM   DISM Provider Store: PID=1612 TID=1616 Found and Initialized the DISM Logger. - CDISMProviderStore::Internal_InitializeLogger
    2013-12-04 19:48:20, Info                  DISM   DISM Provider Store: PID=1612 TID=1616 Failed to get and initialize the PE Provider.  Continuing by assuming
    that it is not a WinPE image. - CDISMProviderStore::Final_OnConnect
    2013-12-04 19:48:20, Info                  DISM   DISM Provider Store: PID=1612 TID=1616 Finished initializing the Provider Map. - CDISMProviderStore::Final_OnConnect
    2013-12-04 19:48:20, Info                  DISM   DISM Provider Store: PID=1612 TID=1616 Getting Provider DISMLogger - CDISMProviderStore::GetProvider
    2013-12-04 19:48:20, Info                  DISM   DISM Provider Store: PID=1612 TID=1616 Provider has previously been initialized.  Returning the existing instance.
    - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:20, Info                  DISM   DISM Provider Store: PID=1612 TID=1616 Getting Provider DISMLogger - CDISMProviderStore::GetProvider
    2013-12-04 19:48:20, Info                  DISM   DISM Provider Store: PID=1612 TID=1616 Provider has previously been initialized.  Returning the existing instance.
    - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:20, Info                  DISM   DISM Manager: PID=1612 TID=1616 Successfully created the local image session and provider store. - CDISMManager::CreateLocalImageSession
    2013-12-04 19:48:20, Info                  DISM   DISM Provider Store: PID=1612 TID=1616 Getting Provider DISMLogger - CDISMProviderStore::GetProvider
    2013-12-04 19:48:20, Info                  DISM   DISM Provider Store: PID=1612 TID=1616 Provider has previously been initialized.  Returning the existing instance.
    - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:20, Info                  DISM   DISM.EXE:
    2013-12-04 19:48:20, Info                  DISM   DISM.EXE: <----- Starting Dism.exe session ----->
    2013-12-04 19:48:20, Info                  DISM   DISM.EXE:
    2013-12-04 19:48:20, Info                  DISM   DISM.EXE: Host machine information: OS Version=6.2.9200, Running architecture=amd64, Number of processors=4
    2013-12-04 19:48:20, Info                  DISM   DISM.EXE: Dism.exe version: 6.2.9200.16384
    2013-12-04 19:48:20, Info                  DISM   DISM.EXE: Executing command line: X:\$Windows.~BT\sources\dism.exe  /logpath:X:\$Windows.~BT\sources\Panther\cbs.log
    /scratchdir:X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360 /image:X:\ /is-serviceable
    2013-12-04 19:48:20, Info                  DISM   DISM Provider Store: PID=1612 TID=1616 Getting the collection of providers from a local provider store type. - CDISMProviderStore::GetProviderCollection
    2013-12-04 19:48:20, Info                  DISM   DISM Provider Store: PID=1612 TID=1616 Provider has not previously been encountered.  Attempting to initialize
    the provider. - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:20, Info                  DISM   DISM Provider Store: PID=1612 TID=1616 Loading Provider from location X:\$Windows.~BT\sources\FolderProvider.dll
    - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:20, Info                  DISM   DISM Provider Store: PID=1612 TID=1616 Connecting to the provider located at X:\$Windows.~BT\sources\FolderProvider.dll.
    - CDISMProviderStore::Internal_LoadProvider
    2013-12-04 19:48:20, Info                  DISM   DISM Provider Store: PID=1612 TID=1616 Provider has not previously been encountered.  Attempting to initialize
    the provider. - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:20, Info                  DISM   DISM Provider Store: PID=1612 TID=1616 Loading Provider from location X:\$Windows.~BT\sources\WimProvider.dll -
    CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:20, Warning               DISM   DISM Provider Store: PID=1612 TID=1616 Failed to Load the provider: X:\$Windows.~BT\sources\WimProvider.dll. - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e)
    2013-12-04 19:48:20, Info                  DISM   DISM Provider Store: PID=1612 TID=1616 Provider has not previously been encountered.  Attempting to initialize
    the provider. - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:20, Info                  DISM   DISM Provider Store: PID=1612 TID=1616 Loading Provider from location X:\$Windows.~BT\sources\VHDProvider.dll -
    CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:20, Warning               DISM   DISM Provider Store: PID=1612 TID=1616 Failed to Load the provider: X:\$Windows.~BT\sources\VHDProvider.dll. - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e)
    2013-12-04 19:48:20, Info                  DISM   DISM Provider Store: PID=1612 TID=1616 Provider has not previously been encountered.  Attempting to initialize
    the provider. - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:20, Info                  DISM   DISM Provider Store: PID=1612 TID=1616 Loading Provider from location X:\$Windows.~BT\sources\ImagingProvider.dll
    - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:20, Warning               DISM   DISM Provider Store: PID=1612 TID=1616 Failed to Load the provider: X:\$Windows.~BT\sources\ImagingProvider.dll. - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e)
    2013-12-04 19:48:20, Info                  DISM   DISM Provider Store: PID=1612 TID=1616 Provider has not previously been encountered.  Attempting to initialize
    the provider. - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:20, Info                  DISM   DISM Provider Store: PID=1612 TID=1616 Loading Provider from location X:\$Windows.~BT\sources\CompatProvider.dll
    - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:20, Info                  DISM   DISM Provider Store: PID=1612 TID=1616 Connecting to the provider located at X:\$Windows.~BT\sources\CompatProvider.dll.
    - CDISMProviderStore::Internal_LoadProvider
    2013-12-04 19:48:20, Info                  DISM   DISM.EXE: Got the collection of providers. Now enumerating them to build the command table.
    2013-12-04 19:48:20, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: DISM Log Provider
    2013-12-04 19:48:20, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: FolderManager
    2013-12-04 19:48:20, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: Compatibility Manager
    2013-12-04 19:48:20, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: Compatibility Manager.
    2013-12-04 19:48:20, Warning               DISM   DISM.EXE: Failed to load WimManager. Try running from the Deployment Tools Command Prompt. If the issue persists, ensure that wimgapi.dll
    and wimserv.exe are up to date.
    2013-12-04 19:48:20, Warning               DISM   DISM.EXE: Failed to add any commands.
    2013-12-04 19:48:20, Info                  DISM   DISM Provider Store: PID=1612 TID=1616 Getting the collection of providers from a local provider store type. - CDISMProviderStore::GetProviderCollection
    2013-12-04 19:48:20, Info                  DISM   DISM Manager: PID=1612 TID=1616 physical location path: X:\ - CDISMManager::CreateImageSession
    2013-12-04 19:48:20, Info                  DISM   DISM Manager: PID=1612 TID=1616 Copying DISM from "X:\Windows\System32\Dism" - CDISMManager::CreateImageSessionFromLocation
    2013-12-04 19:48:20, Info                  DISM   DISM Manager: PID=1612 TID=1616 Successfully loaded the ImageSession at "X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360\0C032313-F68B-4BD3-B62F-52A81CE58FCD"
    - CDISMManager::LoadRemoteImageSession
    2013-12-04 19:48:20, Info                  DISM   DISM Image Session: PID=1644 TID=1656 Instantiating the Provider Store. - CDISMImageSession::get_ProviderStore
    2013-12-04 19:48:20, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Initializing a provider store for the IMAGE session type. - CDISMProviderStore::Final_OnConnect
    2013-12-04 19:48:20, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Provider has not previously been encountered.  Attempting to initialize
    the provider. - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:20, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Loading Provider from location X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360\0C032313-F68B-4BD3-B62F-52A81CE58FCD\OSProvider.dll
    - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:20, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Connecting to the provider located at X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360\0C032313-F68B-4BD3-B62F-52A81CE58FCD\OSProvider.dll.
    - CDISMProviderStore::Internal_LoadProvider
    2013-12-04 19:48:20, Info                  DISM   DISM OS Provider: PID=1644 TID=1656 Defaulting SystemPath to X:\ - CDISMOSServiceManager::Final_OnConnect
    2013-12-04 19:48:20, Info                  DISM   DISM OS Provider: PID=1644 TID=1656 Defaulting Windows folder to X:\Windows - CDISMOSServiceManager::Final_OnConnect
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Attempting to initialize the logger from the Image Session. - CDISMProviderStore::Final_OnConnect
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Provider has not previously been encountered.  Attempting to initialize
    the provider. - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Loading Provider from location X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360\0C032313-F68B-4BD3-B62F-52A81CE58FCD\LogProvider.dll
    - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Connecting to the provider located at X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360\0C032313-F68B-4BD3-B62F-52A81CE58FCD\LogProvider.dll.
    - CDISMProviderStore::Internal_LoadProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Found and Initialized the DISM Logger. - CDISMProviderStore::Internal_InitializeLogger
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Provider has not previously been encountered.  Attempting to initialize
    the provider. - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Loading Provider from location X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360\0C032313-F68B-4BD3-B62F-52A81CE58FCD\PEProvider.dll
    - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:22, Warning               DISM   DISM Provider Store: PID=1644 TID=1656 Failed to Load the provider: X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360\0C032313-F68B-4BD3-B62F-52A81CE58FCD\PEProvider.dll.
    - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e)
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Failed to get and initialize the PE Provider.  Continuing by assuming
    that it is not a WinPE image. - CDISMProviderStore::Final_OnConnect
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Finished initializing the Provider Map. - CDISMProviderStore::Final_OnConnect
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Getting Provider DISMLogger - CDISMProviderStore::GetProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Provider has previously been initialized.  Returning the existing instance.
    - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Manager: PID=1612 TID=1616 Image session successfully loaded from the temporary location: X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360\0C032313-F68B-4BD3-B62F-52A81CE58FCD
    - CDISMManager::CreateImageSession
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Getting Provider OSServices - CDISMProviderStore::GetProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Provider has previously been initialized.  Returning the existing instance.
    - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:22, Info                  DISM   DISM OS Provider: PID=1644 TID=1656 Setting SystemPath to X:\ - CDISMOSServiceManager::SetSystemPath
    2013-12-04 19:48:22, Info                  DISM   DISM.EXE: Target image information: OS Version=6.2.9200.16384, Image architecture=amd64
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Getting the collection of providers from an image provider store type. -
    CDISMProviderStore::GetProviderCollection
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Provider has not previously been encountered.  Attempting to initialize
    the provider. - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Loading Provider from location X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360\0C032313-F68B-4BD3-B62F-52A81CE58FCD\CbsProvider.dll
    - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Connecting to the provider located at X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360\0C032313-F68B-4BD3-B62F-52A81CE58FCD\CbsProvider.dll.
    - CDISMProviderStore::Internal_LoadProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Encountered a servicing provider, performing additional servicing initializations.
    - CDISMProviderStore::Internal_LoadProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Package Manager: PID=1644 TID=1656 Finished initializing the CbsConUI Handler. - CCbsConUIHandler::Initialize
    2013-12-04 19:48:22, Info                  DISM   DISM Package Manager: PID=1644 TID=1656 Loaded servicing stack for offline use only. - CDISMPackageManager::RefreshInstanceAndLock
    2013-12-04 19:48:22, Info                  DISM   DISM Package Manager: PID=1644 TID=1656 Loaded servicing stack for offline use only. - CDISMPackageManager::RefreshInstanceAndLock
    2013-12-04 19:48:22, Info                  DISM   DISM Package Manager: PID=1644 TID=1656 Loaded servicing stack for online use only. - CDISMPackageManager::RefreshInstanceAndLock
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Provider has not previously been encountered.  Attempting to initialize
    the provider. - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Loading Provider from location X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360\0C032313-F68B-4BD3-B62F-52A81CE58FCD\MsiProvider.dll
    - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Connecting to the provider located at X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360\0C032313-F68B-4BD3-B62F-52A81CE58FCD\MsiProvider.dll.
    - CDISMProviderStore::Internal_LoadProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Encountered a servicing provider, performing additional servicing initializations.
    - CDISMProviderStore::Internal_LoadProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Provider has not previously been encountered.  Attempting to initialize
    the provider. - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Loading Provider from location X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360\0C032313-F68B-4BD3-B62F-52A81CE58FCD\IntlProvider.dll
    - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Connecting to the provider located at X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360\0C032313-F68B-4BD3-B62F-52A81CE58FCD\IntlProvider.dll.
    - CDISMProviderStore::Internal_LoadProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Encountered a servicing provider, performing additional servicing initializations.
    - CDISMProviderStore::Internal_LoadProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Provider has not previously been encountered.  Attempting to initialize
    the provider. - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Loading Provider from location X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360\0C032313-F68B-4BD3-B62F-52A81CE58FCD\IBSProvider.dll
    - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:22, Warning               DISM   DISM Provider Store: PID=1644 TID=1656 Failed to Load the provider: X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360\0C032313-F68B-4BD3-B62F-52A81CE58FCD\IBSProvider.dll.
    - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e)
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Provider has not previously been encountered.  Attempting to initialize
    the provider. - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Loading Provider from location X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360\0C032313-F68B-4BD3-B62F-52A81CE58FCD\DmiProvider.dll
    - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Connecting to the provider located at X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360\0C032313-F68B-4BD3-B62F-52A81CE58FCD\DmiProvider.dll.
    - CDISMProviderStore::Internal_LoadProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Encountered a servicing provider, performing additional servicing initializations.
    - CDISMProviderStore::Internal_LoadProvider
    2013-12-04 19:48:22, Info                  DISM   DISM OS Provider: PID=1644 TID=1656 Get the registry path to the SOFTWARE hive located at X:\Windows\system32\config\SOFTWARE
    and determine if it is loaded. - CDISMOSServiceManager::DetermineBootDrive
    2013-12-04 19:48:22, Info                  DISM   DISM Driver Manager: PID=1644 TID=1656 Further logs for driver related operations can be found in the target operating
    system at %WINDIR%\inf\setupapi.offline.log - CDriverManager::Initialize
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Provider has not previously been encountered.  Attempting to initialize
    the provider. - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Loading Provider from location X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360\0C032313-F68B-4BD3-B62F-52A81CE58FCD\UnattendProvider.dll
    - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Connecting to the provider located at X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360\0C032313-F68B-4BD3-B62F-52A81CE58FCD\UnattendProvider.dll.
    - CDISMProviderStore::Internal_LoadProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Encountered a servicing provider, performing additional servicing initializations.
    - CDISMProviderStore::Internal_LoadProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Provider has not previously been encountered.  Attempting to initialize
    the provider. - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Loading Provider from location X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360\0C032313-F68B-4BD3-B62F-52A81CE58FCD\Wow64provider.dll
    - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:22, Warning               DISM   DISM Provider Store: PID=1644 TID=1656 Failed to get the IDismObject Interface - CDISMProviderStore::Internal_LoadProvider(hr:0x80004002)
    2013-12-04 19:48:22, Warning               DISM   DISM Provider Store: PID=1644 TID=1656 Failed to Load the provider: X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360\0C032313-F68B-4BD3-B62F-52A81CE58FCD\Wow64provider.dll.
    - CDISMProviderStore::Internal_GetProvider(hr:0x80004002)
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Provider has not previously been encountered.  Attempting to initialize
    the provider. - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Loading Provider from location X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360\0C032313-F68B-4BD3-B62F-52A81CE58FCD\SmiProvider.dll
    - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Connecting to the provider located at X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360\0C032313-F68B-4BD3-B62F-52A81CE58FCD\SmiProvider.dll.
    - CDISMProviderStore::Internal_LoadProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Encountered a servicing provider, performing additional servicing initializations.
    - CDISMProviderStore::Internal_LoadProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Provider has not previously been encountered.  Attempting to initialize
    the provider. - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Loading Provider from location X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360\0C032313-F68B-4BD3-B62F-52A81CE58FCD\EmbeddedProvider.dll
    - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:22, Warning               DISM   DISM Provider Store: PID=1644 TID=1656 Failed to Load the provider: X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360\0C032313-F68B-4BD3-B62F-52A81CE58FCD\EmbeddedProvider.dll.
    - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e)
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Provider has not previously been encountered.  Attempting to initialize
    the provider. - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Loading Provider from location X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360\0C032313-F68B-4BD3-B62F-52A81CE58FCD\AppxProvider.dll
    - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Connecting to the provider located at X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360\0C032313-F68B-4BD3-B62F-52A81CE58FCD\AppxProvider.dll.
    - CDISMProviderStore::Internal_LoadProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Encountered a servicing provider, performing additional servicing initializations.
    - CDISMProviderStore::Internal_LoadProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Provider has not previously been encountered.  Attempting to initialize
    the provider. - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Loading Provider from location X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360\0C032313-F68B-4BD3-B62F-52A81CE58FCD\AssocProvider.dll
    - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Connecting to the provider located at X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360\0C032313-F68B-4BD3-B62F-52A81CE58FCD\AssocProvider.dll.
    - CDISMProviderStore::Internal_LoadProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Encountered a servicing provider, performing additional servicing initializations.
    - CDISMProviderStore::Internal_LoadProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Provider has not previously been encountered.  Attempting to initialize
    the provider. - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Loading Provider from location X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360\0C032313-F68B-4BD3-B62F-52A81CE58FCD\TransmogProvider.dll
    - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Connecting to the provider located at X:\$WINDOWS.~LS\PackageTemp\3a4a5dfb-c322-402c-a12e-4f1ed21dd360\0C032313-F68B-4BD3-B62F-52A81CE58FCD\TransmogProvider.dll.
    - CDISMProviderStore::Internal_LoadProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1656 Encountered a servicing provider, performing additional servicing initializations.
    - CDISMProviderStore::Internal_LoadProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Transmog Provider: PID=1644 TID=1656 Current image session is [OFFLINE] - CTransmogManager::GetMode
    2013-12-04 19:48:22, Info                  DISM   DISM Transmog Provider: PID=1644 TID=1656 Determined WinDir path = [X:\Windows] - CTransmogManager::GetWinDirPath
    2013-12-04 19:48:22, Info                  DISM   DISM Transmog Provider: PID=1644 TID=1656 GetProductType: ProductType = [ServerNT] - CTransmogManager::GetProductType
    2013-12-04 19:48:22, Info                  DISM   DISM Transmog Provider: PID=1644 TID=1656 Product Type: [ServerNT] - CTransmogManager::Initialize
    2013-12-04 19:48:22, Info                  DISM   DISM Transmog Provider: PID=1644 TID=1656 Product Type ServerNT : [Yes] - CTransmogManager::Initialize
    2013-12-04 19:48:22, Info                  DISM   DISM.EXE: Got the collection of providers. Now enumerating them to build the command table.
    2013-12-04 19:48:22, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: DISM Log Provider
    2013-12-04 19:48:22, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: OSServices
    2013-12-04 19:48:22, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: DISM Package Manager
    2013-12-04 19:48:22, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: DISM Package Manager.
    2013-12-04 19:48:22, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: MsiManager
    2013-12-04 19:48:22, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: MsiManager.
    2013-12-04 19:48:22, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: IntlManager
    2013-12-04 19:48:22, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: IntlManager.
    2013-12-04 19:48:22, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: DriverManager
    2013-12-04 19:48:22, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: DriverManager.
    2013-12-04 19:48:22, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: DISM Unattend Manager
    2013-12-04 19:48:22, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: DISM Unattend Manager.
    2013-12-04 19:48:22, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: SmiManager
    2013-12-04 19:48:22, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: AppxManager
    2013-12-04 19:48:22, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: AppxManager.
    2013-12-04 19:48:22, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: AssocManager
    2013-12-04 19:48:22, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: AssocManager.
    2013-12-04 19:48:22, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: Edition Manager
    2013-12-04 19:48:22, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: Edition Manager.
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1672 Getting Provider DISM Package Manager - CDISMProviderStore::GetProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Provider Store: PID=1644 TID=1672 Provider has previously been initialized.  Returning the existing instance.
    - CDISMProviderStore::Internal_GetProvider
    2013-12-04 19:48:22, Info                  DISM   DISM Package Manager: PID=1644 TID=1672 Processing the top level command token(is-serviceable). - CPackageManagerCLIHandler::Private_ValidateCmdLine
    2013-12-04 19:48:22, Info                  DISM   DISM Package Manager: PID=1644 TID=1672 Attempting to route to appropriate command handler. - CPackageManagerCLIHandler::ExecuteCmdLine
    2013-12-04 19:48:22, Info                  DISM   DISM Package Manager: PID=1644 TID=1672 Routing the command... - CPackageManagerCLIHandler::ExecuteCmdLine
    2013-12-04 19:48:23, Info                  DISM   DISM Provider Store: PID=1644 TID=1672 Found the OSServices.  Waiting to finalize it until all other providers
    are unloaded. - CDISMProviderStore::Final_OnDisconnect
    2013-12-04 19:48:23, Info                  DISM   DISM Provider Store: PID=1644 TID=1672 Found the OSServices.  Waiting to finalize it until all other providers
    are unloaded. - CDISMProviderStore::Final_OnDisconnect
    2013-12-04 19:48:23, Info                  DISM   DISM Provider Store: PID=1644 TID=1672 Found the PE Provider.  Waiting to finalize it until all other providers
    are unloaded. - CDISMProviderStore::Final_OnDisconnect
    2013-12-04 19:48:23, Info                  DISM   DISM Provider Store: PID=1644 TID=1672 Finalizing the servicing provider(DISM Package Manager) - CDISMProviderStore::Internal_DisconnectProvider
    2013-12-04 19:48:23, Info                  DISM   DISM Package Manager: PID=1644 TID=1672 Finalizing CBS core. - CDISMPackageManager::Finalize
    2013-12-04 19:48:23, Info                  DISM   DISM Provider Store: PID=1644 TID=1672 Disconnecting Provider: DISM Package Manager - CDISMProviderStore::Internal_DisconnectProvider
    2013-12-04 19:48:23, Info                  DISM   DISM Provider Store: PID=1644 TID=1672 Finalizing the servicing provider(MsiManager) - CDISMProviderStore::Internal_DisconnectProvider
    2013-12-04 19:48:23, Info                  DISM   DISM Provider Store: PID=1644 TID=1672 Disconnecting Provider: MsiManager - CDISMProviderStore::Internal_DisconnectProvider
    2013-12-04 19:48:23, Info                  DISM   DISM Provider Store: PID=1644 TID=1672 Finalizing the servicing provider(IntlManager) - CDISMProviderStore::Internal_DisconnectProvider
    2013-12-04 19:48:23, Info                  DISM   DISM Provider Store: PID=1644 TID=1672 Disconnecting Provider: IntlManager - CDISMProviderStore::Internal_DisconnectProvider
    2013-12-04 19:48:23, Info                  DISM   DISM Provider Store: PID=1644 TID=1672 Finalizing the servicing provider(DriverManager) - CDISMProviderStore::Internal_DisconnectProvider
    2013-12-04 19:48:23, Info                  DISM   DISM Provider Store: PID=1644 TID=1672 Disconnecting Provider: DriverManager - CDISMProviderStore::Internal_DisconnectProvider
    2013-12-04 19:48:23, Info                  DISM   DISM Provider Store: PID=1644 TID=1672 Finalizing the servicing provider(DISM Unattend Manager) - CDISMProviderStore::Internal_DisconnectProvider
    2013-12-04 19:48:23, Info                  DISM   DISM Provider Store: PID=1644 TID=1672 Disconnecting Provider: DISM Unattend Manager - CDISMProviderStore::Internal_DisconnectProvider
    2013-12-04 19:48:23, Info                  DISM   DISM Provider Store: PID=1644 TID=1672 Finalizing the servicing provider(SmiManager) - CDISMProviderStore::Internal_DisconnectProvider
    2013-12-04 19:48:23, Info                  DISM   DISM Provider Store: PID=1644 TID=1672 Disconnecting Provider: SmiManager - CDISMProviderStore::Internal_DisconnectProvider
    2013-12-04 19:48:23, Info                  DISM   DISM Provider Store: PID=1644 TID=1672 Finalizing the servicing provider(AppxManager) - CDISMProviderStore::Internal_DisconnectProvider
    2013-12-04 19:48:23, Info                  DISM   DISM Provider Store: PID=1644 TID=1672 Disconnecting Provider: AppxManager - CDISMProviderStore::Internal_DisconnectProvider
    2013-12-04 19:48:23, Info                  DISM   DISM Provider Store: PID=1644 TID=1672 Finalizing the servicing provider(AssocManager) - CDISMProviderStore::Internal_DisconnectProvider
    2013-12-04 19:48:23, Info                  DISM   DISM Provider Store: PID=1644 TID=1672 Disconnecting Provider: AssocManager - CDISMProviderStore::Internal_DisconnectProvider
    2013-12-04 19:48:23, Info                  DISM   DISM Provider Store: PID=1644 TID=1672 Finalizing the servicing provider(Edition Manager) - CDISMProviderStore::Internal_DisconnectProvider
    2013-12-04 19:48:23, Info                  DISM   DISM Provider Store: PID=1644 TID=1672 Disconnecting Provider: Edition Manager - CDISMProviderStore::Internal_DisconnectProvider
    2013-12-04 19:48:23, Info                  DISM   DISM Provider Store: PID=1644 TID=1672 Releasing the local reference to OSServices. - CDISMProviderStore::Internal_DisconnectProvider
    2013-12-04 19:48:23, Info                  DISM   DISM Provider Store: PID=1644 TID=1672 Disconnecting Provider: OSServices - CDISMProviderStore::Internal_DisconnectProvider
    2013-12-04 19:48:24, Info                  DISM   DISM OS Provider: PID=1644 TID=1672 Successfully unloaded all registry hives. - CDISMOSServiceManager::Final_OnDisconnect
    2013-12-04 19:48:24, Info                  DISM   DISM Provider Store: PID=1644 TID=1672 Releasing the local reference to DISMLogger.  Stop logging. - CDISMProviderStore::Internal_DisconnectProvider
    2013-12-04 19:48:24, Info                  DISM   DISM.EXE: Image session has been closed. Reboot required=no.
    2013-12-04 19:48:24, Info                  DISM   DISM.EXE:
    2013-12-04 19:48:24, Info                  DISM   DISM.EXE: <----- Ending Dism.exe session ----->
    2013-12-04 19:48:24, Info                  DISM   DISM.EXE:
    2013-12-04 19:48:24, Info                  DISM   DISM Provider Store: PID=1612 TID=1616 Found the OSServices.  Waiting to finalize it until all other providers
    are unloaded. - CDISMProviderStore::Final_OnDisconnect
    2013-12-04 19:48:24, Info                  DISM   DISM Provider Store: PID=1612 TID=1616 Disconnecting Provider: FolderManager - CDISMProviderStore::Internal_DisconnectProvider
    2013-12-04 19:48:24, Info                  DISM   DISM Provider Store: PID=1612 TID=1616 Disconnecting Provider: Compatibility Manager - CDISMProviderStore::Internal_DisconnectProvider
    2013-12-04 19:48:24, Info                  DISM   DISM Provider Store: PID=1612 TID=1616 Releasing the local reference to DISMLogger.  Stop logging. - CDISMProviderStore::Internal_DisconnectProvider

  • External Procedure with Windows "Handle" datatype

    hi all,
    I want to create a external procedure which use windows kerne32.dll library and GetFileSize function which is in dll.
    http://msdn.microsoft.com/en-us/library/aa364955(v=vs.85).aspx
    as you can see in this link , GetFileSize has two parameter, first one is a HANDLE type, how can I assign this parameter ? String is not working.
    DWORD WINAPI GetFileSize(
      __in       HANDLE hFile,
      __out_opt  LPDWORD lpFileSizeHigh
    Create Or Replace Function GetSize (FileName Varchar2, P_Value in out pls_integer) Return binary_double As
    Language C Library Mylib Name "GetFileSize"
    parameters (FileName  by reference String, P_Value int, return double );
    Declare
      X1 number ;
      X2 Pls_Integer;
      X Number;
    Begin
      x2 := 40000000;
      X1 := Getsize('C:\b.sql', X2);
      X := X1;
      dbms_output.put_line('x: ' ||x);
    End;
    /I allways getting zero value, file is exists and its size is bigger than zero.
    what am i doing wrong?

    I don't know, Why you are using kernel32.dll to know the file size. This can be done very easily using UTL_FILE.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> CREATE OR REPLACE FUNCTION utl_filesize(pi_dir_name  IN VARCHAR2,
      2                                          pi_file_name IN VARCHAR2)
      3    RETURN NUMBER IS
      4    file_size NUMBER;
      5    blk_size  BINARY_INTEGER;
      6    fexists   BOOLEAN;
      7  BEGIN
      8    UTL_FILE.fgetattr(pi_dir_name,
      9                      pi_file_name,
    10                      fexists,
    11                      file_size,
    12                      blk_size);
    13    RETURN file_size;
    14  END utl_filesize;
    15  /
    Function created.
    SQL> SELECT utl_filesize('SAUBHIK','test2.csv') "Size in Bytes" FROM dual;
    Size in Bytes
               61
    SQL> SELECT utl_filesize('SAUBHIK','Winter.jpg') "Size in Bytes" FROM dual;
    Size in Bytes
           105542
    SQL> Now, coming to your actual question.
    This is a demo, How to call kernel32.dll from PL/SQL.*
    By the way, I have copied kernel32.dll from C:\WINDOWS\system32 to C:\oracle\product\10.2.0\db_3\bin
    My listener.ora setup
    SID_LIST_LISTENEREXTPROC =
      (SID_LIST =
        (SID_DESC =
          (PROGRAM = extproc)
          (ENV = "EXTPROC_DLLS=ONLY:C:\oracle\product\10.2.0\db_3\bin\kernel32.dll")
          (SID_NAME = extproc)
          (ORACLE_HOME = C:\oracle\product\10.2.0\db_3)
      )My tnsnames.ora setup
    EXTPROC_CONNECTION_DATA =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
        (CONNECT_DATA =
          (SID = PLSExtProc)
          (PRESENTATION = RO)
      )A little verification.
    LSNRCTL> stop  LISTENEREXTPROC
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=extproc)))
    The command completed successfully
    LSNRCTL> start LISTENEREXTPROC
    Starting tnslsnr: please wait...
    TNSLSNR for 32-bit Windows: Version 10.2.0.3.0 - Production
    System parameter file is C:\oracle\product\10.2.0\db_3\network\admin\listener.o
    a
    Log messages written to C:\oracle\product\10.2.0\db_3\network\log\listenerextpr
    c.log
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\extprocipc
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=extproc)))
    STATUS of the LISTENER
    Alias                     LISTENEREXTPROC
    Version                   TNSLSNR for 32-bit Windows: Version 10.2.0.3.0 - Prod
    ction
    Start Date                21-JAN-2011 17:32:26
    Uptime                    0 days 0 hr. 0 min. 3 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Listener Parameter File   C:\oracle\product\10.2.0\db_3\network\admin\listener.
    ra
    Listener Log File         C:\oracle\product\10.2.0\db_3\network\log\listenerext
    roc.log
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\extprocipc)))
    Services Summary...
    Service "extproc" has 1 instance(s).
      Instance "extproc", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfully
    LSNRCTL> exit
    C:\Documents and Settings\Administrator>
    C:\>tnsping EXTPROC_CONNECTION_DATA
    TNS Ping Utility for 32-bit Windows: Version 10.2.0.3.0 - Production on 21-JAN-2
    011 21:53:10
    Copyright (c) 1997, 2006, Oracle.  All rights reserved.
    Used parameter files:
    C:\oracle\product\10.2.0\db_3\network\admin\sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)
    (KEY = EXTPROC1))) (CONNECT_DATA = (SID = PLSExtProc) (PRESENTATION = RO)))
    OK (70 msec)
    C:\>Now, the actual codes.
    SQL> CREATE OR REPLACE LIBRARY kernel32 AS 'C:\oracle\product\10.2.0\db_3\bin\kernel32.dll';
      2  /
    Library created.
    SQL> CREATE OR REPLACE FUNCTION CreateFile (FileName VARCHAR2 --1
      2                                         ,p_DesiredAccess BINARY_INTEGER --2
      3                                         ,p_ShareMode BINARY_INTEGER --3
      4                                         ,p_SecurityAttributes BINARY_INTEGER --4
      5                                         ,p_CreationDisposition BINARY_INTEGER --5
      6                                         ,p_FlagsAndAttributes BINARY_INTEGER --6
      7                                         ,p_TemplateFile BINARY_INTEGER )--7
      8  Return BINARY_INTEGER
      9   IS EXTERNAL
    10  LIBRARY kernel32 Name "CreateFileA"
    11  PARAMETERS (FileName STRING 
    12              ,p_DesiredAccess long
    13              ,p_ShareMode long
    14              ,p_SecurityAttributes long
    15              ,p_CreationDisposition long
    16              ,p_FlagsAndAttributes long
    17              ,p_TemplateFile long
    18              ,return long );
    19  /
    Function created.
    SQL> /* This is for closing the handle after use. */
    SQL> CREATE OR REPLACE FUNCTION CloseFile (p_FileHandle BINARY_INTEGER)
      2                                        Return BINARY_INTEGER
      3   IS EXTERNAL
      4   LIBRARY kernel32 Name "CloseHandle"
      5   PARAMETERS (p_FileHandle long, return long);
      6  /
    Function created.
    SQL> /* This is the main function for getting size */
    SQL> CREATE OR REPLACE FUNCTION GetSize (p_FileHandle BINARY_INTEGER,
      2                                      p_FileSizeHigh IN OUT BINARY_INTEGER)
      3                                      RETURN BINARY_INTEGER
      4   IS EXTERNAL
      5  LIBRARY kernel32 NAME "GetFileSize"
      6  PARAMETERS (p_FileHandle long, p_FileSizeHigh long, return long );
      7  /
    Function created.
    SQL> set serverout on
    SQL> DECLARE
      2    v_FileSize BINARY_INTEGER;
      3    v_FileSizeHigh PLS_INTEGER;
      4    v_FileHandle BINARY_INTEGER;
      5    v_filename VARCHAR2(500) :='C:\test2.csv';
      6    v_dummy BINARY_INTEGER;
      7  BEGIN
      8    v_FileSizeHigh := 400000000;
      9    v_FileHandle:=CreateFile(v_filename -- File name
    10                             ,0 -- Type of access required (read/write ect)
    11                             ,0 -- disable share mode
    12                             ,0 --no securoty attribute
    13                             ,3 -- Means Open existing
    14                             ,128 --080h, File attribute normal.
    15                             ,0); --7
    16    v_FileSize := Getsize(v_FileHandle, v_FileSizeHigh);
    17    DBMS_OUTPUT.put_line('File Size in Bytes: ' ||v_FileSize);
    18    v_dummy:=CloseFile(v_FileHandle);
    19  END;
    20  /
    File Size in Bytes: 61
    PL/SQL procedure successfully completed.
    SQL>
    SQL>
    SQL> DECLARE
      2    v_FileSize BINARY_INTEGER;
      3    v_FileSizeHigh PLS_INTEGER;
      4    v_FileHandle BINARY_INTEGER;
      5    v_filename VARCHAR2(500) :='C:\Winter.jpg';
      6    v_dummy BINARY_INTEGER;
      7  BEGIN
      8    v_FileSizeHigh := 400000000;
      9    v_FileHandle:=CreateFile(v_filename -- File name
    10                             ,0 -- Type of access required (read/write ect)
    11                             ,0 -- disable share mode
    12                             ,0 --no securoty attribute
    13                             ,3 -- Means Open existing
    14                             ,128 --080h, File attribute normal.
    15                             ,0); --7
    16    v_FileSize := Getsize(v_FileHandle, v_FileSizeHigh);
    17    DBMS_OUTPUT.put_line('File Size in Bytes: ' ||v_FileSize);
    18    v_dummy:=CloseFile(v_FileHandle);
    19  END;
    20  /
    File Size in Bytes: 105542
    PL/SQL procedure successfully completed.
    SQL> Verification.
    C:\>dir test2.csv
    Volume in drive C has no label.
    Volume Serial Number is 6806-ABBD
    Directory of C:\
    12/15/2010  01:35 PM                61 test2.csv
                   1 File(s)             61 bytes
                   0 Dir(s)   3,405,336,576 bytes free
    C:\>dir Winter.jpg
    Volume in drive C has no label.
    Volume Serial Number is 6806-ABBD
    Directory of C:\
    10/11/2010  05:27 PM           105,542 Winter.jpg
                   1 File(s)        105,542 bytes
                   0 Dir(s)   3,405,336,576 bytes free
    C:\>

  • 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

Maybe you are looking for

  • How to Enhance the Context menu in a Web Report

    Gurus, Scenario is to Enhance the Context menu in a Web template with some Custom Values. I found some notes in SAP.HELP but could not get thru it. If anyone has added some Custom developed menu's in the Context menu, can you let me know as well. Urg

  • SapScript  'MAIN' Window without 'Text Element'

    Why is it, if we run 'MAIN' Window without defining 'Text Element'(/E), it displays the contents twice.. The same doesn't happens with other 'Variable' windows..

  • How to intercept a dataTips 'show' event (list control)?

    Hi people, I'm using  a list control with showDataTips property set to true, so as dataTips are automatically displayed when the text is too long for the row. The point is that I need to preserve this condition (i.e. I don't want dataTips to be displ

  • Touch problem in iphone

    Touch probelm in Iphone 4.

  • Why does my 4s volume keeps going up by itself?

    Hi. Thanks for your advice in advance!  For the past 4 weeks, the volume of my 4s keeps going up on its own and then the volume screen doesn't disappear.  It's really hard to manage texting/talking with this annoying issue.  Has anyone had this same