Calling a c++ dll that contains a dialog.

Hi,
I have a c++ dll that contains a dialog. When I try to display the dialog (ShowDialog(SW_SHOW);) the dialog is popped up but the dialog window is frozen and do not display its controls. The Java application is call an intermediate dll create by JNI that is calling the c++ dll.
Any Suggestions?
Thanks in advance,
Udi Raz

It should be discernable (by looking at the C# code) whether the C DLL needs to be registered.
If the DLL is serving COM objects it may need to be registered at a command-prompt with
regsvr32 <your_DLL_File_path>
If it's supplying .NET assemblies, I think it needs to be registered with
regasm <your_DLL_File_path>
Although I've written a few C DLLs, none were called from a C# DLL and I can't advise what subtle things to watch-out for in this scenario.
Do you have a way to validate/exercise the C DLL's functionality? Is it possible to through-together a C# application (not a C# DLL) that successfully uses the C DLL?
Luck/Cheers!
Message Edited by tbd on 12-03-2008 02:36 AM
"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)

Similar Messages

  • Turned on the iCloud - now my 'Contacts' list in Outlook is 13 names; these same 13 names and numbers are what are now in my phone.  There is a new folder in Outlook calls 'Contacts in iCloud' that contains all of the information from my phone. Help???

    How can I get what is in the Outlook 'Contacts in iCloud' back to my phone?

    check in settings > mail contacts calendars, and in the contacts area you should be able to change how the names are viewed
    dante

  • Calling structure in dll

    I am trying to call a dll that contains a nested structure. I am not a c-programmer so therefore I
    would lik to use the call library function but I do not know how to handle the union structure shown below??
    Function Name:
    cnc_rdparam
    Declaration:
    FWLIBAPI short WINAPI cnc_rdparam(unsigned short FlibHndl,short number,short axis,short length,IODBPSD *param);
    typedef struct iodbpsd {
    short datano ; /* data number */
    short type ; /* axis number */
    union {
    char cdata ;/* parameter / setting data */
    short idata ;
    long ldata ;
    char cdatas[MAX_AXIS] ;
    short idatas[MAX_AXIS] ;
    long ldatas[MAX_AXIS] ;
    } u ;

    I'm not sure, but I think that you have to wire the "param" output of "Call library function" to the cluster which consists of
    1. datano - I16
    2. type - I16
    3. the variable with type depending on the type of union - I8 for cdata, 116 for idata, I32 - for ldata, array of I8 for cdatas, array of I16 for idatas, array of I32 for ldatas.
    In other words you must know the type of cluster before calling of this function. May be this type depends on values of other parameters.
    I think that you have to organize the case structure in your diagram which calls this function and returns the appropriate cluster depending on other parameters.
    Oleg Chutko.

  • Calling test sequence from CVI DLL that use ATL COM object does not work

    I am trying to call some DLL function writen in CVI from teststand. The CVI DLL is using ATL COM object(Written by me).
    The ATL COM object making instance of several ATL COM object inside it (including two controls that contains dialog). If I use a client writen in VC++ 6 and use the ATL COM (writen by me) works perfectly. But if I try to use it from CVI DLL it does not work any more.
    What is wrong? The client is passing an IUnknow interface to my component. Can anybody explain me what is wrong?

    It is not clear from your question as to what is specifically failing. If possible, one option would be to remove TestStand from the picture and see if the problem still occurs using a CVI EXE that invokes the CVI DLL.
    Scott Richardson - NI
    Scott Richardson
    National Instruments

  • UCCX8 Is There a Sesion Variable that contains the Call Control Group ID

    Hello,
         Is there a session variable that contains the Call Control Group ID of the trigger that called the script?
    -Lauren

    Hi Lauren,
    sorry, after two hours of analysing call hierarchies and running debugs, I gave up. I can't see any way of getting that value programmatically, in other words, I don't see any public field or method that would yield the desired value.
    However, if you want to use this only for debugging purposes, then getting the contact using the Get Trigger Info step, assigning it to a variable named contact (of type Contact) then calling the following method on it:
    contact.getTask().getTrigger() (which automatically calls the toString() method) would return a String similar to this - and it contains the ID of the Call Control Group apparently:
    "ContactApplicationTrigger[time=1356102368509,locale=en_US,cfg=JTAPITriggerConfig[schema=ApplicationTriggerConfig,time=2011-09-14 18:28:25.0,recordId=414,desc=Cisco JTAPI Trigger,name=82152,type=Cisco JTAPI Trigger,appName=TRAPPA,enabled=true,sessions=5000,idleTimeout=5000,locale=en_US,parms={},taskGroups=[],controlClass=class com.cisco.call.CallControlChannel,controlGroupId=1,contactGroups=[GroupInfo[class=com.cisco.dialog.DialogChannel,id=0]],dn=82152,redirectCSS=redirecting.party,cmDeviceName=TRAPPA_82152,cmDeviceInvalid=false,cmDescription=TransRouting IVRA,cmDevicePoolUUID={978D6B59-356E-FC92-81A9-3AAE9F843120},cmDevicePoolName=DP_Main_C,cmCallingSearchSpaceUUID={87083019-FEBF-9B48-742B-7658396D1D5C},cmCallingSearchSpaceName=CSS_mobily_normal_HelpDesk_IS,cmLocationUUID={29C5C1C4-8871-4D1E-8394-0B9181E8C54D},cmLocationName=Hub_None,cmPartitionUUID={10003B1B-F235-16A7-927D-01EB3DCCB57C},cmPartitionName=P_operatori,cmVoiceMailProfileUUID=,cmVoiceMailProfileName=None,cmCallPickUpGroupUUID=,cmCallPickUpGroupName=,cmDisplay=,cmExternalPhNumMask=,cmFwdBusyVM=false,cmFwdBusyDest=,cmFwdBusyCSSUUID=,cmFwdBusyCSSName=None,cmAlertingNameAscii=,cmPresenceGroupUUID=ad243d17-98b4-4118-8feb-5ff2e1b781ac,cmPresenceGroupName=Standard Presence group],contact=JTAPICallContact[id=16548,implId=3206772/2,state=STATE_ANSWERED_IDX,inbound=true,App name=TRAPPA,task=38000443987,session=17000062888,seq num=0,cn=82152,dn=82152,cgn=0725099603,ani=0725099603,dnis=null,clid=null,atype=REDIRECT,lrd=78866,ocn=78866,route=RP[num=82152],OrigProtocolCallRef=000000000030EE740228F81300000000,DestProtocolCallRef=null,TP=81122]]"
    Looks like the cfg field cannot be accessed, but the automatic toString() method is kind enough to dump all this information.
    Hope this helps.
    G.

  • Calling stored function that contains commit from .JCX

    I would like to call a stored function (Oracle) that contains a commit, from
    a WebLogic database control (.JCX). The suggested way to call a stored
    function is to do something like:
    * @jc:sql statement::
    * SELECT MY_FUNCTION({projectID}, {staffID}) FROM DUAL
    int callMyFunction(int projectID, int staffID) throws SQLException;
    This doesn't work if the function contains a commit - I get: ORA-14552:
    cannot perform a DDL, commit or rollback inside a query or DML. I don't
    want to just get my own connection to the db in my code and call it directly
    because then I won't be using the connection pool provided by WebLogic. Is
    there a recommended way to do this? So far, the database control has taken
    care of getting connections from the pool. Can I get a connection from the
    pool explicitely and use it? How do I "return" it to the pool?
    Thanks.
    Steve

    Steve Kincer wrote:
    Thanks for the response.
    So far, I've only used the database control, so I haven't been doing any
    transaction management (rollbacks/commits) myself - I've just called methods
    in my database control and not worried it. Come to think of it, all my
    other calls are just SELECTs, so it hasn't been an issue, but I've assumed
    WebLogic or the connection pool would take care of transaction management
    for me if I coded an UPDATE function in the database control.
    What do you mean by "find and use the control API provided for
    defining/demarking
    transactions" ... what control?
    I've seen stuff in the help file about transaction management, so I can
    research that, but where do I get the connection to use for this? I'm
    thinking I should get it from the pool (rather than create my own
    connection). I saw a generated method in my database control called
    getConnection, but when I tried using it with a CallableStatement I got
    error:
    "The transaction is no longer active - status: 'Committed'. No further JDBC
    access is allowed within this transaction."This means that you are automatically being taken care of transactionally,
    and don't need to do any commit() calls.
    Joe
    >
    I guess it's pretty obvious that I'm pretty new to WebLogic.
    Thanks for your help.
    Steve
    "Joe Weinstein" <[email protected]> wrote in message
    news:[email protected]...
    Steve Kincer wrote:
    I would like to call a stored function (Oracle) that contains a commit,
    from a WebLogic database control (.JCX). The suggested way to call a
    stored function is to do something like:
    * @jc:sql statement::
    * SELECT MY_FUNCTION({projectID}, {staffID}) FROM DUAL
    int callMyFunction(int projectID, int staffID) throws SQLException;
    This doesn't work if the function contains a commit - I get: ORA-14552:
    cannot perform a DDL, commit or rollback inside a query or DML.Right. It is bad style to hide a commit in a procedure. The begin-tx
    and commit should be at the same level, above any specific SQL for the
    tx. How did you start a transaction? Are you sure you have an ongoing
    transaction?
    I don't
    want to just get my own connection to the db in my code and call it
    directly because then I won't be using the connection pool provided by
    WebLogic. Is there a recommended way to do this? So far, the database
    control has taken care of getting connections from the pool. Can I get a
    connection from the pool explicitely and use it? How do I "return" it to
    the pool?You should find and use the control API provided for defining/demarking
    transactions.
    Joe
    Thanks.
    Steve

  • Calling a dll that has an unsigned char, unsigned char * in a function call

    I have a dll that has the following function that I am trying to call from LabView
     GetAvailableData( unsigned short * Num1,   unsigned short * pList,   unsigned short in,   unsigned short * ip  )  
    In this, the second parameter is an output. When I use call library function node, I  use the second arg to create an indicator. When I run this program, I see the return value to be zero.
     I use the following for arg2:
    Name: arg2
    Type: Numeric
    Data type: 16bit Integer
    Pass: Pointer to value
    Any help is appreciated. 

    dinks-
               Just some janitorial work first: when posting try and keep the spaces between lines to a minimal. Empty spaces just means less memory somewhere. To your question, I think some clarification is needed. Tell me if this is right, you have a dll that you are calling into LabVIEW using Call Library Function node and then trying to get this unassigned character.
     Yes. That is correct. 
    It returns 0 but it should be giving something else (what should it be returning?). Are you getting any errors running this or you are just not getting the expected value back? Thanks for the clairfication!!
    Thanks for the response. I think there are lot of nitty gritty details when calling a c++ dll from LabView that I need to learn. The unsigned char problem is solved when I modified the output to Array in Labview.
    I have issues using C++ functions that return a bool value. 
    The other problem is with C++ functions that return a HANDLE.
    In the first case where the return value is bool, I assigned the return value in LabView to  Signed 32 bit integer when I call this function,  the return bool value is some large number always irrespective of the C++ bool value (true or false).
    For the second case (return type HANDLE), I assume, I should specify the return value as signed 32 bit integer in the configure option of call library function node. I tried that and it returns the same value. The dll returns non zero if my hardware that I am interfacing with is found. If it doesn't find the hardware, the return HANDLE is 0. The Labview program returns the same value if I enable the hardware or disable the hardware.
    I am following the  Call DLL.vi example for using various data types in C++. 
    Really appreciate your help.

  • When I start firefox browser an erroe message appear that contain this text "the procedure entry point_except_handler4_common could not be located in the dynamic link library msvcrt.dll" I am using windows XP

    when I start firefox browser an erroe message appear that contain this text "the procedure entry point_except_handler4_common could not be located in the dynamic link library msvcrt.dll" I am using windows XP in English
    == This happened ==
    Every time Firefox opened
    == start mozila firefox

    This issue can be caused by a problem with the file c:\windows\system32\dwmapi.dll
    The file dwmapi.dll is a Vista file and should not be present in Windows XP.
    See also [tiki-view_forum_thread.php?forumId=1&comments_parentId=417674]

  • Why can't i get the drivers for my jorway 73A to recognize the dll that they call for?

    I am using the drivers taken off your site for the jorway 73A scsi camac controller on labview 4.1. The drivers call for cmjwdll.dll, which is in the directory the vi is in, but it does not seem to recognize it. everytime i select the dll and hit open it pops up the same window asking me to find the file again. I went down into the sub vi and the error is that it doesnt see the file. do you have any idea why this would be? please let me know. thanks.
    josh R

    (I'm starting a new thread since I was tired of scrolling through all the "Comments")
    Josh,
    I really don't know what to suggest at this point...those DLLs (cvirt.dll, cvirte.dll) are DLLs that are installed with the CVI run-time engine...I have no idea why your instrument driver needs them...are you *sure* you are using the driver from the URL I gave in my initial post? Please double-check that...
    If that's not the cause of the problem, perhaps you should download and install the CVI Run-time Engine from our website...although I wouldn't know which version for you to install, since you are using an old version of LabVIEW (4.1), so I'm not sure which version of the CVI run-time engine would be needed. Perhaps you can experiment and try different ones.
    Please update
    me on your progress, and thanks again for your patience.
    Darren N.
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

  • Use a wrapper to build a C++ Dll that calls a C++ .lib and Use the Dll is LabView

    Hi All,
    I need to access some functions in a C++ .lib within LabView, but has no source code for the library.  Can I build a Dll in Visual C++ that calls this library, then have LabView calls the Dll? If so, how different is building this Dll compared to building a Dll from a .cpp file?  I am new to C++, could some one suggest how to use the .lib in Visual C++ 6.0 studio to build the Dll?
    Thanks for your help.
    Bryan

    BryanL wrote:
    Hi Rolf, thanks for the info. I will try to build a vi to call that function. For a more immediate need, I can use a downloaded vi that calls SetActiveWindow function, then use its output windowshandle to find the window name with a lvwuser32.dll function. The problem is this find window name function vi requires a windows reference input, which does not take the window handle output from the SetActiveWindow vi. How do i convert the window handle into a reference number? Thanks again.
    Don't try to write a VI to call that function. That function requires a callback function pointer, something that is more or less impossible (well you can get it done but it is not worth the trouble) to create in LabVIEW. You will need an external DLL that does the enumeration and returns an array of strings to LabVIEW.
    The lvwuser32.dll also just uses window handles. Look inside those VIs and you should see that those window references are typecasted into uint32 and then passed to the Call Library Node if I remember correctly. You definitely should be able to typecast the (probably uint32) you get from your other function into the window reference that that VI takes. The window reference of the lvutil library is just a nice trick to make it refnum like so that you can not inadvertly wire something else to it (and confuse/crash Windows).
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Calling a C# DLL in Labview that makes a call to another DLL

    I have a set of DLLs created with C# that I am calling in Labview.  They all work fine using the .NET functions except for one DLL that makes a call to another DLL created in C. It returns an error.  Any ideas why this wouldn't work?  All DLLs are located in the same Windows directory.

    It should be discernable (by looking at the C# code) whether the C DLL needs to be registered.
    If the DLL is serving COM objects it may need to be registered at a command-prompt with
    regsvr32 <your_DLL_File_path>
    If it's supplying .NET assemblies, I think it needs to be registered with
    regasm <your_DLL_File_path>
    Although I've written a few C DLLs, none were called from a C# DLL and I can't advise what subtle things to watch-out for in this scenario.
    Do you have a way to validate/exercise the C DLL's functionality? Is it possible to through-together a C# application (not a C# DLL) that successfully uses the C DLL?
    Luck/Cheers!
    Message Edited by tbd on 12-03-2008 02:36 AM
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)

  • ORA-04062 occurs when executing a form that contains a call to a DB package

    We have an application that is written in Forms 6i. We just recently deployed
    this to a test server. When trying to run forms that have calls to database
    packages that have a PL/SQL table as a parameter, we are getting an ORA-04062
    error. This does not occur on our development server. I did some research on
    Metalink and found lots of information about this error. One of which was NOTE
    73506.1. I thought this was our problem. I added the initialization parameter
    REMOTE_DEPENDENCIES_MODE = SIGNATURE to the init.ora file for the test server.
    This did not seem to help. I am at a loss as to what to do next. We actually
    have 3 servers that we are working with right now. Here is a summary of some
    tests that we did.
    Compiled Form against Database on Server 1. The form worked on Server 1 and
    Server 2. It did not work on Server 3.
    Compiled Form against Database on Server 2. The form worked on Server 1 and
    Server 2. It did not work on Server 3.
    Compiled Form against Database on Server 3. The form worked on Server 3. It did
    not work on Server 1 or Server 2.
    We had changed the init.ora file on Servers 2 & 3 to have the
    remote_dependencies_mode = signature. So I expected the form to work on those
    two servers (2 & 3) and not on server 1.
    We never had this problem when we were Forms 4.5, but we didn't have the PL/SQL
    table functionality then either.
    It appears to work on any schema on the Server that the form was compiled
    against regardless of the timestamp for the package on that schema.
    Has anyone else had this problem? Any help would be greatly appreciated. Thanks.

    After many long and frustrating days, I have finally figured out what the problem is.
    In the package that was failing, it was creating a pl/sql table that had 3 columns. Two of those columns were using a %TYPE as the declaration. The problem one was compounds.name%TYPE.
    It turned out that the server that was having the problem had this column's definition being VARCHAR2(50) on all of its schemas. The form was being compiled against a database that had this column set to VARCHAR2(30). The 30 length is the correct definition. We aren't sure how all the schema's on that server got messed up, but that is the problem. Once we dropped the table and recreated it with the correct definitons, the form that called the package worked as it should.
    I am a little confused as to why the %TYPE didn't work at runtime. I thougth that the purpose of using a %TYPE was so that if the column defintion changed after the code was compiled, that it would use whatever the definiton is at runtime. Is this not true?
    null

  • Call Library Function (DLL) Node Configuration

    This issue was discussed few times on this forum (see for example http://forums.ni.com/ni/board/message?board.id=170&message.id=182911 ),  but I still have a problem.
    My question is -  how to define the call to DLL without to specify its full path in order to be able to change the directory path without to change all calls to DLL functions within VI.
    So, I did:
    1. I put my DLL and my VI in the same directory.
    2. I defined this directory in VI search path. This directory also defined as enviroment variable.
    3. I use only one call to DLL in this specific VI (just as example in order to simplify the problem).
    4. I define only DLL name without the path in CLF Node.
    But, every time when I close CLF Node configution window, the program search for the DLL, find it and put full DLL path inside.
    I will be very thankful if anyone can help me to overcome this problem.
    Best regards,
    Boris

    Hello Boris,
    To sum up the previous posts, when you specify the DLL when configuring the Call Library Function
    node, internally LabVIEW stores in the VI either 1) the name of the
    DLL, or 2) a relative path from the VI to the DLL (including the name
    of the DLL). What's displayed in the dialog (in 'Library Name or Path'
    field) is either 1) the name of the DLL, or 2) an absolute path that is
    formed by appending the DLL's relative path to the VI's absolute path.
    In
    case 1, LabVIEW uses the Windows system search paths to load the DLL.
    That is, it looks for the DLL in \windows\system32 folder, then if not
    found there, it uses the folders specified in the PATH environment
    variable, etc.
    In case 2, LabVIEW tries to load the DLL from the
    computed absolute path (VIs current path combined with the relative
    path to the DLL that LabVIEW stored internally). And if not found
    there, LabVIEW uses the VI Search Path (that can be set from Tools »
    Options in the category of Paths).
    So even though LabVIEW automatically puts an absolute path to the DLL
    in the Call Library Function Node, as long as you will specify the
    correct folder for the DLL in the VI Search Path, you should be Ok. However, if you want to
    have a fixed location for the DLL, then it is best to keep it in the
    \windows\system32 folder, and specify just the name of the DLL when
    configuring the Load Library Function node (this way LabVIEW will not
    automatically turn it into an absolute path).
    Also, these knowledge base articles might be helpful:
    Why Does My VI Prompt for My DLL Every Time I Open It?
    LabVIEW Searching for a DLL Used in the Call Library Function Node
    My Stand-Alone Executable Cannot Find My DLL, Even Though I Have Specified the Path for the DLL
    Hope this helps and good luck with your application!
    Shakhina P.
    NIC

  • Word 2007: Error when saving file that contains equations

    Using Microsoft Word 2007, version 12.0.6425.1000 with Service Pack 2
    I am a High School Math teacher, and when working on a document that contains a number of math equations. When I try to save the document, Word refuses to save. It displays the following error: "A file error has occurred. <filename>. OK",
    and I am unable to save the file. 
    Reading the forum, I have found this to be a very common issue going back to 2009, but I have not seen a definitive solution or patch. 
    I have found a workaround:
    Creat a new document
    Copy and paste from the corrupted doc each page, saving the new document after each page
    Until I hit the error, then I know the page that has the issue, and can usually narrow it down to a specific math equation. Nothing fancy just some basic math. 
    Manually rewrite the equation in the new document and it will successfully save.
    But the issue has been occurring more and more frequently now and it is becoming very frustrating. Any help would be greatly appreciated! 

    There has been a long time known issue with the equation editor.  it causes document corruption by "losing" XML tags.
    Apparently fixes for some causes of these problems have been rolled out in Windows updates. But the problem still exists.  You've got it easy. A lot of people running into this problem are students working on documents, like a thesis, that is on a short
    deadline ...
    One identified cause of these problems is editing equations
    after you created them.  DON'T DO THAT! 
    If you have to change an existing equation, create a new correct one and delete the old one.
    Simpler fix. Don't use Word (or Office) for creating equations.  Find some other product, like a pencil.
    Over in the "Answers" forum there are a couple volunteers, Tony Jollans and Jeeped
    , who have been manually fixing this type of error if you post a new question or add a reply to one of the ongoing discussions on this issue.
    Sorry.
    If you want to invest the time to figure out what your error looks like you may be able to come up with a fix other than copy /paste method.
    Can't open Word File because of end tag/start tag mismatch error... XML Tag 
    - XML Error – Fix It tool - “The name in the end tag of the element must match the element type in the start tag”
    This error is caused when Word either “forgets” to write an XML tag, or writes them in the wrong order.
    Tony Jolans was the first person that I heard of with home made tool to fix the problem. Now MS has released a Fix It for one specific variation of the problem.
    If the tools don’t fix your problem, the file will have to be fixed manually, repairing the tag order.
    The Fix It article notes that the document is still in a fragile state. You have to do some addition fixing to avoid repeats of the problem.
    https://blogs.technet.com/b/wordonenotesupport/archive/2011/03/24/error-when-opening-a-word-2007-or-2010-document.aspx
    http://support.microsoft.com/kb/2528942- FIX IT
    This fix it will work for one specific tag error where there are equations and graphics in the same paragraph AND Office 2010 SP1 has not been applied.
    Preventative suggestions
    <snip Jeeped>
    I don't think that anyone can completely stop editing equations, but pre-planning them should avoid unnecessary edits.
    While I have no concrete, reproducible evidence that editing equations is a cause, I have made these empirical observations:
    I cannot state precisely what many of the DOCX XML tags do, but basic XML syntax rules would suggest that code like:                   <m:oMath><m:e><m:ctrlPr/></m:e></m:oMath>
    ... does nothing at all since it closes everything it opens and offers no content. It looks to me that this is a result of deleting one or more characters from an equation.
    While Word 2010 reports these as a problem at:                  Line: 2  Column: 0 ... Word 2007 will still report the actual position, e.g.:                
     Line: 2  Column: 2726981 I keep a copy of Word 2007 side-by-side Word 2010 for no other purpose. It's the only Office 2007 program on my computer. This seems like it is actually a step backwards from a resolution since Word 2010 no longer seems
    to be able to parse its own error.
    Whether the syntax is truly useless and non-effective for any intent or purpose is actually beside the point. The syntax passes conformity tests and the DOCX
    should launch. Why an 85 page document is 'broken' due to a few empty XML formatting tags while retaining legal syntax structure is beyond me.
    I try to pass along the area that the problem was in and several times people have remarked that the area I report was the place they were last making modifications/deletions to equations (not additions) when the no-load corruption
    occurred.
    When no indication from the OP is offered on what was worked on last, the Line: 2 Column: 0 corruption often comes within a formula at the very end of the unfinished Word/Document.xml file and it may be inferred
    that this was the last place being worked upon.
    The corrupt DOCX files I've worked on are very commonly at the last stages of development with a large complex document. While there couldn't be a worse time for a corruption to appear, it would seem that small edits to existing content are causing
    it and not large scale new content generation.
    Not one of these points is a definitive 'smoking gun', but put together they seem to indicate
    formula editing and not formula writing as a cause for the Line: 2 Column: 0 corruption. If it looks like a duck and quacks like a duck, it is most often a duck.
    </snip>
    Copy “True Autosave Macros for Office” to this place in reply
    Let me fix it myself
    If you are familiar with editing XML, you can try to fix the problem yourself by correcting the sequence of the mismatched oMath tags in the document. See the following example:
    Incorrect tags:
    <mc:AlternateContent>
    <mc:Choice Requires=”wps”>
    <m:oMath>
    </mc:AlternateContent>
    </m:oMath>
    Correct tags:
    <m:oMath>
    <mc:AlternateContent>
    <mc:Choice Requires=”wps”>
    </mc:AlternateContent>
    </m:oMath>
    Note: You will have to use an application such as Notepad to edit the XML.
    Manual Technique
    <snip>  A DOCX document is actually a .ZIP file that contains many internal components. There is an internal folder called word which will always contain a document.xml file. This file is the basis of the document's layout
    and content.
    Assuming that the DOCX archive structure has not been corrupted, it can be opened in an archive utility. I use
    WinRAR for this. Once opened in
    WinRAR, you can drill down into the
    word folder and see the document.xml file. I use
    Notepad++ as a text editing tool and have the .xml file extension associated with this program so i can simply double-click
    document.xml in WinRAR to open an editing session.
    Notepad++ has cursor positioning in the right-hand side of the status bar and finding the position of the error (supplied by a failed open in Word) is pretty straightforward. I look for empty formatting
    tags first and only remove content if removing empty tags does not allow the document to be opened. I try to note existing content in the area that I make modifications in order that I can supply position reference information to the owner of the DOCX.
    When editing, I assume the philosophy that kess is more. My target is to get the document to open in Word with as little modification as possible and let the original owner of the DOCX make any necessary adjustments.
    I should mention that after making a change to word/document.xml you need to save it in
    Notepad++ then go to
    WinRAR and acknowledge that you want to update the file in the DOCX archive. Once the archive is updated, you can attempt to open the DOCX in Word to see if your efforts are successful.
    WinRAR                    
    Notepad++                 
    </snip>
    Further Fixes
    The Fix it solution in this article should let you recover your Word document. However, the symptoms will reappear when you make any further edits to the document unless the core problem in the structure of the document is resolved.
    To try to correct the core problem, follow one of these workarounds:
    Install Office 2010 Service Pack 1
    Office 2010 Service Pack 1 resolves this issue for new files. It will also prevent the problem from recurring with any files that were recovered with the Fix it solution in this article.
    To download Office 2010 Service Pack 1, follow the steps provided in this Microsoft knowledge base article:
    2460049 - Description of Office 2010 SP1
    Grouping Objects
    The steps provided work best under Word 2010:
    After you open the recovered document, turn on the Selection pane. This can be found in the
    Home tab of the ribbon. The editing group of the
    Home tab has a dropdown button named Select.
    Click the Select button, and then click
    Selection Pane...
    Press the Ctrl button on your keyboard and then click each text box in the selection pane.
    Click the Group button under the Format tab. This will group all the objects together.
    As soon as you have all objects grouped on each page, save the document under a new name.
    Save the document in the .RTF file format
    The steps provided work for both Word 2007 and Word 2010:
    After you open the recovered document, click File and select
    Save (for Word 2007 click the Office button and select
    Save As)
    In the Save As dialog box, click "Save as type:" dropdown and select
    Rich Text format (*.rtf).
    Click Save.
    Click to view this
    blog for more information about this issue.
    Bonus tip: Win7 Win8 Math Equation Input Panel / Math input Panel
    http://www.lytebyte.com/2009/07/24/guide-to-math-input-panel-in-windows-7/
    http://www.7tutorials.com/windows-7s-tablet-input-panel-text-entry-and-handwriting-recognition
    http://www.7tutorials.com/training-tablet-input-panel-work-even-better
    http://www.7tutorials.com/do-math-easy-way-math-input-panel
    Not an answer to the problem, just a bonus that may make it easier to input formula’s in Win7.
    Here’s another one of those didn’t-know-it-existed-until-I-clicked-it-by-accident tools in Win7. It’s called the
    Math Input Panel.
    To access it, simply click Start, and in the Search Box that appears above, type in
    Math Input Panel.
    The Window should look like this:
    Let the fine folks at Microsoft explain what it’s used for:
    “Math Input Panel uses the math recognizer that’s built into Win7 to recognize handwritten math expressions. You can then insert the recognized math into a word-processing or computational program. “
    Tony Jolan’s Automatic Fix
    Download  http://www.wordarticles.com/temp/Rebuilder.dotm Microsoft Office Word Macro-Enabled Template (.dotm) and open it.
    Click Options button on the Security warning and select Enable this content.       
    Click the Broken Documents tab at the far right of the ribbon.      
    Click the Rebuild button in the left-hand side      
    Locate and open your corrupt document in the file open dialog.
    That's it. The process will repair your document if possible and create a new document with (Rebuilt)
    appended to the filename. Be patient as it may take a few minutes. If a repair is not possible, you can then post to a public file area and someone here can attempt a manual repair.
    Manual Fix
    XML Maker V1.1 is free. It will allow you to open the document.xml file and edit it. It also marks errors and warnings. 
    I just didn’t have much luck working with it.
    A poster used XML Maker V2.1 (US$125, 30day free trial, enough for average person to fix a file)
    Notepad ++ is a good, free editor for this type of task
    Make a copy of the file
    Rename the copy from DOCX to ZIP
    Open … .ZIP/word/document.xml in notepad
    Copy the contents of the file to clipboard
    Open Word
    Paste a copy of the copied XML into Word
    (optional) the XML is one long string too hard to read, you can replace some tags, with that tag plus a para mark to break up the text to make it more people readable.
    Open an XML validator, ie this site on the internet:
    http://www.w3schools.com/xml/xml_validator.asp
    Paste another copy of the XML into the “Syntax Check Your XML” input window
    Click on “validate” button
    Copy the missing tag, ie </mc:Fallback>  (yours will be different)
    Return to word Find: mc:Fallback>  (without the </ so you find both open and closing tags). 
    Repeat find until you hit 2 open tags in a row.  Then you just have to figure out where to put the closing tag between them. 
    Look for other tags before and after a proper closing tag so you can match the problem area to a good area.
    Discussion by many affected people, a couple in discussions are also fixing problem if Tony’s fix doesn’t work
    http://social.answers.microsoft.com/Forums/en-US/wordcreate/thread/581159d0-9ebc-4522-b30c-53e33e8268e1
    Document Recovery
    http://www.wordarticles.com/Shorts/Corruption/Formats.php
    This page has the most readable description of Word file structures, DOC and DOCX, I have seen so far
    The logical structure of a Word 97‑2003 format document is one of a series of elements arranged in a hierarchy, much like a mini file system. As an example, here is the structure of a simple Word 97‑2003 (.doc) format document:
    MyDocument.doc
    1Table
    *CompObj
    Word Document
    *SummaryInformation
    *DocumentSummaryInformation
    The physical structure of the complete file bears little relation to the logical structure; it is, again, of a proprietary design, a compound, or structured storage, file. Briefly, and loosely, the separate logical elements of the file are broken up into
    blocks; these blocks are treated as individual units, which units are then organised without regard for their logical arrangement, and catalogued, catalogue and organisation detail being held alongside the blocks themselves, to enable recombination into logical
    components when necessary.
    Just to give you a flavour, here are some views of three small parts of such a document, viewed in a hex editor:
    Views of a Word 97-2003 format Document
    The logical structure of a Word 2007 format document is one of a series of elements arranged in a hierarchy, much like a mini file system. As an example, here is the structure of a simple Word 2007 (.docx) format:
    MyDocument.docx
    _rels
    rels
    docProps
    app.xml
    core.xml
    word
    _rels
    document.xml.rels
    theme
    theme1.xml
    document.xml
    settings.xml
    fontTable.xml
    webSettings.xml
    styles.xml
    [Content_Types].xml
    As briefly as before, the [Content_Types] file and the _rels folders, along with the subordinate files therein, contain information about the logical structure, and the two files in the docProps folder contain much the same as the two Information files
    in the old format. The document.xml element within the word folder holds the bulk of the document content and the other files within that same folder hold formatting details.
    So, you might say, the internal structure of a document has changed a little, so what? There are, however, other changes that make a bigger difference. The first is that, although both logical formats are conceptually similar, they are wrapped up in
    completely different ways to make a single file. Instead of the proprietary physical structure used for Word 97‑2003 format documents, a fairly standard, and open, Zip Archive format is used for Word 2007 format documents. The second change is that instead
    of using obscure binary codes, everything in Word 2007 format documents, well almost everything, is held in XML format.
    All data held as XML? In a standard Zip Package? It should be much easier to work with, then? Judge for yourself; here are some views of parts of a Word 2007 format document taken from a hex editor:
    Views of a Word 2007 format Document
    FreeFileViewer – reads 100+ text, Office, audio, video format file types – Can open some XML tag error files
    http://www.freefileviewer.com/formats.html
    Can't open Word file due to undeclared prefix, Location: Part: /word/document.xml, Line:91, Column: 49921
    The most likely cause of your particular problem is that you are missing a
    schema prefix reference within the opening <document ...> XML tag (usually the second one). Different
    schema references are required for various types of specialty content. Here is a sample opening <document ...> tag with a large number of various schema prefix codes. If I remove one or two of these, i can reproduce
    your error message.
    <w:document xmlns:ve="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"
    xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml">
    It's impossible to blindly say exactly what you are missing but if you post an unadulterated copy of your document to a public file area (as noted above) and post the location back here, someone may be able to help. If you are going to go this route, send
    a copy that has not already been subjected to repair attempts.
    FWIW, while it may be hard to determine exactly which schema you may be missing, I do not believe that having extras causes any problems.
    BTW, you don't actually have to rename the DOCX file extension if you have an archiving program. I use WinRAR and simply
    <right-click>, Open With... to expose the archive.

  • Releasing a .dll that a VI holds

    Hi guys, I have a dynamically opened sub-VI (opened by )
    once it gets opened, it seems to "hog" on to a dll file (namely, LVWutil32)
    and by hogging, I mean that if I try to delete the folder that contains this dll, I get an access denied exception,
    and if I close that sub-VI, the exception goes away.
    Now, what I would like to know is: how do I "close" sub-VI programmatically in labview, so I can remove the folder?
    Cheers!!

    I think there are several things we have to discuss/make clear here:
    1. I have no DLL called LVWutil32.dll on my system. Windows file search did not result in any hit when using "lvwutil32" as search parameter. Where does this derive from? Where is it stored on your disk? How is it used in your code?
    2. If loading a DLL, the OS attaches the DLL execution to the process of the calling application. Hence, the DLL will be attached to the process "LabVIEW.exe" (or "<applicationname>.exe"). As long as this process "lives", the OS can decide (or not) wether to deattach the DLL. Since LV is working very conservative with resources, DLLs are not likely to be unloaded until the process is shut down.
    3. Referring to 2, there is a possible way to load and unload DLLs dynamically on purpose. See this link for information.
    just my 5 cents,
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

Maybe you are looking for