| Regasm failure (2 replies, VIP) |
| microsoft.public.dotnet.framework.interop |
| Hi I'm trying to run RegAsm on my C# Classlibrary but it fails with the error "Duplicate ID in inheritance hierachy". I give all my classes a specific Guid (using the System.Runtime.InteropSerices.Guid attribute), and I've checked there are no duplets. Can anyone help me figure out, why this could be happening? MVH Bo BrogÄrd Lund |
|
| Invalid Cast Runtime Error (2 replies) |
| microsoft.public.dotnet.framework.interop |
| Anybody know why the following gives an invalid cast runtime error? MSDASC.DataLinks datalink new MSDASC.DataLinks(); ADODB.Connection connection (ADODB.Connection)datalink.PromptNew(); The error occurs on line 2. If I change the type of connection to object it works correctly but then (of course) I cannot call any methods or properties on the connection object. Using C#. TIA, Larry |
|
| Problems with Optional Variant Parameters (2 replies) |
| microsoft.public.dotnet.framework.interop |
| Okay here is the code from a DLL written in VB6. Public Function GetPatientSchedule(oSchedule As adodb.Recordset, PatientID As Variant, Optional EventDate As Variant) As Boolean Dim sCmd As String Dim oRs As adodb.Recordset If IsMissing(EventDate) Then sCmd scExec & scGET PATIENTSCHEDULE & scSQ & PatientID & scSQ ElseIf IsDate(EventDate) Then sCmd scExec & scGET PATIENTAPPDATA & scSQ & PatientID &... |
|
| Need some help desperately (4 replies, VIP) |
| microsoft.public.dotnet.framework.interop |
| I have a COM object (sosBLRI.dll); I run the tlbimp against it to make sosBLRI net.dll in the bin dir. I get the following error message when I try to execute the code: ClassFactory cannot supply requested class If I shut my machine down and go home, the next morning it sometimes works fine. This time, it did not!!! Once it starts working, it will last forever (I think). If I need to make a change... |
|
| COM Events in VB.NET (2 replies, VIP) |
| microsoft.public.dotnet.framework.interop |
| I have a number of COM objects (All created in C , all work find in VB6) where in VB.Net all the methods work fine, but the events of these objects all report "Can't find Event xxxxx that has the same signature as the handling method" errors in the event handler. It appears that using a COM object in a VB.Net app should be a very straight forward process by everything I've read on this. However, i... |
|
| COM interface method that returns a pointer (3 replies, VIP) |
| microsoft.public.dotnet.framework.interop |
| Hi. I have a basic questions regarding COM interop. Let's say I have a COM object with an interface method which returns a char * for example. Can I create a Runtime Callable Wrapper (RCW) for this COM object which will allow this pointer value to be returned to the .NET application? Would it be a true statement to say that this is possible, but the pointer value that is returned to the .NET appli... |
|
| Resistering a .NET assembly with RegAsm.exe fails (2 replies, VIP) |
| microsoft.public.dotnet.framework.interop |
| We have a need to create a DataSet object in the client side script (JScript or VBScript). In order for me to create an instance of it I should be registering the System.Data.dll with COM. Is that right? I tried doing it and I don't see any entries in the registry for the System.Data.DataSet class. When I try to do CreateObject(System.Data.DataSet) it gives ActiveX Component cannot be created erro... |
|
| InvalidCastException: QueryInterface for IFoo failed (2 replies, VIP) |
| microsoft.public.dotnet.framework.interop |
| "System.InvalidCast: QueryInterface for interface IFoo failed." Anybody know how to get more information about this exception? It would be nice to know what type the runtime thought it got. That might give me some idea about how to fix this. I don't get this error on the development machine. Only when I moved everything to another machine and tried to run it. C# code follows, then the output it pr... |
|
| Can you help in passing struct with string to DLL (2 replies) |
| microsoft.public.dotnet.framework.interop |
| Hi, Can you help me with this problem. I am calling function in DLL which as struct with strings, interface is working fine, struct ConnData { char *swUser; char *swPassword; }; extern "C" declspec(dllexport) long stdcall VanConn(long conn,struct ConnData data, long status) { printf(" Connection Information is %ld\n ", conn); printf(" ConnData user %s \n", data.swUser); printf(" ConnData Password ... |
|
| multiplying entries in registry (2 replies, VIP) |
| microsoft.public.dotnet.framework.interop |
| Hi! I'am making an assembly for testing COM interoperability, and have run into the following problem. Each time I make a new version of assembly, I uninsstall the old one from GAC, unregister it with regasm, install the new version to the GAc and register it with regasm. The problem is that when I unregister assembly it's typelib stays in the registry. So after some time, I have a registry filled... |
|
| How to marshal function pointers (3 replies) |
| microsoft.public.dotnet.framework.interop |
| I have a C DLL that I would like to use from C#. The initialization function from the C DLL returns a structure containing several function pointers. How do I define the function pointers in the data structure in C#? For example, say I have the following C structure: typedef struct { some normal variables } A; typedef struct { int (*function1)(A* a); void (*function2)(A* a, void *buf, int len); } ... |
|
| ONPAINT & DRAWIMAGE (ANYTHING FASTER?) (2 replies) |
| microsoft.public.dotnet.framework.interop |
| I have a form, like Studio's start page, that is ownerdrawn. I have doublebuffering turned on and paint the form using DrawImage() to copy 2 jpg images to the graphics dc (creating a splash screen). When I move other dialogs over my start page you can see a trail of dialogs lag behind (a bit). I cannot seem to get enough speed from DrawImage(). Any thoughts? Steve PS Also, is there a DrawImage() t... |
|
| How can I generate a GUID? (2 replies) |
| microsoft.public.dotnet.framework.interop |
| Hi, How can I generate a GUID? TIA Stefan |
|
| How can I generate a GUID? (2 replies, VIP) |
| microsoft.public.dotnet.framework.interop |
| Hi, How can I generate a GUID in .NET? TIA, Stefan |
|
| VSS Automation integration error (4 replies) |
| microsoft.public.dotnet.framework.interop |
| Hi, I have a compilation error with my class library. I have a reference to SourceSafe Type Library in order to give some VSS functionnality to my library and a compilation time, CSharp Compiler throw this error : Assembly generation failed Referenced assembly 'Interop.SourceSafeTypeLib 5 1' does not have a strong name My Lybrary has a strong name due to the same error in my presentation layer (VS... |
|
| embedding wrappers in primary assembly??? (2 replies, VIP) |
| microsoft.public.dotnet.framework.interop |
| Is it possible to embed all the COM wrapper classes that are generated by VS.NET into the main assembly, so your application dll/exe doesn't have to accompanied by a full company of DLLs just in order to interoperate? Is this something you have to do outside of VS.NET, if it's possible at all? Thanks for your help, Wade |
|
| Problem Consuming a COM Component (4 replies, VIP) |
| microsoft.public.dotnet.framework.interop |
| I am trying to use a COM component in a C# class. I am not able to see one of the members of an object that is available when using the object in VB6. Below is a code excerpt illustrating this case. Also, when examining the object in the debugger watch window, it says something like "... cannot display indexed type...". Any ideas as to why, or possible solutions? Begin Code Excerpt [GuidAttribute(... |
|
| IntPtr to Interface (2 replies) |
| microsoft.public.dotnet.framework.interop |
| I ahve an IntPtr which has been returned from a Marshal.QueryInterface. I wanted to know how the Interface methods can be accessed via the IntPtr. thanks |
|
| Exception in the call of the COM-object method (2 replies) |
| microsoft.public.dotnet.framework.interop |
| Hi, all. I try to write share addin dll for OUTLOOK. At the line marked "!!!" I have got break debug and return OUTLOOK but in "watch" window variable app.Session.CurrentUser.Name return "MyUserName" succesful. 1. Why program have break? 2. What exception exists? 3. Why after this break I need recompile main vb6 dll that calls this dll? Thanks all. using System; using System.Windows.Forms; namespa... |
|
| COM properties with arguments (3 replies) |
| microsoft.public.dotnet.framework.interop |
| A customer is trying to implement a COM interface in C#. The only member of the interface is a property with an argument : [propget]HRESULT CategoryTitle([in]UINT iLevel, [out, retval]BSTR *pbstrCategory); As I understand, in C#, CategoryTitle cannot be a property as it has an argument (iLevel). I was hoping that I can implement it as a "get" method with some attribute using the ComMethodType enum... |
|
| Transactions - COM+ or Managed Transaction (2 replies) |
| microsoft.public.dotnet.framework.interop |
| Hi, I am using Single database but I need to update multiple tables from with in Multiple classes but all in Single Transaction Do I need to go with COM transaction or SqlTransaction or Handle Transaction with in Stored Procedures Thanks, Krishna |
|
| Problem with Platform Invoke (2 replies) |
| microsoft.public.dotnet.framework.interop |
| Hello, Am I missing something here, or what? I try to use a function from kernel32 Whenever I use a function that doesn't return any values, no problem. If I use a function with return parameters, he gives me an NullReferenceException. I use vb, but same error when I try in c#. Anybody any idea? Code: Form: Private Sub Button3 Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handl... |
|
| Getting IServiceProvider and IHTMLEditServices from webbrowser document (2 replies) |
| microsoft.public.dotnet.framework.interop |
| How do i get IHTMLEditServices from the document? When i do these i keep getting cast exception. IHTMLEditServices serviceProvider (IHTMLEditServices ) axWebBrowser1.Document; or IServiceProvider serviceProvider (IServiceProvider) axWebBrowser1.Document; IHTMLEditServices editServices (IHTMLEditServices) serviceProvider.GetService(System.Type.GetType("IHTMLEditServices")); |
|
| ADO Recordset from C++ to C# (2 replies) |
| microsoft.public.dotnet.framework.interop |
| Hello, I have a COM object which returns an ADO recordset within a VARIANT. When making a call to this object from C# the returned VARIANT is put within a System.Object. How do I get to my ADO.Recorset in C#? I will assume Marshalling plays a role somewhere... Any help would be much appreciated. Thanks Chris. |
|
| getting IServiceProvider or IHTMLEditServices from browser document (2 replies) |
| microsoft.public.dotnet.framework.interop |
| How do i get IHTMLEditServices from the document? When i do these i keep getting cast exception. IHTMLEditServices serviceProvider (IHTMLEditServices ) axWebBrowser1.Document; or IServiceProvider serviceProvider (IServiceProvider) axWebBrowser1.Document; IHTMLEditServices editServices (IHTMLEditServices) serviceProvider.GetService(System.Type.GetType("IHTMLEditServices")); |
|