all groups > dotnet interop > may 2006
Filter by week: 1 2 3 4 5
COM object and COM server
Posted by juergen at 5/31/2006 2:15:57 PM
hello everyone,
I have a COM server running.
To communicate with that server I have to run a windows forms application
with the MTAThread attribute.
To communicate with that server I have to run a COM object with ????
My COM object is a taskbar Deskband. I tried to set the ThreadingModel... more >>
C# question: dealing with unsigned char* from C++ .lib
Posted by Stephen Cawood at 5/31/2006 1:57:57 AM
I'm trying to access a C++ .lib from C#.
I have a working wrapper DLL (I can get back simple things like int), but
I'm having issues dealing with complex data types.
For example, the .lib contains this function:
int create(int id, int scale, unsigned char *image);
In the wrapper DLL I h... more >>
Binary Behaviors and .Net
Posted by Peter Kenyon at 5/31/2006 12:00:00 AM
Hi,
I have been trying to implement a binary behavior in c#, to display my own
custom tag in a WebBrowser control. My behavior is being successfully
instantiated (all methods in IBinaryBehavior are being called), however
nothing further happens once IHTMLPainter.GetPainterInfo returns.
IH... more >>
Accessing embedded resources in .NET DLL through COM
Posted by hoptoit at 5/30/2006 4:06:59 PM
I am writing a class library in VS .NET 2005 (VB.NET specifically) that will
be called from an existing program (that I have no control over) using COM.
One of the parameters it expects is the index of an icon embedded in the
DLL. The catch is that other than a default icon that seems to be i... more >>
Interop class works from winforms but not asp.net
Posted by Dan English at 5/30/2006 12:08:19 PM
Hi, I have an interop class that works from winforms but not asp.net 2.0 c#
app. At runtime I get a nasty 0x0eedfade error just creating the class.
I've tried lots of things but nothing helps. Can anyone give me some
suggestions?
Thanks in advace,
Dan
... more >>
Regasm on PIA exposes interop components to COM?
Posted by Holger Grund at 5/30/2006 12:00:00 AM
I'm trying to create the setup MSI for a PIA. Therefore I've
extracted the registry information via regasm /regfile.
Surprisingly, I got a whole lot entries
HKEY_CLASSES_ROOT\Record
with
@Class=<.NET Type name>
@Assembly=<AssemblyIdentity>
@RuntimeVersion=<RuntimeVersion>
I don't see a... more >>
Difference between "Make Assembly COM-Visible" and "Register for COM Interop"?
Posted by Joseph Geretz at 5/29/2006 1:15:33 PM
I'm developing a .NET class library. I want this to be callable by VB6 (COM
/ ActiveX) clients. In Project Properties, under Application | Assembly
Information, I see an option titled "Make Assembly COM-Visible". How does
this differ from "Register for COM Interop" in the Output section of the... more >>
c# pinvoke string marshaling question
Posted by scott mcfadden at 5/29/2006 11:45:43 AM
What is the correct c# method declaration for the following c++ method
defined in an external DLL? Note, this method allocates its own memory
rather than having the caller allocate memory. I can make it work by
forcing my managed code to allocate the memory by passing in a StringBuilder
b... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Word 2007 Application Call Problem
Posted by Simon Richardson at 5/28/2006 2:09:01 PM
I have always used the CreateObject("word.application") to call word
automatically from my applications but it doesn't seem to be working with
Word 2007.
My code is:-
Dim WordApp As Object
Dim WordDoc As Object
Dim WdRead As Boolean = False
WordApp = Create... more >>
How to create registered COM Interface (not a class) ?
Posted by Dule at 5/26/2006 5:09:43 PM
Hi all,
How can I create a visible COM interface? For i.e., I have my interface
IUserList : IList , and the the COM class Users : IUserList. Now I want to
have IUserList in my COM application, so I can implement it with some other
classes (my goal is just to have interface, so I don't have ... more >>
Seeking Advice for Inter-Application Communication (VB6 to C#)
Posted by Joseph Geretz at 5/26/2006 11:57:55 AM
I need to communicate between two applications. The legacy application is in
VB6. New development is in C#. Here's the scenario:
The VB6 app will be pumping document files into a folder. We'll be writing a
new (C#) class for this new feature.
The C# Application (as distinct from the file p... more >>
Tool Help API and interop (C#)
Posted by ziphnor NO[at]SPAM gmail.com at 5/26/2006 2:06:45 AM
Hi,
I am trying to call the Tool Help API (
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/perfmon/base/tool_help_functions.asp
) from C# using interop.
I have declared:
[DllImport("Kernel32.dll")]
private static extern IntPtr CreateToolhelp32Snapshot(UI... more >>
how to use a C# control in VB ???
Posted by SenthilVel at 5/26/2006 12:00:00 AM
Hi all
i have created a new c# custom control .
if i want to use this control to my VB projects , what are the steps i must
do ?
can anyone let me know what are the things i must do step by step ?
Thanks
Senthil
... more >>
Questions about VB6 Collections
Posted by DreamTribe at 5/25/2006 7:52:00 PM
A few questions.. Any help would be appreciated..
1. Is Microsoft.VisualBasic.Collection or VBA.Collection (from
msvbvm60.dll) compatible with VB 6 Collections?
2. How would I use VBA.Collection inside c#?
If I do this: (assuming Car class is defined elsewhere)
public class RunThis
... more >>
QueryInterface for interface * failed. (Using COM Interop dll in web application)
Posted by Vasil Buraliev at 5/25/2006 4:57:06 PM
Hi everyone...
I'm faceing a problem that I want to shae with you and I'm hoping that
somebody will give write solution.
I wrote a COM dll in Visual C++ 6.0 and MFC that generates some report. I'm
using Visual Studio (ver. 2003) to create interop for COM dll cause I want
to use in a web pr... more >>
Two C# DLL's (one dependent on other) not working in VB6.
Posted by Tom at 5/25/2006 4:47:59 PM
I have a C# DLL which is set as COM Interop, has a GUID set, has an
interface with a GUID set, the interface is set as the default, and has a
strong name key associated... all the things that mean it will work
correctly with VB6. (Including registering using "regasm <dllname>
/codebase")
... more >>
Suggested C# Excel Add-In Architecture
Posted by mwieder NO[at]SPAM gmail.com at 5/25/2006 8:54:35 AM
We are writing an Excel Add-In in C# that is a combination of our
custom Excel functions and dialogs to support those functions which
connect and retrieve data from our back end database. We need:
1) The functions to be usable as worksheet functions
2) A double click on a cell with one of our f... more >>
Turn off Link resolution?
Posted by Marc Miller at 5/25/2006 8:24:54 AM
I'm programming Excel from VB.NET, so maybe I don't know how to
express my problem correctly. Forgive me.
I need to programmatically update links in cells that refer to workbooks
on a network share. However, the share in the update does not yet
exist. I can successfully update a link howeve... more >>
Passing byte[] parameter (c#) as unsigned char* (C++) into interop function
Posted by harishashim NO[at]SPAM gmail.com at 5/25/2006 3:40:11 AM
Hello all.. will appreciate all the help I can get here.... thanks in
advance.
I am using one C++ COM dll under interop in C#. Since this lib is not
supposed to be run in C# I really have no venue for support. And I have
no control on the C++ dll side.
This is the C++ function protype I d... more >>
COM Interop Problems
Posted by gaetanog at 5/25/2006 3:31:01 AM
Hi everyone..
I need to create a control and a separate class for a VB6 app. using C#
2005. I need to use some textboxes, buttons and other standard controls in
System.Windows.Form. I need to link other C# assemblies not usable for COM
(ex. i need to use a separate assemblies to access a d... more >>
Legality of using tlbimp and strong name on third-party COM objects
Posted by Boris Zakharin at 5/24/2006 2:09:59 PM
Are there legal issues with using tlbimp to generate COM wrappers for
third-party redistributable (free or licensed) COM objects as part of a
commercial application? Also, is it legal to strong-name sign them with a
local key pair to enable putting them in the GAC? Some training material
seems t... more >>
Help adding reference to Microsoft.Office.Core
Posted by Michael Russell at 5/24/2006 12:49:20 PM
Using C#, I've created a simple wrapper class for using Excel. I have
Office Pro 2003 installed on my devel machine. The wrapper class works
great, reading and writing to/from Excel. To do this, I created a
reference to "Microsoft Excel 11.0 Object Library", and have a "using
Excel;" dire... more >>
In/Out strings and explicit P/Invoke
Posted by chris_nusca NO[at]SPAM hotmail.com at 5/24/2006 12:29:45 PM
Hi.
My apologies if this question is trivial, I couldn't find the answers
on MDSN and it's the first time I've worked with input/output strings
across explicit P/Invoke.
My question is about memory management of input/output strings using
explicit P/Invoke.
Basically I send a fixed-size ... more >>
Using in-memory interfaces for images in Browser Control?
Posted by BrianGenisio NO[at]SPAM gmail.com at 5/23/2006 5:31:55 AM
Hello all,
Suppose I am using the browser control in my application to display my
own HTML code. Now, suppose I want to show images on the page that I
currently have in memory.
One way to do this is to write the image to the file system...
presumably the temp space... and then grab the IHt... more >>
Write COM Object in C#
Posted by MR at 5/22/2006 8:39:27 PM
i am developing a client C# application that utilized a legacy COM object.
For development, I cannot use the object because it has specific hardware
requirements. Therefore i would like to write a stub or "emulator" for this
COM object, preferably i C# but C++ or VB.NET would work too.
The i... more >>
what is wrong with my interop code
Posted by gs at 5/22/2006 6:26:04 PM
I am using the visual studio express 2005's setting of "register com
interop". does the proper job of registering my Classslib as useable by
native(unmanaged) com consumer?
Can any one confirm one way or another?
using the com interface from unmanaged application, I don't have any problem... more >>
EnterpriseService Componet on remote server
Posted by John Lee at 5/22/2006 5:34:01 PM
Hi,
What is the right way to deploy servicedcomponent on remote server?
Here is what i did and it failed to work - I tested the DCOM with VB
component to make sure the communication between two servers worked.
1. created a library project, created a class TestCom inherited from
Serviced... more >>
ReleaseComObject in a loop
Posted by Srini at 5/22/2006 3:12:13 PM
If I create several COM objects in a loop but point to the same variable, do
I need to clean up each object or only one at the end. It works both ways
but I am not sure if the first method actually cleans up all resources.
Here is what I mean (to be more specific, the COMObject is a Mappoint
Lo... more >>
ActiveX can't create object with C#
Posted by Steve at 5/22/2006 12:42:02 PM
Hi!, I have a rare problem. I developed a DLL in C# that i'm using in a vb6
proyect.
The problem is that if I instance a class using New works fine. But if I use
createobject, VB tell me "Active can't create object"'. And I need use this
dll in ASP, so, I must use createobject...
Set Actio... more >>
Excel selects wrong .NET runtime
Posted by kh at 5/21/2006 5:08:41 PM
Hi. I have developed a very basic .NET 2.0 CCW for use from Excel. My dev box
has both 2.0 and 1.1 installed. MSDN docs tell me Excel will use the latest
..NET version by default, but using fuslogvw.exe I can confirm that Excel is
in fact attempting to run my component using .NET 1.1.
How ... more >>
App crash while handling unmanaged callback functions
Posted by Sushrut at 5/20/2006 10:39:01 PM
Hi,
I have to handle unmanaged callback functions in my C# code. I am doing it
using delegates. I get the callback from the unmanaged code correctly with
valid data, but as soon as my managed (C#) callback handling method returns,
the app crashes. I suspected that this could be due to garbage... more >>
Copy User Settings & Profiles - XP Home SP2 Help is USELESS
Posted by tankboy at 5/20/2006 12:59:02 PM
I set up my mom's login, installed her programs and games, created folders,
cleaned up and neatened the folder's and icon's appearances, and organized
the desktop. Dad's login is going to be 95% similar. Is there anyway to copy
all those settings to his login without having to repeat myself? T... more >>
Screen flashes when windows form is unloaded?
Posted by TCook at 5/19/2006 1:23:36 PM
Hey All,
I have a VS2003, C# addin for MS Word 2003. When the windows form unloads,
the screen flashes. I've never seen this behavior before. Usually, the
unloading of a form is very smooth.
I was wondering if anyone else has experienced this and, if so, if you were
able to resolve it... more >>
HtmlEditor update
Posted by Tim Anderson at 5/19/2006 1:01:50 PM
I've posted an update to the HtmlEditor - hosts Msthml in C#. I've removed
the dependency on Microsoft.mshtml. See here:
http://www.itwriting.com/htmleditor
It would be nice to be able to use the DOM in System.Windows.Forms with the
control. You can easily get the unmanaged DomDocument fro... more >>
.NET-COM : QI works but method invocation fails
Posted by julio at 5/17/2006 7:14:01 PM
Hello,
I'm accessing a COM object from C#. The COM object is running in a separate
process.
From C# I can QI for IY, but any method on IY that I try to call fails with
InteropServices.COMException. The error states that the method returned
E_FAIL.
I have attached in a separate debugge... more >>
PInvoke of callback returns error (.NET 2.0, C#)
Posted by t.dasch NO[at]SPAM sciencescholars.net at 5/17/2006 7:56:47 AM
Hi,
I am trying to P/Invoke a DLL containing C-API having a C-function
pointer as callback.
I tried to write my P/Invoke (see below) but when I run the
application, I
get an exception when the "myCallback" method should be called.
The exception has the following message: Attempted to rea... more >>
tlbimp problem ?
Posted by magne at 5/16/2006 11:48:35 PM
Using Visual Studio 2005 with WinFx CTP february added to it.
Adding a reference to a dll file (type library).
When using OleView/File/View TypeLib I get something like:
:
[
odl,
uuid(some guid),
helpstring("IEnumEntity Interface"),
hidden,
custom(some other guid, committed)
... more >>
Windowless ActiveX controls are not supported
Posted by Alfredo Delgadillo at 5/16/2006 1:07:02 PM
Hi everybody,
I using VS.NET 2005 Pro to develop win form application and I need include
an activex control to show information, this works good In developing time
but after deploy doesn't work it, I try to running in a clean machine with
framework 2.0 installed
I found this error 'Unabl... more >>
Can unmanged code corrupt dot net
Posted by Jrax at 5/16/2006 1:07:01 PM
Hi,
If a dot net app calls unmanaged code can that unmanaged code corrupt the
dot net app. I'm thinking about a lang using pointers.
If yes, are there any good debugging techniques to catch this?
Thanx
jra... more >>
.NET COM latebinding
Posted by MikeM at 5/16/2006 10:31:51 AM
I'm facing a problem where I'm trying to use a new .NET app to access
some old VB6 ActiveX exes. The ActiveX exes implement a (base) COM dll
and use an exposed method from that COM dll to do some work. Here is
what I got from the OLE viewer
pcIEBase has a public function Export
interface _cls... more >>
Detailed info for running Process
Posted by Kevin Hector at 5/16/2006 3:41:02 AM
hi. we are having problems with hung processes on a production box onto which
i cannot install any 3rd paty software (e.g. sysinternals). the hung process
will be one of many scheduled tasks all executing as svchost. i would like to
find out which of these tasks is hanging without stopping the... more >>
.NET interop and using remoting
Posted by Josh Bernard at 5/15/2006 11:14:02 AM
Im having some problems getting my .net assembly to work correctly through a
CCW. In the initial release I did not have to use remoting and it was very
simple to get it working under VB6. Now I must use remoting to access a data
provider and Im seeing weird things happen.
I developed and te... more >>
VS2003, VS2005 and AddIn not Being Loaded
Posted by TCook at 5/14/2006 3:00:27 PM
Hello All,
I have both VS2003 & VS2005 installed. I am trying to edit an MS Word AddIn
built in VS2003. I have added the winword.exe.config file which allows the
addin to launch MS Word without crashing when running inside of VS2003.
However, my code isn't being hit. I have put breakpoi... more >>
Creating Excel Application Object in C#?
Posted by SixSigmaGuy at 5/14/2006 2:37:02 PM
Can someone tell me how to create an Excel Application object in C#? I can
create a Word and PowerPoint Application object, but when I try to create one
for Excel, I get the build error:
"Cannot create an instance of the abstract class or interface 'interface'"
After adding the appropriat... more >>
VS2003 & VS2005 Side-by-Side Issues
Posted by TCook at 5/13/2006 5:46:05 PM
Hey All,
I have a Word 2003 addin that was created under VS2003. I recently
installed VS2005 on my machine.
When I try to run the addin inside of VS2003, it just launches Word and
crashes it.
I've seen some articles about creating .config files containing the
following:
<configura... more >>
.NET and COM interop. VS2003 & VS2005 difference.
Posted by Piotr Czekalski at 5/13/2006 2:28:01 PM
Hello there,
I've implemented a simple .NET component exposed to COM (through CCW I
guess) the point is that exactly the same code compiled using 1.1 Framework
works perfect with Excel VBA, while recompiled on 2.0 Framework causes
"File or assembly name <xxx>, or one of its dependencies, wa... more >>
Struct to byte ?
Posted by wavemill at 5/12/2006 1:01:02 PM
Hello,
this my problem:
I have a struc, but i would like to know how can i do to convert it in byte.
This is my code:
[DllImport("winspool.drv", EntryPoint = "AddMonitor")]
public static extern int AddMonitorA(string pName, int Level, ref byte
pMonitors);
[StructLayout(Layout... more >>
using a VC++ DLL function in a C# ASP.NET webservice
Posted by ConfNoob at 5/11/2006 10:13:13 PM
my webservice is using a WIN32 DLL which has a function within a Class.
i am putting in the DLL IMPORT and specifying the entrypoint in the
webservice..
however the Webservice always seems to NOT receive the value from the
WIN32 DLL function.
i realised it might be because of the fact tha... more >>
Referenced assembly 'interop.WbemScripting' doesn't have a strong
Posted by ShrimpBoy at 5/11/2006 7:21:02 AM
Hi!
I'm using a Strong Name Key to create our assemblies, this key has the Full
Trust security so we can use those "mini tools" from network drives...
I'm trying to use WMI to get access to data in our SMS Server...
Now, when I tried to create my assembly I got this message...
"Unable ... more >>
passing AddressOf value in params array
Posted by yoga weazel at 5/11/2006 6:07:03 AM
Anyone know of a way to pass the Addressof <methodname> value in an Object
array to ConstructorInfo.Invoke or Activator.CreateInstance as a parameter?
Such as:
Dim info As ConstructorInfo = ObjType.GetType().GetConstructors()(0)
Dim params() As Object
ReDim params(0)
params(0) = Addressof... more >>
|