all groups > dotnet interop > june 2005
Filter by week: 1 2 3 4 5
Office XP PIA
Posted by Rich B at 6/30/2005 2:24:01 AM
Hi,
I can't get the interop for Excel to work: I've installed the PIAs and
reinstalled, removed office 2K and reinstalled, but to no avail.
Every time I add a reference to Excel in my project, the path shows
that the gac version isn't being used.
Any ideas on where I go from here?
Richar... more >>
P/Invoked OpenPrinter fails when opening network printer
Posted by Marek at 6/29/2005 2:41:04 PM
I have local printer connected to PC_1 (lpt/usb). It’s shared (no pwd, ACL
for printing is set to Everyone). I want to print data from PC_2, via
\\PC_1\<printerName>.
OpenPrinter and StartDocPrinter fail with GetLastError == 997
(ERROR_IO_PENDING - Overlapped I/O operation is in progres... more >>
Com Interop overhead
Posted by Steve Long at 6/29/2005 10:03:29 AM
Hello,
I was just wondering if someone could chime in on a design issue. If I write
a class and make the class COM visible by using the ClassInterfaceAttribute
and giving it a Guid and checking the Register for COM interop option in the
project property pages, can I also use this class in .NET w... more >>
Unmanaged DLL lifetime
Posted by Bruce Parker at 6/29/2005 8:46:14 AM
When a managed DLL makes a call to an unmanaged DLL what controls the
lifetime of the unmanaged DLL? I am assuming when I make the first call to
an unmanaged DLL, the unmanaged DLL is loaded into memory and stays in memory
(meaning global variables are maintained). How does to unmanaged DLL ... more >>
Call dotnet component from COM
Posted by Suresh at 6/29/2005 8:29:07 AM
How do I call a dotnet component from a VB com component.... more >>
Office PIA:s. Can they be made to work properly?
Posted by KennethBohman at 6/29/2005 5:05:02 AM
Hi everybody,
I mentioned some time ago that an application getting data from an Excel
spreadsheet, stopped reading the spreadsheet after the client upgraded from
Office XP to Office 2003. Well, I thought it still would do, but although
confirmed in this forum that apparently remained unkno... more >>
ROT
Posted by trinitypete at 6/29/2005 2:43:06 AM
Hi all,
We use a Microsoft Business Solutions Application - Great Plains. This has a
proprietary language for development - Dexterity/Sanscript.
From Sanscript we can register a call back as an object on the ROT.
From C# I can get access to the running object (Marshal.GetActiveObject) but... more >>
Managed C++ equivalent for Foo([in] VARIANT_BOOL b, [out, retval] VARIANT *ptr)
Posted by Boris at 6/29/2005 12:00:00 AM
I have an interface in Managed C++ where one of the methods is this one:
Object *Foo(Boolean *b)
When I use tlbexp to check the IDL the line above is converted to:
HRESULT Foo([in, out] VARIANT_BOOL *b, [out, retval] VARIANT *ptr)
However I need:
HRESULT Foo([in] VARIANT_BOOL b, [out,... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Is OleInitialize required in this case
Posted by **Developer** at 6/28/2005 4:28:22 PM
You must initialize Component Object Model (COM) with CoInitialize or
OleInitialize prior to calling SHGetFileInfo
This statement appears in the Help at location Window Shell and Control.
Does it apply for DotNet VB?
I'm using SHGetFileInfo without initialize and it appears to be wo... more >>
How to correctly set a conformant array argument if a function of an interface is implemented?
Posted by Michael Kremser at 6/27/2005 11:28:36 PM
Hi NG!
I have a class that derives of an interface (IASysCls) which implements
a function with this argument list (the function is then later be called
by a caller):
public void GetSObjDesc(int Start, int Size, out int Length, out Lib.SOD
ODs)
In the IDL file I found this:
HRESULT ... more >>
how to Invoke Static .Net Members from COM application
Posted by mohammad via DotNetMonster.com at 6/27/2005 8:41:50 PM
Hi,
I am trying to use my .Net component from COM application.
I have some static members in my .Net component.
I tried to use reflection to invoke static members.
Any body has example of invoking static members?
Thanks
Mohammad
namespace Mcc.TestAutomation.Utilities
{
public class... more >>
reflection with com
Posted by alexk at 6/27/2005 9:07:21 AM
Hi,
Is reflection (e.g. GetField) is possible on a __ComObject ?
10x, Alex.
... more >>
Marshaling of nested structures
Posted by Luigi at 6/25/2005 2:06:01 AM
I have an ActiveX DLL written in VB6. This library has a class with two
public structures like these
Public Type MyInnerPublicType
...
End Type
Public Type MyPublicType
...
aField(7) as MyInnerPublicType
...
End Type
The same public class as a method like this
P... more >>
impersonation and Excel
Posted by zino at 6/24/2005 1:14:04 PM
on window 2000, I'm automating Excel (server side).
If I set the impersonation in the webConfig file as:
<authentication mode="Windows" />
<identity impersonate="true" userName="myDomain\myUserID"
password="myPassword" />
and run this code :
Dim xl As Object
xl =... more >>
VB6 types marshaling
Posted by Luigi at 6/24/2005 2:59:01 AM
Hi all
I have a COM DLL written in VB6 that exposes a public class with a method
that can be summarized as follow
public function MyPublicMethod(...) as Variant
...
MyPublicMethod = AnotherMethod(...)
...
end function
AnotherMethod is a function that returns a user defined... more >>
calling com+ objects from clients
Posted by volkan at 6/24/2005 12:00:00 AM
H all...
I created a com+ server component but I have a strange problem when calling
it from the client machines on the local network (clients machines can be a
member different domain or has no domain )
when calling com+ object from some clients it works well but some clients
give me an erro... more >>
CAPICOM: Utilities.ByteArrayToBinaryString and odd number of bytes
Posted by smveloso NO[at]SPAM gmail.com at 6/23/2005 9:41:27 AM
Hi,
I know this subject has been brought up before, but I noticed that
several solutions were suggested, so I ask:
[1] Is it really true that Utilities.ByteArrayToBinaryString does not
correctly handle the convertion of byte arrays with an odd number of
bytes ? I do have a problem valid... more >>
Runtime creation of an OLE Object in C++/CLI
Posted by None at 6/23/2005 5:38:14 AM
Hello
I have an OCX control Xyz.ocx. This is a non UI control. My aim is to
create one of the objects from this control dynamically.
1. I used AxImp on this control and created XYZLib.dll.
2. I then attempted to create the object dynamically in this fashion and
then use one of its expos... more >>
COM/threading and difference between Service and Console App
Posted by PJChan at 6/22/2005 6:40:01 PM
Hi, I've got an app that starts a thread to listen on a tcp port, then starts
another thread to accept the socket connection and exchange some data with
the client. This second thread creates a COM object for internal use.
My problem is that if I test with a console app, the thread that create... more >>
TlbImp marshals array as single ref
Posted by Walter L. Williams at 6/22/2005 2:44:15 PM
When I run TlbImp.exe on my COM dll, the IDL following has an array of
longs:
[local] HRESULT SomeMethod ([in] short nNumBlocks, [in, size_is(nNumBlocks)]
long *alBlocks, [out, retval] long *plRetVal);
The output creates this method, with a ref int where the array should be:
int SomeMet... more >>
ASP.NET + Excel Download
Posted by George Homorozeanu at 6/22/2005 11:16:05 AM
We create an excel object with Excel/Office Interop Assembly and we want to
offer this excel object as download without creating physically the file.
The download window appears with "Save As.", "Open", etc
Problem: The file we get as download is not the excel object we created.
Instea... more >>
Using Outlook application class throws "The specified module could not be found"
Posted by ohad at 6/22/2005 11:00:02 AM
Hello everyone,
I would like to use my Outlook 2003's address book in my application,
so for that i've added a referece to Outlook 11.0 Object Model to my
project.
Then, my first line of code is:
Microsoft.Office.Interop.Outlook.Application App = new
Microsoft.Office.Interop.Outlook.Appl... more >>
problems with Office XP IAs
Posted by test.file NO[at]SPAM gmail.com at 6/22/2005 4:33:51 AM
Hi,
I'm working on a VS 2003 solution with multiple projects that
provides a facility to automate Excel XP (Sp2). We add a bunch of
menus, provide WinForm screens etc. from Excel, and finally invoke
Excel macros, if needed.
Today, on my colleagues pcs, the code started throwing
Missing... more >>
.NET called as COM interface
Posted by Dave Braithwaite at 6/21/2005 5:41:33 PM
I'm having trouble getting my head around calling .NET components from
legacy VC6.
I need to implement a logging "thing" (service, object, application,
whatever) in C# that will be called by legacy vc6 code. This "thing" will
need to:
- log messages from client applications to an SQL Serv... more >>
Help me get a pointer from a structure
Posted by justengland NO[at]SPAM gmail.com at 6/21/2005 2:31:25 PM
I am trying to use the LsaLogonUser API. I am almost there.
'This is my structure
Public Structure MSV1_0_LM20_LOGON
Public MessageType As MSV1_0_PROTOCOL_MESSAGE_TYPE
Public LogonDomainName As String
Public UserName As String
Public Workstation As String
Public aryPassword As Char() ... more >>
ScriptControl cast exception with managed classes
Posted by Tobias Weltner at 6/21/2005 10:28:51 AM
I found a strange problem with the old fashioned MS Script Control and have
no clues what this is about.
In a VB.NET app, I used this code:
Dim sc As New MSScriptControl.ScriptControl
sc = CreateObject("ScriptControl")
sc.Language = "VBScript"
sc.AddObject("myObj", "Hello World!... more >>
Converting COM object model to C#
Posted by Michael at 6/21/2005 1:39:03 AM
I am very new to .Net (about 1 week) and am exploring what is involved in
converting my c++ app to .Net.
The app is very similar to VS.Net; a container which hosts addins and
in-place activates Office docs and MSHTML.
If I re-write in C#, what do I need to do to expose my object model to
... more >>
.NET objects as argument to COM component
Posted by Tobias Weltner [MVP] at 6/21/2005 12:00:00 AM
Talking to COM objects from .NET is easy, but how do you pass .NET objects
to COM components as arguments?
This seems to be a pretty strange thing. This is what I did:
In VB6, I created an activeX DLL called "test.interop" with a single class
like this:
####
Sub getobject(ByVal obj As Ob... more >>
Marhalling LPSTR
Posted by Henning Krause [MVP - Exhange] at 6/20/2005 11:34:29 PM
Hello,
I posted this question already, but in the wrong newsgroup... so here again:
I have a COM interface which has the following method:
HRESULT Item(
[in] DWORD dwIndex,
[in] DWORD dwWhichName,
[in] DWORD cchLength,
[out,size_is(cchLength)] LPSTR pszName
);
When I create a ... more >>
Calling .NET class from ASP
Posted by Vi at 6/20/2005 3:08:01 PM
Hello,
I have a .NET class that I want to call from an ASP page. I did everything
they way it is described in
http://www.codeproject.com/dotnet/nettocom.asp?select=1005526&df=100&forumid=14076&msg=1005526
Here's my ASP code:
<%@ Language=VBScript %>
<%
set obj=server.CreateObject("namespa... more >>
Redirect stdout from unmanaged DLL
Posted by Thomas W. Brown at 6/20/2005 10:36:01 AM
I redirect the console's output and error streams in my C# application in
order to prepend some basic information for diagnostics (timestamp, thread
name, etc.). This works fine for all Console.WriteLine and
Console.Error.WriteLine output from my managed code. However, I use PInvoke
to cal... more >>
COM interop und garbage collection
Posted by Guido Kraus at 6/20/2005 3:31:01 AM
Hello,
I'm trying to connect a Delphi COM client with our .NET server. Everything
seems to work fine, except that COM-created .NET objects are not properly
garbage collected, e.g. the C# destructors won’t get invoked.
Especially when marshalling .NET streams to COM IStreams which do not ... more >>
COM without registration
Posted by ME at 6/18/2005 11:57:20 PM
Reading a previous post I was able to find a high level overview of COM
without registration:
http://www.simple-talk.com/2005/03/09/com-server-registration/ However, I
was wondering if anyone one knows of other references that could explain
this further. Specifically I need help creating t... more >>
How to export a .net controls into ActiveX control?
Posted by yldelight at 6/18/2005 6:27:02 AM
hi, all
I developed an .net control, that inherited from Control class using C#
language.
Now, I want to use it in native VC++ or VB6 or Delphi ect, What should i do?
thanks
yldelight
... more >>
Convert void pointer to System.Object
Posted by Tommy Vernieri at 6/17/2005 2:02:09 PM
Hopefully someone can help me out with this; if what I'm asking is even
possible.
My basic question is how can I convert a void * into an Object and then
later convert it back again.
Here is a little more explanation in case there are other solutions I
could try. (I'm using .NET v1.1.)
... more >>
Dynamically Created AX Control not released.
Posted by talon2112 at 6/17/2005 10:16:57 AM
I am dynamically creating ActiveX controls on WinForms in VS.Net 2003.
While this code works great, the OCX file that serves the Active X
control does not get released until after the application has exited.
This is a fairly significant issue for our software as we are actually
trying to del... more >>
Mshtml Deployment
Posted by Stefan G. at 6/17/2005 7:27:02 AM
Hi,
we need to deploy Microsoft.mshtml and tried as follows:
* install the assembly into the gac (installshield)
* registering the assembly (installshield - COM interop)
This works for users who executed the install-program for our software. All
other users (including admins) get an "inv... more >>
COM interop: no change but get TypeLoadException
Posted by gbacon NO[at]SPAM hiwaay.net at 6/16/2005 8:30:50 PM
I have a solution with many projects, of which several have COM
references to a third-party DLL. At initialization, our application
performs reflection searches through the assemblies in its start
directory to discover its functionality. In other words, most of the
projects know very little ab... more >>
exe exporting to windows service
Posted by Sushil Prasad at 6/16/2005 5:29:28 PM
hi,
I have a exe that is registered and runs in my account. How can i run this
exe in windows services so that everyuser to the server can have access to
this exe. I need to also have this exe start when server starts.
... more >>
Passing a struct containing a union from c# to win32
Posted by johannblake NO[at]SPAM yahoo.com at 6/16/2005 5:37:55 AM
I need to marshall a struct containing a union. The union part is not
being correctly passed. Any ideas on what I am missing or doing wrong?
Thanks for your help!
Johann
The win32 struct looks like this:
typedef struct {
WAVEFORMATEX Format;
union {
WORD wValidBitsPerSample;
... more >>
COM interop TypeLoadException with NUnit
Posted by gbacon NO[at]SPAM hiwaay.net at 6/16/2005 12:00:00 AM
Sorry about the multipost, but I realized too late after I posted to
m.p.d.l.c# that my question might be more appropriate in this group.
I have two C# projects: a production project and NUnit tests for it.
I've recently added a test that causes a call into a registered COM
component, and now ... more >>
migration vb6 to vb.net
Posted by DavideR at 6/14/2005 2:19:01 AM
I Am trying to migrate a vb6 project to vb.net but in the upgrade wizard the
conversion crash with a critical error (vbu.exe unspecified error ....) when
the wizard is loading type library stdole
I have vs2002 sp1 Framevork1.1 sp1
What can i do?
Best regards
Davide
... more >>
Hosting the IE browser in a UserControl
Posted by Glass Half Full at 6/13/2005 4:38:09 PM
I've created a very simple user control that basically hosts the IE browser.
The purpose was to abstract some of the logic of setting the content of the
browser from a string. I have a small problem with this control. When I
use this control with a tab control (placing my browser control on ... more >>
ilasm and delayed signing
Posted by Brian R. at 6/13/2005 4:08:01 PM
I have some IL that I need to reassemble back into a primary interop
assembly. I want my developers to be able to do this on their own, but I
don't want them to have the private/public key pair. They have access to the
public key.
How can I have them assemble the IL (using ILASM) and dela... more >>
Showing Dialog form in Excel
Posted by test.file NO[at]SPAM gmail.com at 6/13/2005 1:34:24 PM
I'm working on a project (SDK 1.1) where we're automating Excel XP. We
have an ExcelService class which is responsible to maintaining Excel
object states and cleanup. The class also acts as a sink for the click
events of several buttons that it creates in Excel Commandbars.
Some of these but... more >>
getting window handle..
Posted by ve at 6/13/2005 1:33:51 PM
Hi,
i am developing an application which me to call c++ code from c#. basically
i have created idl for that in c++ and it worked fine. Now i want to pass
window handle to the c++ code. I got the handle then i am passing
Handle.IntPtr() to the c++ code. Basically in the c++ code i need to d... more >>
VB6.0 dll
Posted by Devs at 6/13/2005 12:59:02 AM
how i can use vb6.0 dll in vb.net
--
mohan ... more >>
interop: Passing pointer to COM to efficiently receive large data chunk
Posted by Robert Schnitzer at 6/12/2005 9:21:18 AM
I'm writing COM to expose some unmanaged imagery generation functions to c#.
My question is how to best (easiest, clearest coding style) pass a managed
pointer to COM to receive back a loaded image:
example 1: using safearray
COM:
process([in,out] SAFEARRAY* bytes)
C# call:
byte[] bytes = ... more >>
passing string array to C++
Posted by Bruce Parker at 6/11/2005 6:11:01 PM
I have an unmanaged api I need to call. The definition for it is the
following:
DLL_API int Adapt( Global* g, char** strings, int numStrings);
I need to wrap this api in C++ and then pass a string array from c# to the
wrapper api. Here is my attempt:
C++ wrapper
DLL_API long MyAdapt(... more >>
AppDomain.Unload leaks ?
Posted by greg at 6/11/2005 12:00:00 AM
Hi all,
Can anyone tell me why the code below leaks?
Here is what I do:
1) create new AppDomain
2) create an instance of AppDomain2Class in it,
3) call a AppDomain2Class.Run() method
4) unload AppDomain
No additional assemblies are involved ( even if they were, unloading
AppDomain
suppose... more >>
|