Search Results

Search found 57004 results on 2281 pages for 'di seghposs(at)oracle com'.

Page 87/2281 | < Previous Page | 83 84 85 86 87 88 89 90 91 92 93 94  | Next Page >

  • Worksheet.Unprotect - Office Interop - Difference between 2003 and 2007

    - by sdmcnitt
    I have a .NET winforms app that automates Excel and checks for a worksheet password. The requirements are to be able to detect 1) that the protection is turned off 2) that the password is removed (protected but there is no password) 3) that the password matches the correct password from a database To meet the second requirement the program calls the Worksheet.Unprotect command with a null string, capturing the error. If error as expected, the 3rd check is made. If no error, then the Unprotect worked without a password == password was removed. The code sample below has these checks. The application can do this fine with Office 2003. I have since had my dev machine updated to Office 2007 and it no longer works as it did. When I call the Worksheet.Unprotect, Excel prompts for the password! I need to know how this should be accomplished in the new version of Excel or if there is a way to reference the old PIA. No matter what if I set a reference to Excel 11 it is replaced with the PIA for 12 in the GAC. 'return true if unprotect of worksheet does not generate an error 'all other errors will bubble up 'return false if specific error is "Password is invalid..." Try 'detect unprotected or no password If oWorksheet.ProtectContents Then 'try with no passsword and expect an error 'if no error then raise exception Dim blnRaiseException As Boolean = True Try 'oWorksheet.Unprotect(vbNullString) oWorksheet.Unprotect() Catch ex As Exception blnRaiseException = False End Try If blnRaiseException Then Throw New ExcelSheetNoPasswordException End If oWorksheet.Unprotect(strPwd) 'no error so if we get here -- success fnCheckWorksheetPwd = True 'leave as it was -- this may still cause workbook to think it is changed oWorksheet.Protect(strPwd) Else Throw New ExcelSheetNotProtectedException End If Catch COMex As System.Runtime.InteropServices.COMException 'handle error code -2146827284 If COMex.ErrorCode = -2146827284 Then 'this is the error we're looking for Else Throw End If Catch ex As Exception Throw End Try

    Read the article

  • import txt files using excel interop in C# (QueryTables.Add)

    - by kite
    Hi all, I am trying to insert text files into excel cell using Querytables.Add; no error, but the worksheet is empty. except for the single cell manipulation using Value2 property. I already using macro to record the object used. Can you help me on this(I am using vs2008, C# , excel 2003 and 2007; both shown empty cell). Below is my code; thanks for your help Application application = new ApplicationClass(); try { object misValue = Missing.Value; wbDoc = application.Workbooks.Open(flnmDoc, misValue, misValue, misValue, misValue, misValue, misValue, misValue, misValue, misValue, misValue, misValue, misValue, misValue, misValue); wsRefDocBudgetOwner = (Worksheet)wbDoc.Worksheets[2]; Range lRange = wsRefDocBudgetOwner.get_Range("B2", "B25"); var temp2 = wsRefDocBudgetOwner.QueryTables; var temp = temp2.Add(@"TEXT;d:\temp\config ssas.txt", lRange, Type.Missing); //temp.RefreshStyle = XlCellInsertionMode.xlInsertDeleteCells; //temp.RefreshOnFileOpen = true; wsRefDocBudgetOwner.get_Range("B1", "B1").Value2 = "Lgfdgast adsffdafadfads"; wbDoc.Save(); //wbDoc.SaveAs(flnmDoc2, misValue, misValue, misValue, misValue, misValue, XlSaveAsAccessMode.xlExclusive, // misValue, misValue, misValue, misValue, misValue); wbDoc.Close(Missing.Value, Missing.Value, Missing.Value); } finally { application.Quit(); }

    Read the article

  • CAB file for X86 and X64

    - by ramanakumar
    HI I have created a CAB file for an ActiveX component which is wrapper around a .Net Libray. Here the .Net Library is refering some third party components which are actually build in (X86 or X64) No Any CPU. So My Cab file should be intelligent enogh to install eigther X86 or X64 depending on the client ( Browser) I Know the change should be in the INF file. As i am new to thsi Interoperabilit technology. Please guide me in solving this problem. Thanking you.

    Read the article

  • Is it possible to interop with Thunderbird using C#?

    - by Jurily
    Here's the latest hurdle in my ongoing quest to automate my job: All email in the company goes through 4 different email adresses, switching randomly back and forth (with a note attached in the global share: please set "keep email on server") All logic related to email is contained in a nice big Thunderbird profile, which gets copied back and forth to new machines; this includes sorting invoices into 5 different "folders", the list of VIP adresses to send notifications, and the VIP level of those customers I only need the contents of those folders (the attachments, anyway) The question: is there a way to ask Thunderbird for those attachments and lists from C#? Alternatively, can Outlook be set up to synchronize with Thunderbird? Where do I start reading? Ditching Thunderbird is not an option right now, I need to keep up with changes to the VIP list. P.S. I will set up a real email server right after Monkey saves me enough time to convince people about it.

    Read the article

  • Troubleshooting a COM+ application deadlock

    - by Chris Karcher
    I'm trying to troubleshoot a COM+ application that deadlocks intermittently. The last time it locked up, I was able to take a usermode dump of the dllhost process and analyze it using WinDbg. After inspecting all the threads and locks, it all boils down to a critical section owned by this thread: ChildEBP RetAddr Args to Child 0deefd00 7c822114 77e6bb08 000004d4 00000000 ntdll!KiFastSystemCallRet 0deefd04 77e6bb08 000004d4 00000000 0deefd48 ntdll!ZwWaitForSingleObject+0xc 0deefd74 77e6ba72 000004d4 00002710 00000000 kernel32!WaitForSingleObjectEx+0xac 0deefd88 75bb22b9 000004d4 00002710 00000000 kernel32!WaitForSingleObject+0x12 0deeffb8 77e660b9 000a5cc0 00000000 00000000 comsvcs!PingThread+0xf6 0deeffec 00000000 75bb21f1 000a5cc0 00000000 kernel32!BaseThreadStart+0x34 The object it's waiting on is an event: 0:016> !handle 4d4 f Handle 000004d4 Type Event Attributes 0 GrantedAccess 0x1f0003: Delete,ReadControl,WriteDac,WriteOwner,Synch QueryState,ModifyState HandleCount 2 PointerCount 4 Name <none> No object specific information available As far as I can tell, the event never gets signaled, causing the thread to hang and hold up several other threads in the process. Does anyone have any suggestions for next steps in figuring out what's going on? Now, seeing as the method is called PingThread, is it possible that it's trying to ping another thread in the process that's already deadlocked? UPDATE This actually turned out to be a bug in the Oracle 10.2.0.1 client. Although, I'm still interested in ideas on how I could have figured this out without finding the bug in Oracle's bug database.

    Read the article

  • How do I create interface methods using .tlb types in VS C++?

    - by Steven
    Background: The .TLB file contains interfaces written in language 'X'. I don't have .h, .idl, .tlh, or any other header files - just the .TLB file. Language 'X' does not export compatible .h, .idl, etc. I use the VS wizard to add an ATL simple object to my ATL project. I want to add a method to the interface of my simple ATL object that uses one of the .TLB defined types for a parameter. // Something like the following in the .idl file: interface ISomeInterface : IUnknown { HRESULT SomeMethod([in] ITypeFromTLB* aVal); // ITypeFromTLB declared in .TLB file. }; How can I do this? I'm hoping for a wizard, or a line in the .idl interface declaration that would bring in the .tlb information. midl's include (no .tlb), import (no tlb), and importlib (library only) don't seem to provide a solution (I need proxy/stub to be working, so I cannot put this inside the library declaration with the importlib command). Thanks.

    Read the article

  • STAThread and Process output capture in c#

    - by alex
    Hi: This is a strange problem I encountered. I have an window application written in c# to do testing. It has a MDI parent form that is hosting a few children forms. One of the forms launch test cripts by creating processes and capture the scripts output to a text box. Another form open serial port and monitoring the status of the device I am working on(like a shell). If I ran both of them together, the output of the script seems only appear in the text box after the test is done. However, If I don't open the serial port form, the output of the script is captured in real time. Does anyone knows what's causing the problem? I notice the onDataReceived even handler for serial port form has a [STAThread] header to it. Will this cause the serial port thread having higher priority than other processes? Thanks in advance.

    Read the article

  • How to invoke client ActiveX via javascript

    - by Captain Kidd
    Hi I want to let server to invoke client ActiveX via javascript. The script work well as it run on my local system. Then I place it into Apache Server and it's malfunction. Script: <object id="lv_obj" classid = "CLSID:30A92485-94D2-4CBA-AC32-EF276B7F777B" CODEBASE="" ></OBJECT> try { document.all.lv_obj.Init("PCS_Tes"); } catch (err) { window.alert("????: " + err.message); } I guess the reason is script on server can't invoke user client ActiveX. If I need config something on Apache?

    Read the article

  • How do I render the scrollable regions of a canvas with IViewObject::Draw?

    - by nirvdrum
    Hi, I've been trying to render the entire canvas in an IWebBrowser2 control to a bitmap. IViewObject::Draw seems to be the most promising approach, but I can't get it to render anything that would requires a scroll to show. While I could automate the scrolling and stitch the images together, this would look weird with any fixed position elements. Is this even doable? Additionally, I've tried to set the controller's size to one that would allow the entire contents to display without needing to scroll, but Windows caps the max size to the current screen resolution, so that only gets me partially there. Any help would be much appreciated. I'm currently doing this in the context of Win7 and IE8, but I don't think that should matter much.

    Read the article

  • Abstract Methods in "Product" - Factory Method C#

    - by Regina Foo
    I have a simple class library (COM+ service) written in C# to consume 5 web services: Add, Minus, Divide, Multiply and Compare. I've created the abstract product and abstract factory classes. The abstract product named WS's code: public abstract class WS { public abstract double Calculate(double a, double b); public abstract string Compare(double a, double b); } As you see, when one of the subclasses inherits WS, both methods must be overridden which might not be useful in some subclasses. E.g. Compare doesn't need Calculate() method. To instantiate a new CompareWS object, the client class will call the CreateWS() method which returns a WS object type. public class CompareWSFactory : WSFactory { public override WS CreateWS() { return new CompareWS(); } } But if Compare() is not defined as abstract in WS, the Compare() method cannot be invoked. This is only an example with two methods, but what if there are more methods? Is it stupid to define all the methods as abstract in the WS class? My question is: I want to define abstract methods that are common to all subclasses of WS whereas when the factory creates a WS object type, all the methods of the subclasses can be invoked (overridden methods of WS and also the methods in subclasses). How should I do this?

    Read the article

  • Temporarily save Word document changes

    - by willvv
    Hi I'm using Interop to create a "custom word editor", basically I've incorporated MS Word on my application and I allow users to edit a document and insert custom fields from a predefined list. I provide a "Preview" option to see how the document will appear when the data is added. The users can start editing a template on my application, and at any time they can hit preview and the preview should appear with the latest changes. I want the user to be able to preview the document without saving the changes, the problem is that when I invoke SaveAs() on the document (to create a temp file that I can use as the input for the preview generator), the editor opens the temp document. Is there a way to save a copy of the document being edited but keep the original (open) document with its changes unsaved? Thanks a lot

    Read the article

  • Hooking the http/https protocol in IE causes GET requests to be sequential

    - by watsonmw
    I'm using the PassthruAPP method to hook into HTTP/HTTPS requests made by IE. It's working well for the most part, however I noticed a problem. Only one download thread is active at a time. I can see two IInternetProtocol objects getting created, but IE uses only one at a time. This is happening with IE7. The odd thing is that the problem occurs when overriding the existing default HTTP/HTTPS handler, even if the handler is not the one being used to make the request. E.g. Registering a handler for the HTTPS protocol will cause HTTP requests to be made sequentially, even though HTTP requests are not hooked. I installed Google Gears and it has the same problem. This always happens for the first few items on the page, but it seems that after the document complete is issued, concurrent downloads can occur again. For example Javascript code that is executed after the page has finished loading can load images concurrently just fine. One option is to try to IAT patch the 'IInternetProtocol' registered for HTTP requests, but Google Gears does this already and it has the same problem. I know installing a HTTP Proxy is another option, but I don't want to monkey with the users' HTTP Proxy settings if there another option.

    Read the article

  • Moving delegate-related function to a different thread

    - by Chris
    Hello everybody. We are developing a library in C# that communicates with the serial port. We have a function that is given to a delegate. The problem is that we want it to be run in a different thread. We tried creating a new thread (called DatafromBot) but keep using it as follows (first line): comPort.DataReceived += new SerialDataReceivedEventHandler(comPort_DataReceived); DatafromBot = new Thread(comPort_DataReceived); DatafromBot.Start(); comPort_DataReceived is defined as: Thread DatafromBot; public void comPort_DataReceived(object sender, SerialDataReceivedEventArgs e) { ... } The following errors occur: Error 3 The best overloaded method match for 'System.Threading.Thread.Thread(System.Threading.ThreadStart)' has some invalid arguments C:...\IR52cLow\CommunicationManager.cs 180 27 IR52cLow Error 4 Argument '1': cannot convert from 'method group' to 'System.Threading.ThreadStart' C:...\IR52cLow\CommunicationManager.cs 180 38 IR52cLow Any ideas of how we should convert this to get it to compile? Please note that comPort.DataReceived (pay attention to "." instead of "_") lies within a system library and cannot be modified. Thanks for your time! Chris

    Read the article

  • Internet Explorer cannot 'fully' load ActiveX Control

    - by K Browne
    Context I am migrating an installer for an ActiveX control from Per-Machine to Per-User. I did this by programming the installer write to HKCU\Software\Classes instead of HKLM\Software\Classes. Problem On my machine (Windows 7 with UAC Enabled), the ActiveX control successfully loads. On the other windows 7 test machines (one with UAC enabled, one with UAC disabled), the control 'partially' loads. What is Partially? When a user visits a page with the ActiveX control, Internet Explorer displays a warning message in a yellow bar on the top of the window. If you click the 'Run add-on' button in the bar, the control becomes visible and begins to run, but Javascript code that tries to access properties of the control return the error: Library not registered. Differences between machines On the dev machine reads from HKCR\CLSID\<GUID> succeed while on the test machines these reads fail. Reads from HKCU succeed on both dev and test machines. Reads from HKLM fail on both test and dev machines. (I collected reads using Sysinternals Process Monitor) Strangely, the keys that Internet Explorer fails to read are clearly visible if I use regedit to view HKCR\CLSID\<GUID> on the test machines. Question What can I do to get the per-user control to load on the test machines? What could cause this difference between the dev machine and the test machines? Why can I see the key in HKCR with RegEdit but Internet Explorer cannot see the key? Any help is appreciated. Thank you.

    Read the article

  • Trying to populate ListView in Android using objects from Parse

    - by mrwienerdog
    I am pretty darned new to android, and VERY new to Parse. I have created a class, StudentInformation, that includes columns for name, address, phone, etc. I would like to create a listview that contains the names of all students added to the class. How do I do this? I have got it to the point that I can Toast out the objectIDs of all of my entries, but can't figure out how to extract and add just the names to the ListView. Here is a snippet of the code: //Set up the listview studentListView = (ListView)findViewById(R.id.listViewStudents); //Create and populate an ArrayList of objects from parse ParseQuery query = new ParseQuery("StudentInformation"); final ArrayList<Object> studentList = new ArrayList<Object>(); query.findInBackground(new FindCallback() { public void done(List<ParseObject> objects, ParseException e) { if (e == null) { Toast.makeText(getApplicationContext(), objects.toString(), Toast.LENGTH_LONG).show(); for(int i = 0;i < objects.size(); i++){ objects.get(i); studentList.add("name".toString()); } } else { Toast.makeText(getApplicationContext(), "Error", Toast.LENGTH_LONG).show(); } } }); //studentList.addAll(Arrays.asList(students)); listAdapter = new ArrayAdapter<Object>(this,android.R.layout.simple_list_item_1,studentList); studentListView.setAdapter(listAdapter); } I have left the toast in where I toatst out the objectIDs in the public void done.... method. Any help would be, as always, greatly appreciated. Should be mentioned (possibly), no errors are thrown, the listview just never gets populated after the toast disappears. Don't know if this will help anyone, but I took a bit from both posts below, and came up with this: //Set up the listview studentList = new ArrayList<String>(); //Create and populate an ArrayList of objects from parse listAdapter = new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1); studentListView = (ListView)findViewById(R.id.listViewStudents); studentListView.setAdapter(listAdapter); final ParseQuery query = new ParseQuery("StudentInformation"); query.findInBackground(new FindCallback() { public void done(List<ParseObject> objects, ParseException e) { if (e == null) { //Toast.makeText(getApplicationContext(), objects.toString(), Toast.LENGTH_LONG).show(); for (int i = 0; i < objects.size(); i++) { Object object = objects.get(i); String name = ((ParseObject) object).getString("name").toString(); listAdapter.add(name); } } else { Toast.makeText(getApplicationContext(), "Error", Toast.LENGTH_LONG).show(); } } });

    Read the article

  • How can I access the JavaScript global object ("window") inside an embedded browser object (the IWebBrowser2 interface)?

    - by John Factorial
    I have an HTML page which embeds an IWebBrowser2 ActiveX (i.e. the control is essentially an Internet Explorer browser). I need to write JavaScript in this HTML page which will remove any window.onresize handler from the page loaded in the IWebBrowser2 control. IWebBrowser2 exposes the DOM through IWebBrowser2::Document, but this is equivalent to window.document. Is there any way I can get access to window or window.onresize?

    Read the article

  • Should a Stack have a maximum size?

    - by Sotirios Delimanolis
    I'm practicing my knowledge of ADTs by implementing some data structures, even if most already exist. With Stacks, a lot of books and other documentation I've read talk about the stack throwing an error when you try to add an element but the stack is full. In a java implementation (or any other), should I specifically keep track of a maximum stack size (from constructor), check to see if that size is reached, and throw an overflow exception if it is? Or is not such a big deal?

    Read the article

  • Problem catching OnClick event using HTMLDocumentEvents2 in a BHO

    - by Yonatan
    I am running a BHO and i am trying to catch OnClick events using HTMLDocumentEvents2 however, the events never seem to reach the handler this is what i am doing: class ATL_NO_VTABLE CBlastBhoBHO : public CComObjectRootEx<CComSingleThreadModel>, public CComCoClass<CBlastBhoBHO, &CLSID_BlastBhoBHO>, public IObjectWithSiteImpl<CBlastBhoBHO>, public IDispatchImpl<IBlastBhoBHO, &IID_IBlastBhoBHO, &LIBID_BlastBhoLib, /*wMajor =*/ 1, /*wMinor =*/ 0>, public IDispEventImpl<0, CBlastBhoBHO, &DIID_HTMLDocumentEvents2, &LIBID_MSHTML, 1, 0>, public IDispEventImpl<1, CBlastBhoBHO, &DIID_DWebBrowserEvents2, &LIBID_SHDocVw, 1, 1> BEGIN_SINK_MAP(CBlastBhoBHO) SINK_ENTRY_EX(0, DIID_HTMLDocumentEvents2, DISPID_HTMLDOCUMENTEVENTS2_ONCLICK, OnClickTrigger) SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_DOCUMENTCOMPLETE, OnDocumentComplete) END_SINK_MAP() // Handlers void STDMETHODCALLTYPE CBlastBhoBHO::OnDocumentComplete( IDispatch *pDisp, VARIANT *url) { // works fine } void STDMETHODCALLTYPE CBlastBhoBHO::OnClickTrigger(IHTMLEventObj *pEvtObj) { // Never called } // From SetSite() ATL::IDispEventSimpleImpl<1,CBlastBhoBHO,&DIID_DWebBrowserEvents2>::DispEventAdvise(m_spWebBrowser); // From OnDocumentComplete CComQIPtr<IHTMLDocument3> doc_; m_spWebBrowser->get_Document((IDispatch**) &doc_); ATL::IDispEventSimpleImpl<0,CBlastBhoBHO,&DIID_HTMLDocumentEvents2>::DispEventAdvise(doc_); I have tried several variations(using HTMLElementEvents2 etc) or Advising on different objects or Advising on the document from SetSite. my handler is never called. Any help would be much appreciated. all i need is the onClick event.

    Read the article

  • Sending binary data from ASP to .net component

    - by john
    The ASP application allows uploading of image files (jpg, gif, tif). These files are sent to a .net component registered in the GAC of the server. In the component file is encoded using System.Text.Unicode to byte[] array. This encoding is done with some data loss. The byte array has values 253 and 255 in consequetive elements. What could be the problem ? I'm sending the binary data as a string. Please help me... Thanks in advance, John

    Read the article

  • Retrieving dll version info via Win32 - VerQueryValue(...) crashes under Win7 x64

    - by user256890
    The respected open source .NET wrapper implementation (SharpBITS) of Windows BITS services fails identifying the underlying BITS version under Win7 x64. Here is the source code that fails. NativeMethods are native Win32 calls wrapped by .NET methods and decorated via DllImport attribute. private static BitsVersion GetBitsVersion() { try { string fileName = Path.Combine( System.Environment.SystemDirectory, "qmgr.dll"); int handle = 0; int size = NativeMethods.GetFileVersionInfoSize(fileName, out handle); if (size == 0) return BitsVersion.Bits0_0; byte[] buffer = new byte[size]; if (!NativeMethods.GetFileVersionInfo(fileName, handle, size, buffer)) { return BitsVersion.Bits0_0; } IntPtr subBlock = IntPtr.Zero; uint len = 0; if (!NativeMethods.VerQueryValue(buffer, @"\VarFileInfo\Translation", out subBlock, out len)) { return BitsVersion.Bits0_0; } int block1 = Marshal.ReadInt16(subBlock); int block2 = Marshal.ReadInt16((IntPtr)((int)subBlock + 2 )); string spv = string.Format( @"\StringFileInfo\{0:X4}{1:X4}\ProductVersion", block1, block2); string versionInfo; if (!NativeMethods.VerQueryValue(buffer, spv, out versionInfo, out len)) { return BitsVersion.Bits0_0; } ... The implementation follows the MSDN instructions by the letter. Still during the second VerQueryValue(...) call, the application crashes and kills the debug session without hesitation. Just a little more debug info right before the crash: spv = "\StringFileInfo\040904B0\ProductVersion" buffer = byte[1900] - full with binary data block1 = 1033 block2 = 1200 I looked at the targeted "C:\Windows\System32\qmgr.dll" file (The implementation of BITS) via Windows. It says that the Product Version is 7.5.7600.16385. Instead of crashing, this value should return in the verionInfo string. Any advice?

    Read the article

  • .NET: How does the use of components in .NET differ to pre-.NET?

    - by Craig Johnston
    How does the use of components in .NET differ to pre-.NET? I see the differences as: .NET components don't have to be centrally registered on a machine and can merely be invoked at run-time from a specified location if .NET components are 'registered' in the GAC, problems asociated with different versions of the same DLL ("DLL hell") are avoided because each version will have its own id/key which is known to the calling program Is the above correct, and what other relevant differences are there?

    Read the article

< Previous Page | 83 84 85 86 87 88 89 90 91 92 93 94  | Next Page >