| MSWord.Quit() (4 replies) |
| microsoft.public.dotnet.framework.interop |
| In my ASPX I have: Public Shared MSWord As New Word.Application() After it does it's work I want it killed so i use MSWord.Quit() But that gives me the error: 'Quit' is ambiguous across the inherited interfaces 'Word. Application' and 'Word.ApplicationEvents2 Event'. how do I make it use the right interface? for now I have : MSWord Nothing insted but it seems to leave instances of winword.exe stil... |
|
| CoCreateInstance vs. CoGetClassObject - any advice ? (4 replies) |
| microsoft.public.dotnet.framework.interop |
| Hello, I have taken the examples from MS to create access to a .NET Server from unmanaged code using COM interop. All works fine except until I start a second program that want's to interact with .NET by the same COM interop technique. After the second program has done its CoCreateInstance() the first cannot access .NET anymore and will raise COM exceptions (com issue errorex with hr 0x8013150b). ... |
|
| Keystroke strangeness (3 replies) |
| microsoft.public.dotnet.framework.interop |
| I have a DotNet form written in C#. One of the controls on the form is a custom control I wrote. I've given the form a static Main, and when I run it as a stand alone application it runs fine. I then created a controller class in C# with a COM interface, which I use from an unmananged C application. So far so good. I can create my form and make some calls on it from the C app. The problem is that ... |
|
| Interoping ActiveX Controls (6 replies) |
| microsoft.public.dotnet.framework.interop |
| Hi , I am trying to Interop some ActiveX Controls as far as I see I have 2 ways of doing it , 1. Use Customized Toolbar option from .Net IDE 2. Use AxImp.exe First option works but I will like to go for second because then I can name my Interop Controls the way I want , so I Interop my controls using AxImp.exe and it happens successfully but now problem is how to add my controls in Toolbar ? If I ... |
|
| ActiveX and two threads? (7 replies) |
| microsoft.public.dotnet.framework.interop |
| Hi, I have to use an ActiveX control to interface with a database. Queries to this database can take 10 to 20 seconds and I often will need to make 10 to 100 queries at a time. I want to add a second thread to my application so that the database queries can be done in the background while the user continues to use the app. Here's where I'm confused: The ActiveX control must be placed on a form in ... |
|
| Variant casting woes (3 replies) |
| microsoft.public.dotnet.framework.interop |
| Hi all, I am working with a late bound COM object (not of my creation) that I want to call a method from C#. The way I call the method in VB is: Dim App as Object Set App CreateObject("AA.BB") Dim Data as Variant ReDim Data(1234) as String App.GetDate 1, Data However, if I attempt similar code in C#, I get a type mismatch for Data. I checked the IDL for the object and here it is: [id(0x0000003c), ... |
|
| Problem with SetupDiGetDeviceInterfaceDetail (3 replies) |
| microsoft.public.dotnet.framework.interop |
| Thanks to Mattias for responding to my previous post in a different group. However, I still can't get the call to work correctly. The function call to SetupDiGetDeviceInterfaceDetail always returns false and GetLastError() returns 1784 (ERROR INVALID USER BUFFER). Here's the struct: [ StructLayout( LayoutKind.Sequential, CharSet CharSet.Auto )] public struct SP DEVICE INTERFACE DETAIL DATA { publi... |
|
| Help with TWAIN (3 replies) |
| microsoft.public.dotnet.framework.interop |
| I've been trying to use the twain 32.dll file to access a scanner but have been unsuccessful. I have all the constants, and datatypes declared in another file, I will include it in a subpost. When the init function of the following is passed the form handle, I do not recieve a success, yet the status message shows a success when checked. Thanks in advance for any help. |
|
| programmin outlook (2 replies) |
| microsoft.public.dotnet.framework.interop |
| Hi all, I have to program outlook using the aspx page. the aspx.cs file has the following code: Components.Email em new Email(); and the Email.cs file has the following code: class Email { public static Outlook.Application objOutlook new Outlook.ApplicationClass(); public static Outlook.Folders objFolders objOutlook.GetNamespace("MAPI").Folders; public static Outlook.NameSpace objFolder objOutlook... |
|
| Upgraded VB6->.NET deployment problem (4 replies) |
| microsoft.public.dotnet.framework.interop |
| Greetings, I really hope someone can throw me a clue on this. I have an existing VB6 SDK/application from a software vendor. I opened it up in .NET and converted it to a .NET application. Works. There were 2 dll's under VB6. avax.dll and avaxruler.dll. After the upgrade it created 4 dll's. Interop.Avax.dll, Interop.AvaxRuler.dll and AxInterop.Avax.dll, AxInterop.AvaxRuler.dll SO, it all works perf... |
|
| "monitoring" C# methods invocation (4 replies) |
| microsoft.public.dotnet.framework.interop |
| Hello ! I am new to C# and I have encountered the following problem. I would like to develop classes which would 'monitor' users' operations on the database using ADO.NET data providers classes. Let's say user operates on db using Sql/OleDbConnection, Sql/OleDbCommand, Sql/OleDbDataAdapter, etc. I would like to monitor users method invocations on these classes e.g. Sql/OleDbConnection.Open()/Close... |
|
| C++ DLL and char* (2 replies) |
| microsoft.public.dotnet.framework.interop |
| Hello, I am having trouble using a 3rd party DLL (not COM DLL) which uses a lot of char* in it's function arguments. I was wondering how would I define them in the DLLImport to be used in .NET with C#. Here is the function declaration in C int Transaction(char *host, int port, char *sbuf, int sbuf len, long universalTransCode, char *rbuf, int rbuf len, int receive length) I have tried the followin... |
|
| Unable to find entry point problem (2 replies) |
| microsoft.public.dotnet.framework.interop |
| I am getting an Unable To Find Entry Point error when try to do this: I need to use a VB COM from a .NET web application written in C#. In classic asp I did: set obj server.createObject("phiJobs.Class1") obj.textWriter set obj nothing In .NET, C# I want to do something like the following public class useOldDLL { [DllImport("e:\\DLLS System\\myDirectory\\phiJobs.dll", EntryPoint "textWriter")] publ... |
|
| COM interop late bound calling - gee where to start (2 replies) |
| microsoft.public.dotnet.framework.interop |
| Hi, Put simply I'm having issues getting ByRef parms to work when I call late bound to a wrapped COM object : // Create my Crypto Manager Create the Type locally Type tCryptoManager Type.GetTypeFromProgID("CryptoManager50.CryptoNonTx"); // Create an Instance of Type objCryptoMgr Activator.CreateInstance(tCryptoManager); // Build parameter array object[] objParms new object[4]; objParms[0] "MyConta... |
|
| How to make wrapper for c++ struct? (3 replies) |
| microsoft.public.dotnet.framework.interop |
| Hi Sirs I have the following Struct in c . How do I make the managed struct in c#? Regards Morten typedef void *MRBSESSION; typedef void *MRBPLUGINCONN; typedef long (*MRBNOTIFY)(long msg, const char *msgtxt, const void *userParam); typedef long (*MRBPROXYAUTH)(const void *userParam, char *auth); typedef long (*MRBHTTPAUTH)(const void *userParam, const char *scheme, const char *realm, char *auth);... |
|
| Bizarre COM interop problem (using OPC automation wrapper) (10 replies) |
| microsoft.public.dotnet.framework.interop |
| See the attached screenshot for what is happening. Basically, the "groups" variable should have a value of an object of OPCGroups but it appears to have a value of OPCServer. I don't understand why. server.OPCGroups returns an OPCGroups object but in the debug window it shows it as an OPCServerClass object.. Can anyone see anything wrong with that code? Why in the world is it doing that? The equiv... |
|
| Any success stories with CDO 1.21 Interop? (3 replies) |
| microsoft.public.dotnet.framework.interop |
| Has anybody had any success interoping with CDO 1.21 in either a component that runs under COM , or in a Windows Service? I'm trying to build a way to give broad access to send mail from a particular Exchange 5.5 mailbox via a code component. When I reference CDO.DLL in a Windows App, the code below works fine. But when I use the same code in a Windows Service or in a COM component, I get a UNKNOW... |
|
| Outlook Interop (2 replies) |
| microsoft.public.dotnet.framework.interop |
| After moving from beta 2 to the release version i'v encountred a problem with Outlook events. It seems that every time i try to hook into an event i get the following message : /* An unhandled exception of type 'System.InvalidCastException' occurred in interop.outlook.dll Additional information: No such interface supported */ I tried wrapping outlook again using the usual wrapper and the tlbimp ut... |
|
| Marshalling string buffers containing multiple nulls (3 replies) |
| microsoft.public.dotnet.framework.interop |
| I am trying to call a MIDI API function that expects an LPSTR as part of a MIDIHDR struct. The LPSTR is a so called "System Exclusive" buffer that contains a series of values. Typically, this buffer is of varying length and another member of the struct contains this length. The buffer however can contain multiple nulls, for example: F0 43 10 4C 00 00 00 00 7E XG reset message. Only the first four ... |
|
| Ways Of Interoping ActiveX Controls (7 replies) |
| microsoft.public.dotnet.framework.interop |
| Hi , I want to Interop some ActiveX Controls , Can I do it using some class available in .Net Framework ? Regards Shekhar |
|
| passing double from C# to C using P/Invoke (2 replies) |
| microsoft.public.dotnet.framework.interop |
| Hi. I've noticed that C# double values with 15 precision does not maintain its value when it gets passed to unmanaged code using P/Invoke. For example, I have a C# double set to 44546318497.7777. If I pass this double to a C DLL using P/Invoke, the double value obtained in the C DLL is 44546318497.777702. Is this behavior exptected? Is there way to eliminate the affect of having extraneous precisi... |
|
| RegAsm.exe (4 replies) |
| microsoft.public.dotnet.framework.interop |
| How does that program work? How does .NET know where to find an object and how to use it? How does the new "DllRegister/UnRegister" Functions work? Thanks Shariff |
|
| consuming LPBYTE into byte (2 replies) |
| microsoft.public.dotnet.framework.interop |
| Hi I have function in C that I have to call from C#.... Problem is that I am getting exception Unhandled Exception: System.ArgumentNullException: Value cannot be null. Parameter name: source at System.Runtime.InteropServices.Marshal.CopyBytesToManaged(Int32 source, By te[] destination, Int32 startIndex, Int32 length) at System.Runtime.InteropServices.Marshal.Copy(IntPtr source, Byte[] destinat ion... |
|
| What am I doing wrong here? (3 replies) |
| microsoft.public.dotnet.framework.interop |
| I am trying to customize a TreeView to allow me to have more control over sorting. To do this I have defined a delegate and am trying to use it as a callback function. (Which I think is the way it should be done.) Anyway here is the code that I am using: The return value from the SendMessage call is always 0. The things that I would like to know if I've got right are my definitation of SendMessage... |
|
| Excel Crashes when using KB Article Q316653 - MS Please Read (3 replies) |
| microsoft.public.dotnet.framework.interop |
| Hi, I'm using Windows NT Workstation 4.0 SP6 with Office 2000 Premium (all updates), Visual Studio .NET Pro programming in C#. After applying the fix in the KB Article Q316653, with the following modifications (the KB article will not work for because they forgot to have you run ilasm): 1. Before performing step 5, you must run (without quotes) "ilasm /RESOURCE Interop.Excel.res /DLL /OUTPUT Int e... |
|