| Certificate Exit Module (2 replies) |
| microsoft.public.dotnet.framework.interop |
| I'm trying to write an exit module for the Microsoft Certificate Authority in C#. I've wrapped certxds.dll to an interop and implemented the CCertExit Interface Then registered the dll using the following regsvcs MyExitModule.dll regasm MyExitModule.dll gacutil /i MyExitModule.dll but Certificate Authority doesn't see my exit module. I assume that com isn't aware that I'm inheriting CCertExit How ... |
|
| ComSourceInterfaces in C++ .NET (2 replies) |
| microsoft.public.dotnet.framework.interop |
| We are writing a C .NET server that needs to raise events to its VB6 client. We have found the MSDN article that explains raising these events in C# or VB.NET http://msdn.microsoft.com/library/default.asp?url /library/en us/cpguide/htm l/cpconraisingeventshandledbycomsink.asp How do we translate the source to C ? Everything we try fails. The problem is that C requires that we instantiate the class... |
|
| Inherit COM Interface (2 replies) |
| microsoft.public.dotnet.framework.interop |
| I've created a .Net dll which implements a windows COM Interface by using an autogenerated interop assembly. Does anyone know how I get it to register itself in the registry and indicate that it's inheriting from an existing com interface? The reason I need this is because the Microsoft Certificate Authority allows custom Exit Modules to be created and only lists the custom exit modules that imple... |
|
| Delphi VarArrayCreate() to C# (3 replies) |
| microsoft.public.dotnet.framework.interop |
| I am needing to know how to translate the VarArrayCreate method in Delphi into c#. Let me step back and explain the scenario. I am in the process of converting a Delphi program over to C#. The ActiveX component is Tidestone's F1Book spreadsheet that was developed prior to the .Net craze. And, of course is no longer available for windows. The .Net environment created a COM wrapper around this Activ... |
|
| calling .NET lib from Win32 (4 replies) |
| microsoft.public.dotnet.framework.interop |
| Hi, I think is possible to call a .NET library (managed code) from a Win32 library (unmanaged code) if the NET library is COM registered, is it true? Any way, is there any other way? Thank you in advance, Edgar |
|
| How to convert from managed to unmanaged (and viceversa) byte arrays and strings? (5 replies, VIP) |
| microsoft.public.dotnet.framework.interop |
| Hello, converting from the managed to the unmanaged world (and viceversa strings) and byte arrays is something I do often and I'd like to identify the most correct and efficient way to do it. Also, I was wondering could there be issues in not making copies when converting??? I was thinking, when "pointing" to the same data with both managed and unmanaged strings/arrays couldn't there be issues suc... |
|
| Reading DispID of method in an interface (2 replies) |
| microsoft.public.dotnet.framework.interop |
| Hi, I'm trying to enumerate all methods inside a COM object I have, but I copuldn't figure it out how to retrieve the DispID number of them. I got all the rest of the information, but didn't get this one. Could somebody please help me? Thanks in advance, Marcelo |
|
| ActiveX WindowsControl in MSAccess problem (7 replies, VIP) |
| microsoft.public.dotnet.framework.interop |
| Hi I am developing a windows control in C# that is intended for use in Access XP clients, hence is registered for COM interop. The control seems to have registered OK, appears in the activex controls list within Access, can be added in design mode and then displays and acts OK in form view. However, closing and re opening the mdb file causes problems: when the mdb is re opened and the first time t... |
|
| how to make IOleUndoManager known? (3 replies) |
| microsoft.public.dotnet.framework.interop |
| hi, I need to use existing COM IOleUndoManager implementations, but I cant' seem to make this interface known to the .Net. The DLL it is defined in (oleaut32) I cannot add to the references. Does somebody know what I need to reference to get access to the definition? Thanks a lot, Martin |
|
| How to get attributes provide by in System.Runtime.InteropServices (2 replies) |
| microsoft.public.dotnet.framework.interop |
| I am trying to get the FieldOffsetAttribute attached to a structure I have defined. Here is some sample code. The GetCustomAttribute call returns Nothing. So I am assuming that FieldOffsetAttribute is not a custom attribute. OK. So what is it and how can I get it. Imports System.Runtime.InteropServices Imports System.Reflection Module Module1 StructLayout(LayoutKind.Sequential) Public Structure My... |
|
| Passing Arrays from ASP to .Net and back again (3 replies) |
| microsoft.public.dotnet.framework.interop |
| We're having problems passing arrays from ASP pages to .NET (Interop) classes. Let's assume that we just want to pass a string array (byref) from ASP to .Net. The first problem is that unless we declare the array as object[] in .Net, we get a error from ASP. This may be a mistake, but let's continue on anyway. Declaring the incoming array as object[] seems to introduce all kinds of weird errors; i... |
|
| Marshalling an array of ints with arbitrary length from C# app (2 replies) |
| microsoft.public.dotnet.framework.interop |
| I have a DLL which exports two C functions. First one returns a pointer to an array of ints, and second one returns single value indicating length of the array, like so: extern "C" EXPORT int* GetPointArray(); extern "C" EXPORT int GetPointCount(); How would I go about marshalling the return value so that I could access data of the array in a managed C# application? |
|
| Creating an instance of Bloggs.Application given the CLSID? (2 replies) |
| microsoft.public.dotnet.framework.interop |
| How can I create an instance of Bloggs.Application given the CLSID of the class? Dim iHaveTheClsID as Guid .... Dim theObject As Bloggs.Application CreateObject(...........????........... ) Alternatively, how do I find the class string given the clsid? (ie "Bloggs.Application", from the CLSID). Any ideas? Cheers |
|
| C#/Excel interop - performance tips? (5 replies) |
| microsoft.public.dotnet.framework.interop |
| I am writing a C# application which reads data from an Excel workbook and writes the process result back to another Excel workbook. Currently I am using a one cell range object to locate one cell by row & col id for each read and write. (i.e. everytime, I use the range object to refer to one cell and operates on its Value2 property). Effectively I guess for each read and/or write, it creates a new... |
|
| Binary compatability? (5 replies) |
| microsoft.public.dotnet.framework.interop |
| Hi, I've made a C# dll that I'm accessing with VB6 clients. My problem is that when I make changes to the C# dll the clients stop working. This makes bug fixes quite an ordeal. I've read that for versioning purposes it is best to make a separate interface that is exposed to the COM world. Comments about this approach are also welcome. [Guid(" My GUID from the tool ")] [InterfaceType(ComInterfaceTy... |
|
| Dcom component and events (2 replies, VIP) |
| microsoft.public.dotnet.framework.interop |
| I have one DCOM component that is already working in a VB6 applications, and I have successfully imported it in a Visual Basic Net Application. Everything is working OK, except that my application does not receive the events the component fires. The wizard has include the correct code ( it knows the component fires events), but the code is never called. It is working in VB6, so I don t think it s ... |
|
| Hosting .Net controls in Win32 application (3 replies) |
| microsoft.public.dotnet.framework.interop |
| Hi, I have a classic Win32 application, which should stay developed for some more time, until a brand new product is finished. It would be nice to write new modules in .NET WinForms and dock them as child windows in the old Win32 Frame window. Is this thinkable ? The issues I see: 1. Child window relationship I can use SetParent API to host the child Form, this looks to work fine. But when the for... |
|
| who on earth has done a complete win32 api wrapper for C#? (3 replies, VIP) |
| microsoft.public.dotnet.framework.interop |
| looking for a comprehensive version of most common API functions used in ..Net, sample below: using System; using System.Runtime.InteropServices; namespace ApiWrapper { /// summary /// Summary description for Win32API. /// Date: 5 March, 2004 /// /summary public class Win32API { /// summary /// The SendMessage function sends the specified message to a window or windows. /// The function calls the ... |
|
| VB.Net Get Users NT Groups (No ADS) (4 replies) |
| microsoft.public.dotnet.framework.interop |
| Hi I am looking to get the NT Groups a user belongs too, using VB.Net. Our systems are not Active Directory Service enabled (NT 4). I have trolled the web and can find very little example code on how to do this in VB.Net I would be very grateful if you could provide me with some snippet of code on how to get the users NT groups in VB.Net (non ADS). Thanks Bert |
|
| SAPI 5.1 Audio Event (3 replies, VIP) |
| microsoft.public.dotnet.framework.interop |
| Hi, I'm doing some COM Interop against SAPI 5.1 using an Interop Assembly. Many simple things are working fine the Word & Sentence events fire well. However the Audio event does not fire at all meaning I can't add a VU meter I have specified the required event in the EventInterests property (and also tried requesting all events). It works fine from raw COM without .NET Anyone know anything about t... |
|
| Native exception when using DllImport in c# (2 replies, VIP) |
| microsoft.public.dotnet.framework.interop |
| Hi, I'm trying to use an existing c dll, but keep getting 'A native exception occurred.' error when I try to use it. The exact error is: A native exception occurred. ExceptionCode: 0xc0000005 ExceptionAddress: 0x01bcad48 Reading: 0x2e740050 OK to terminate CANCEL to debug The C 's function spec is as follows: void MyLogger::LOG INITIALIZE(int options, int types, CString & fileName, int maxMessageL... |
|
| passing a bitmap to a runtime DLL using GDI+ (2 replies, VIP) |
| microsoft.public.dotnet.framework.interop |
| Hi, I wondered if anyone knew how to pass a Bitmap, Image, or other Forms obect to a runtime DLL in a dynamic way using GDI . I can do this with integers, strings, etc. but when passing the Bitmap objects, get the following runtime crash message "cannot marshal parameter #2. The type definition of this type has no layout information". Debugging and disassembling this shows that the call to the fun... |
|
| Windows Service using Excel Interop is flaky (3 replies) |
| microsoft.public.dotnet.framework.interop |
| Hi, We have a Windows Service developed using C# that is setup to automatically generate Excel reports and copy them to multiple shares based on certain daily criteria. The development env is .NET Framework 1.1, Office XP plus Office SP PIA, VS.NET 2003 on Win XP Professional. We created a setup project using VS.NET to install the service and the associated libraries. On the dev env, the service d... |
|
| Null function pointer... how do I do this in C#? (4 replies) |
| microsoft.public.dotnet.framework.interop |
| Hi everybody. I am working with Eicon's X.25 Development tools. The tools come with a ex25.dll that I need to interact with, from my C# code. I have been marginally succesfull in getting some of the method calls to work. For example: the ex25.dll has this: OSEXTERN OSINT OSFNDEF x25init(message,uMsg) OSINT message; /* message flag for request completion */ unsigned int uMsg; /* Identifies message ... |
|
| ParameterModifier problems in InvokeMember (2 replies) |
| microsoft.public.dotnet.framework.interop |
| I'm having a time getting ref parameters to work from .net to a COM object. I can call the method fine without passing a ParameterModifier, but I get a TargetInvocationException with a CommException of 'Invalid callee' when I attempt to pass the ParameterModifier and set one of the params to ref. Here the code snippet... tCSCS System.Type.GetTypeFromProgID(CSCS CLASS ID); oCSCS tCSCS.InvokeMember(... |
|