| Getting URL of an instance of IE (2 replies) |
| microsoft.public.dotnet.framework.interop |
| I am trying to get the URL from a given instance of Internet Explorer. Preferably using C# but whatever works. I can get the title and handles of each instance but dont' know how to get the URL of any given instance. I would GREATLY appreciate an example/clue/etc. I am on my last nerve over this :) Thanks for your time, Jim |
|
| VB Com DLL Interop (Structure - Type) (4 replies) |
| microsoft.public.dotnet.framework.interop |
| I am writing a .Net application in C# that requires the use of an existing COM dll written in VB. I have created an Interop assembly for the dll. One of the methods of the VB dll has a ByRef member of a VB Type (struct1). One of the members of the Type is an array of another Type (struct2). The Type (struct2) has an array of another VB Type (struct3). All tree Types are defined in the VB dll, and ... |
|
| Using Excel from C# (4 replies) |
| microsoft.public.dotnet.framework.interop |
| I have a programme that needs to create and print a graph. I thought about using Excel via C# to do this. The data is being collected via C#. Is this kind of thing possible? Does Excel actually have to run? |
|
| Web Service - COM Interop Problem? (2 replies) |
| microsoft.public.dotnet.framework.interop |
| I'm trying to create a web service out of an existing (ATL C ) COM component. I ran the tlbimp tool to create a run time callable wrapper DLL. As a baby step, I created a very simple managed C client (console application) to test out the use of the wrapper DLL. It simply created the wrapper object and called a method, something like: COCRClass* pOCR new COCRClass(); pOCR ProcessImage(); Everything... |
|
| how to write this code in c# ? (5 replies) |
| microsoft.public.dotnet.framework.interop |
| in my vc program, i have these code snip: unsigned char temp; char msg[252]; temp 0x80; memcpy(msg,&temp,1); temp strlen("hello,world!"); memcpy(msg 1,&temp,1); how should i write these code in c# ? |
|
| Excel interop. Invalid type library error on Visible = true; (2 replies) |
| microsoft.public.dotnet.framework.interop |
| Hi. I can not to run standard MS example file://C:\Program Files\Microsoft.NET\FrameworkSDK\Samples\Technologies\Interop\Applications\O ffice\Excel\Readme.htm Excel.Application app new Excel.Application(); app.Visible true; on the "app.Visible true" row I got errror System.Runtime.InteropServices.COMException (0x80028018): Old format or invalid type library. The same example just for Word working ... |
|
| PInvoke function's return value (3 replies) |
| microsoft.public.dotnet.framework.interop |
| I have a c function in my msgApi.dll like this: int SendMsg (int needreply,char *msgcontent,char msgid[10],int *errcode) i call this function in vc use this: char msgid[10]; int errcode; int intRtn SMGPSendSingle (1, "hello", msgid, &errcode) AfxMessageBox(msgid); then i can send my "hello" message and get the return msgid like this '2322264843' now i want to use this function in a PInvoke/DllImpo... |
|
| Emulating a COM out-of-process singleton object (4 replies) |
| microsoft.public.dotnet.framework.interop |
| I have a design pattern I want to implement using .NET. I have multiple applications that I want to access a single instance of an object, but this object must persist independently of the applications and be accessible across process boundaries. For example, I want: a) application A to run (in process A), obtain a reference to my object, and set some properties on it; b) application B to run (in ... |
|
| Legacy dll interoperability problem (2 replies) |
| microsoft.public.dotnet.framework.interop |
| Hello, I write program which uses some functions from legacy dll written in Delphi. The problem is that Delphi have type "shortstring" which is very specific for this language and I can't marshal this type. Pascal code: .... type TDLLIn record ..... Typekey: shortstring; end; function Init(dllIn: TDLLIn): integer; begin ..... end; C# code: public struct TDLLIn { ..... [MarshalAs(UnmanagedType.Ansi... |
|
| Using a secondary COM interface from VB.NET (2 replies) |
| microsoft.public.dotnet.framework.interop |
| I am attempting to use a COM class in VB.NET that implements another COM interface class. myLibrary.BankComm implements class myInterfaces.IBankComm2 in VB6, so in VB6 I can use it as follows: Dim objX as myInterfaces.IBankComm2 Set objX new myLibrary.BankComm Now, in VB.NET, I added a reference to myLibrary, which also added myInterfaces to the references. This simple project compiles fine, the V... |
|
| IPicture object (2 replies) |
| microsoft.public.dotnet.framework.interop |
| I have an COM object that I'm referencing through interop. One of its methods returns an IPicture object which is a graphic image. How can I reference this object to extract the image? I can use the Image.FromHandle() method to create an image object if only I could get to the HBITMAP that belongs to the IPicture. Can this be done? |
|
| Marshaling arrays of single values (2 replies) |
| microsoft.public.dotnet.framework.interop |
| I have a com object that has a DLL function that accepts a parameter that is an array of single values. How do I properly wirte the declare for the function so theat the array is passed properly? Here is the old VB6 declaration Declare Function PEvset Lib "PEGRP32B.DLL" (ByVal hObject&, ByVal nProperty&, lpvData As Any, ByVal nItems&) As Long And it was called in this manner. result& PEvset(Pego1,... |
|
| Interop bug! Can execute a dts package from c# win form, but CANNOT execute the same dts from asp.net page. (3 replies) |
| microsoft.public.dotnet.framework.interop |
| This is a really strange problem I am having. I have threee projects in my solution. (1) c# web application (has a reference to the c# class library) (2) c# class library (you can see the code at http://www.sqldev.net/dts/ExecutePackage.htm#Visual%20Csharp (3) c# windows form (has a reference to the c# class library) My c# windows form is VERY simple, just a button with onclick that does: private ... |
|
| (C)API problem C# dotnet (2 replies) |
| microsoft.public.dotnet.framework.interop |
| Hi All, I am trying to migrate old VB6 code to C#. It's function is to monitor CAPI events on my ISDN device. Everything works fine in the old environment. Using dotnet however I encounter strange behaviour. Everything runs fine until the line ' RtlMoveMemory(ref stuMessageHeader, intCapiBufferPointer, 8); '. When this line is executed the subsequent lines are not executed and the form comes back.... |
|
| QueriService How to (2 replies) |
| microsoft.public.dotnet.framework.interop |
| I need to do the following: QueryService the IInternetProtocolSink for IHttpNegotiate in C#. Basically I need to translate this code to C#: IHttpNegotiate *pHttpNeg; hr IUnknown QueryService(pIProtSink, IID IHttpNegotiate, IID IHttpNegotiate, (void**)&pHttpNeg); if(SUCCEEDED(hr)) { LPWSTR pwzAddHeaders NULL; hr pHttpNeg BeginningTransaction(szUrl, NULL, NULL, &pwzAddHeaders); pHttpNeg Release(); }... |
|
| Interop and Overloads (3 replies) |
| microsoft.public.dotnet.framework.interop |
| Hi, I m trying to create a .Net dll that is being called from traditional ASP page. I have an interface that defines the following functions: InterfaceType(ComInterfaceType.InterfaceIsDual) Public Interface NetAD Function Test() As String Function Test(ByVal formatting As Xml.Formatting) As Xml.XmlDocument End Interface I then implements the functions: Overloads Function Test(ByVal formatting As X... |
|
| Can not marshal field frame of type WuappTest.Transaction: This type can not be (2 replies) |
| microsoft.public.dotnet.framework.interop |
| Hi I have problems with marshalling a struct. I have no idea of whats wrong with my code(But I think it is the char array or how I call the method in a dll). I Get the following message: "Can not marshal field frame of type Test.Transaction: This type can not be marshaled as a structure field" My code: StructLayout(LayoutKind.Sequential) Public Structure Transaction Public tid As Short Dim frame A... |
|
| StructLayoutAttribute.Pack (3 replies) |
| microsoft.public.dotnet.framework.interop |
| Hi Everybody, the doc says the default value for the StructLayoutAttribute.Pack is 8. This can't be true. What is the real default pack value if only LayouKind.Sequential is specified? Thanks, Paul |
|
| Serial IO with C# ? (3 replies) |
| microsoft.public.dotnet.framework.interop |
| Does anyone know if you can use Serial IO with C#? I have tried several things from using the System.IO.FileStream object to using plain old DllImport. The problem is that C# doesn't support bit fields. How do I pass a structure to an API call that requires a bit field when C# doesn't support it. Is there another way to do this? Does anyone know? Is this the right group to talk to? |
|
| Importing Data from Excel 2000 (3 replies) |
| microsoft.public.dotnet.framework.interop |
| Hi, I've developped an application which imports some data cells from excel. In Win XP and Excel XP it works pretty good, but in a Win98 Excel 2000 system it does'nt. The error exception I get is: Exception Details: System.Runtime.InteropServices.COMException: COM object with CLSID {00024500 0000 0000 C000 000000000046} is either not valid or not registered. How can I solve this problem? Any ideas... |
|
| COM+ stalls invoking method on ServicedComponent derrivative (2 replies) |
| microsoft.public.dotnet.framework.interop |
| iH: I have created a COM component by derriving from ServicedComponent. Everything works just fine until I switch the COM application from Activation type Library to Activation type Server. When running as a Server application, COM stalls periodically on some method invocations. Some invocations take as long as 5 minutes. During a stall, none of my components are 'in call' (as viewed through the M... |
|
| Strong name for Interop.VBA (2 replies) |
| microsoft.public.dotnet.framework.interop |
| My ASP.NET app is using a VB6 component. Interop.VBA.dll was created automatically for this. My app uses ServicedComponent, so I've done the usual regarding a strong name for this. When I try to build I get the following error: Unable to emit assembly: Referenced assembly 'Interop.VBA' does not have a strong name. I don't know how to provide a strong name for this Interop.VBA. Any help would be mu... |
|
| question about my struct define (2 replies) |
| microsoft.public.dotnet.framework.interop |
| this is my struct in c struct Resp Msg Info{ char msgid[20]; unsigned char msgformat; unsigned char isreport; char msgcontent[50]; }; then how i define this in c#? i define like this: struct Resp Msg Info{ string msgid; string msgformat; string isreport; string msgcontent[50]; }; but it not work , how to define this? |
|
| Interop Mysteries... (4 replies) |
| microsoft.public.dotnet.framework.interop |
| I've been working on an explorer shell extension. It works with a few caveats... Here's the relevant code that i'm having some questions about: void IShellExtInit.Initialize(IntPtr pidlFolder, IDataObject dob, uint hKeyProgID) { FORMATETC fmt new FORMATETC(); fmt.cfFormat CLIPFORMAT.CF HDROP; fmt.ptd 0; fmt.dwAspect DVASPECT.DVASPECT CONTENT; fmt.lindex 1; fmt.tymed TYMED.TYMED HGLOBAL; STGMEDIUM ... |
|
| Marshal.StringToHGlobalAnsi (4 replies) |
| microsoft.public.dotnet.framework.interop |
| This is part of the code used to load text into mshtml: UCOMIStream stream null; CreateStreamOnHGlobal(Marshal.StringToHGobalAnsi(sDocument),true,out stream); Here, sDocument is an HTML string. On WinXP it works great. It works great on Win98 too but only if I prepare it with: sDocument sDocument "\0" Otherwise, random chars (sometimes) get added to the text in mshtml. Somehow, I'd expected the St... |
|