all groups > dotnet interop > february 2008
Filter by week: 1 2 3 4
Using reflection on VB6 Collections
Posted by tschulken at 2/29/2008 7:11:00 PM
I am working on a conversion project from VB6 -> .Net. The first pass
is to just convert over w/o restructuring any of the classes. For
testing of the business object classes, I am writing a .Net utlility
to instantiate the VB6 objects, use reflection on them to get their
property values. I will... more >>
Return .NET array of objects to COM
Posted by RF at 2/29/2008 4:00:03 AM
Hi,
I'm trying to create a C# dll that will return an array of objects.
SomeObj[] Func(){...}
The object in question is exposed to COM and I can create it in VB6 with no
problem.
When i look at the type library it shows me that the return type is an array
of the object in question bu... more >>
What types should I use in this COM Interface
Posted by Oolis Kraprin at 2/29/2008 12:48:14 AM
Hi, I am having to write a COM wrapper dll to enable the use of a c++
library in a c# .net app, and have a few questions regarding what
types to use in the interface.
I used to program quite a bit of COM, but a couple of years of c# .net
has made me stupid.
Anyway, I need to pass (from c# t... more >>
Browser Helper Object (BHO) in C#.
Posted by GoldTree@nospam.nospam at 2/28/2008 4:41:27 PM
Hello All!
In the project I need to use Browser Helper Object (BHO) technology to
customize the ContextMenu events in the IE.
I have successfully written all the necessary logic to implement
IObjectWithSite and other required interfaces.
How to attach to Browser Helper Object (BHO) with... more >>
Marshal::StringToHGlobalAnsi and System.AccessViolationException
Posted by Dilip at 2/27/2008 12:21:46 PM
I have cross-posted this question to 3 newsgroups since I am not sure
exactly where it belongs (and some NG's have very less activity).
Apologies in advance for this. I have set the followup to the
dotnet.framework.interop NG but feel free to chage it as appopriate.
I have a question regard... more >>
Register an assembly under HKEY_CURRENT_USER
Posted by PLS at 2/25/2008 5:15:22 PM
Does anyone know of a tool or procedure that will register an assembly
for COM Interop, just like regasm, except that it puts the generated
registry keys under HKEY_CURRENT_USER\Software\Classes?
In other words, I want to register an assembly for COM so that the
registration does not requir... more >>
Type conversion C# and Matlab
Posted by hakansilver at 2/22/2008 6:20:02 AM
Dear all,
We try to access a third party Matlab dll (which was created using Matlab
COM Builder) from C#. It works fine when using strings and one-dimensional
arrays but fails with two-dimensional arrays. We give our example of the code
below:
static void TestBasicStat()
{
... more >>
Catastrophic Failure when loading a COM component written in C#?
Posted by teetee@gmail.com at 2/21/2008 1:10:53 PM
Hello,
Does anyone know what conditions might make a COM component written
in C# to not load with a "Catastrophic Failure" error message?
The odd thing is that everything works fine as a command-line
application, but when run under ISAPI in IIS the error occurs, even
when the user IIS i... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Marshal.DestroyStructure or Marshal.FreehGlobal
Posted by john conwell at 2/21/2008 8:54:01 AM
I'm using Marshal::StructureToPtr to well...marshal a struct over to
unmanaged memory and get its pointer.
Which method should I use to destroy the memory the pointer represents?
Marshal.DestroyStructure or Marshal.FreehGlobal? Does it matter?
Thanks,
John... more >>
Redirecting sdtin, stdout, stderr from an already running process
Posted by ghandi at 2/20/2008 7:02:24 PM
I am trying to redirect stdin, stdout, stderr of a process I started
with the win32 call CreateProcessAsUser, since I couldn't find a way
to start a process with .net that used a user name and password and
didn't show any kind of window. The only way I can see to do redirect
the input and outpu... more >>
Unable to cast COM object of type 'ADODB.RecordsetClass' to class type 'System.Object[]'
Posted by Scotty at 2/20/2008 7:03:12 AM
Hi everyone,
I am using Visual Basic 2005. My project is in vb.net.
After executing a request on an Access Table, I would like to copy my
recordset into an array as such:
Dim ConnectionString As String =
"Provider=Microsoft.Jet.OLEDB.
4.0; Data Source=c:\myDataBase.mdb"
Di... more >>
marshalling a complex C function
Posted by Christoph Rupp at 2/19/2008 1:03:05 PM
Hi,
i have the following function in my C library:
ham_status_t
ham_cursor_move(ham_cursor_t *cursor, ham_key_t *key,
ham_record_t *record, ham_u32_t flags);
it's possible to call the function in 4 several ways:
ham_key_t key;
ham_record_t rec;
ham_cursor_move(cursor, NULL,... more >>
Write COM component in C# 2.0
Posted by bz at 2/18/2008 1:22:28 PM
Hi,
I need to write a COM component in C# (VS 2005)
I created the C# class library project, marked it "Make Assemble COM
visible"
I set the assembly to be signed with a key file.
The class contains a single method, as below:
namespace MyPlugin
{
public class MyClass
{
p... more >>
Error running app in production
Posted by John at 2/17/2008 1:11:17 AM
Hi
I created a setup file of my app and remotely installed it on a clients
machine. The app bombs at start-up with the error;
Error while initializing application: Retrieving the COM class factory for
component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to
the following... more >>
Interops & Install Packages
Posted by CapCity at 2/15/2008 2:24:25 PM
Hopefully I can explain this well enough, and apologize if this is a trivial
matter. I've searched and couldn't find anything.
I needed to make some changes to a dot net application (framework 2.0). The
project has references set to some DLLs that reside in a subfolder (obj) of
the project.... more >>
How to detect if file contains function DllRegisterServer???
Posted by Martin Zugec at 2/15/2008 3:53:26 AM
Hi guys,
I am trying to write small utility that will be able to show you if
specified file is COM or not (if it needs registration) or if there
are any COM files in specified directory (this is extremely useful for
deployment of applications).
Currently I am trying to achieve that by calli... more >>
Unmanaged ActiveX & Managed WinForms User Control
Posted by .Suchit at 2/13/2008 10:59:00 AM
Hello There,
I have an unmanaged ActiveX control written in MFC. And using
CWinFormsControl<> template I am using a managed WinForms User Control
contained in this ActiveX control. Now I want to marshal interface of this
outer ActiveX control into the WinForms User Control and want to be ab... more >>
Microsoft Office 2007 Primary Interop Assemblies
Posted by Jimmy B at 2/12/2008 11:24:38 PM
Hello,
I installed Microsoft Office 2007 Primary Interop Assemblies to my WinXP
and after that I launched Visual Studio 2005.
I created a project but when I tried to add references to these assemblies I
didn't
find them.
Where PIA package actually installs PIA assemblies and how can I g... more >>
Displaying a C# Dialog modally
Posted by Martin_Bürkle at 2/12/2008 8:45:17 PM
Hello NG,
I have a problem displaying a C# Dialog modally.
I have 2 VB6 Forms visible (Form A and Form B). One is opening a C#
dialog modally (Form A).
This C# Dialog is not behaving like a modal Dialog, because I can
bring the second VB6 Dialog to Front (Form B).
I Don't know what I'm doin... more >>
VB6/ VB.NET interop form from a Network drive ?
Posted by joseph.fallon@ipsi.ie at 2/11/2008 8:05:42 AM
Hi,
We are moving a VB6 app to .NET form by form.
In the past for our VB6 app we installed the necessary ocx's, dll's
etc on the client
PC but kept the main exe on a network folder. To release a new version
of the application we could just replace the exe file on the network
instead of doi... more >>
Array of Structures
Posted by DLI at 2/8/2008 1:10:06 PM
I have to port some VBA Code to VB DotNet
The following code block defines several types in VBA.
Public Type ProbParamKind
Na As Long
Nc As Long
Nstep As Long
MaxCycles As Long
AxialPts As Long
End Type
Public Type RunOptKind
KeyProdID As Long... more >>
C# COM component deplyment issue
Posted by Mike Towers at 2/8/2008 10:09:05 AM
Hi,
I have written a C# COM component which I am using via a VB6 application.
Everything seems to work just fine on my local machine but when I try to use
the component and VB app on another machine I can't seem to make it work.
The process I used to create the component is :
1. Create... more >>
Outlook 2003 primary interop advise
Posted by John at 2/5/2008 3:19:52 PM
Hi
I need to develop for Outlook 2003 and upwards in my app.
1. If I develop for OL2003 would it be compatible (as far as email sending)
with later OL versions?
2. I am familiar with OL programming in VB6/VBA but unfamiliar with how to
use OL2003 Interop Assemblies. Is there a link that... more >>
I'm calling Marshal.ReleaseComObject but com objects are still leaking. How to properly release MODI.Document??
Posted by DR at 2/5/2008 2:22:23 PM
I'm calling Marshal.ReleaseComObject but com objects are still leaking. How
to properly release MODI.Document??
private void Form1_Load(object sender, EventArgs e)
{
for (int i = 0; i < 1000000; i++)
{
MODI.Document miDoc = new MODI.Do... more >>
Interop Assemblies for Outlook 2000
Posted by John at 2/4/2008 6:51:38 PM
Hi
I am aware that there are no Primary Interop Assemblies for Outlook 2000 but
I would like to aim for the lowest common denominator for maximum
compatibility. I can not use late binding as I am using With Events. I am
also slightly tied from creating outlook 2000 assemblies myself as I am... more >>
An attempt was made to load a program with an incorrect format.
Posted by William McIlroy at 2/2/2008 12:18:01 PM
The following code works fine under Windows XP 32-bit. Under Windows Vista
64-bit I am informed that something attempted to load an incorrectly
formatted program. I would guess that, when translated from the Microsoft,
means an exception was raised when the transition from managed to unmanag... more >>
Adding Separators to Word Menu System
Posted by HaySeed at 2/1/2008 1:57:12 PM
I'm using C# to automate a Word session. Atthe start of the session I build
a custome set of menu items under the "Tools" CommandBar.
2 Questions:
1) How do I add a menu Separator into my custom menus
2) How Do I add a new Item to the top menu Command Bar.
(When I try wordApp.CommandB... more >>
Problem using c++ dll in C# app for WM 5.0
Posted by jbsp72@gmail.com at 2/1/2008 3:18:14 AM
Hi All,
I want to use functions in a c++ dll file in my c#
application which i am developing for Windows Mobile 5.0.
I used runtime.interopservices and dllimport for this
purpose. When i run the application i get a Missingmethod exception
saying that cant find an entry ... more >>
|