all groups > dotnet interop > april 2005
Filter by week: 1 2 3 4 5
How to get cue text using EM_GETCUEBANNER in C#?
Posted by Joe Krill at 4/30/2005 11:46:05 AM
I'm successful in using EM_SETCUEBANNER to set the banner text for an edit
control, but I can't seem to retrieve the text using EM_GETCUEBANNER. I'm
using the following SendMessage call:
[DllImport("user32",CharSet = CharSet.Unicode,SetLastError=true)]
private static extern bool SendMessag... more >>
How to wrap this method
Posted by Chester at 4/29/2005 2:58:03 PM
__declspec( dllexport ) char* sGetBarcodes(char* comPort, long deviceName )
The above function is in a .DLL. How to write a wrapper in C#?
Thanks.
Chester... more >>
Starting modeless form from unmanaged client.
Posted by egodet NO[at]SPAM equisys.com at 4/29/2005 10:12:34 AM
Hi,
I'd like to start a modeless managed form from an MFC dialog using
interop, make sure that the MFC dialog is the form's parent and that
the form's style is popup as opposed to child.
If I only use Form.Show the form pops up but its parent window is the
desktop. To attach the form to the MFC... more >>
problem to send data to Serial Port....?
Posted by vemulakiran NO[at]SPAM gmail.com at 4/29/2005 6:40:56 AM
Hi all,
I have a problem to communicate with serial port(COM3:). I am able
to open the handle but cannot send any data.
1. I connected my motoroala handset to PC through datacable.
2. I installed valid driver to detec the motorla(V400) handset
3. I tested the handset through Hyper... more >>
Passing an ArrayList from C# .NET via COM to javascript
Posted by Martijn Remmen at 4/29/2005 12:00:00 AM
I already saw this question passing by in the news group, but I could not
make up answer from it.
I have an object say TestObject that has a public method (only to explain
the problem):
class TestObject
{
private ArrayList mAL;
public TestObject()
{
}
public Arr... more >>
Can not load required library MSCOREE.TLB - SOLUTION
Posted by Andrew Arace at 4/28/2005 11:29:26 AM
Symptoms:
Building a .NET 2003 solution with "Register for COM Interop" set to
TRUE causes the error [...can not load required library MSCOREE.TLB]
My Cause:
I installed SQL Server 2005 beta, which installs .NET Framework 2 BETA.
I later uninstalled 2005 and Framework 2.0 Beta, and it left re... more >>
IExtractIcon problem
Posted by RonNanko NO[at]SPAM gm-squared.de at 4/28/2005 9:14:13 AM
Hi all,
I want to register a shell extension that displays some different icons
(depending on the bitrate) for .mp3 files.
I think that using IExtractIcon is the right way. Here is my interface
definition and the implementation (I've copied winamp.exe to c:\ for
testing purposes only, of co... more >>
System.RuntimeType.ForwardCallToInvokeMember in Excel Automation
Posted by krishnet NO[at]SPAM gmail.com at 4/28/2005 8:08:46 AM
Dear Viewer
I am writing DataTable into an Excel Sheet. While writing the
DataTable row into an Sheet Range...following exception occured.
-----------------
Exception
-----------------
System.Runtime.InteropServices.COMException (0x800A03EC): Exception
from HRESULT: 0x800A03EC.
at Syste... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Aggregating .NET Com objects
Posted by Andrew Roberts at 4/28/2005 12:00:00 AM
I have an object written in traditional C++ COM, it is an Apartment threaded
object, this aggregates any number of other COM objects, written in any
language capable of implementing COM.
I have encountered marshalling problems when one of the COM objects being
aggregated is written in .NET, li... more >>
Bad variable type error under Win2K but NOT Win XP
Posted by marcuslm at 4/27/2005 9:44:01 PM
Please HELP!!
I have a C# component calling Excel COM objects via interop and I get a 'Bad
variable type' error under Windows 2000, but NO error under Windows XP.
Anyone have a solutiuon to this??
I googled and found some old links here and there where people have asked
the question, but... more >>
Distributing Word dlls (COM,CLSID not valid/registered)
Posted by anandsaha NO[at]SPAM rediffmail.com at 4/27/2005 4:49:46 PM
Hi,
We have developed a web application, which uses Interop.Word.dll
to read from word documents and write to word documents. Problem
is that our client is persisting that we develop the solution in
such a way that the app can be deployed in a machine where Office
is not installed!
I rea... more >>
C# control not "Safe for scripting" when hosted in internet explorer
Posted by ryanyoder NO[at]SPAM hotmail.com at 4/27/2005 5:54:15 AM
I have created a C# user control which is deployed from an MSI stuffed
in a signed cab file.
This control extends UserControl and is registered for interop.
The control installs and displays but brings up the windows "Control
not marked safe for scripting" message box.
I have read zillions of... more >>
Problem with password protected word
Posted by Lina at 4/27/2005 1:46:06 AM
I would like to open a password protected Word in Web Browser control in
vb.net without prompt user to enter password and only set it in ReadOnly
mode. Is it possible to do so? Can anyone help?
Many Thx! Lina... more >>
.NET control exposed as ActiveX
Posted by Mircea Pleteriu at 4/27/2005 12:00:00 AM
Hi,
This is what I want to do:
I want to develop a .NET Windows Control, expose the control as an ActiveX
and host the control from a VB6 form.
The control has to expose a MyEvent event.
It should be possible the VB6 form to register the interest in the MyEvent
event.
This is what my po... more >>
VB.net: pointer to receive the user list pointer, Marshalling Nested Structures
Posted by Uwe Bohnhoff via DotNetMonster.com at 4/27/2005 12:00:00 AM
Hi there,
i have the following problem with a 3. party dll:
c++ function with the following structures:
typedef struct
{ uint16 szUserId[ID_SZ_SIZE]; // null terminated 23 char User id for this
user - should be unique
} ts_USER
typedef struct
{ uint32 uiSizeBytes; // size in bytes pf en... more >>
Incompatibility between VC++6 MFC apps and .NET 2.0?
Posted by Clive Dixon at 4/27/2005 12:00:00 AM
I have a Visual C++ 6 MFC app which uses .NET COM (built with 1.1) objects.
I have installed .NET 2.0 beta and now I find that CoCreateInstance crashes
when trying to create the .NET COM objects.
This is extremely easy to reproduce:
1) Install 2.0 beta.
2) Create an MFC Win app with VC++6.
... more >>
Outlook Events are named differently in different versions of Outlook Issue
Posted by TC at 4/26/2005 6:17:53 PM
Hello,
I have a COM AddIn written in C# that I compiled and built on a Windows 2000
/ Office 2000 machine.
Now, after installing it on a Windows XP / Office XP machine, when the
application tries to register a delegate for the Explorer 'Close' event, I
receive the following error:
Met... more >>
Stack Memory Leak in C#
Posted by Robert Bouillon at 4/26/2005 12:08:01 PM
I've got a memory leak problem with my Stack in a class I created for Serial
Port Communication.
I've narrowed it doen to a subclass I created to monitor the Win32 events
fired for the Serial Port (Using WaitCommEvent).
The "Status" subclass allocates unmanaged memory for the Event Handle an... more >>
How to register .Net dll (.tlb) file to registry
Posted by ddt at 4/26/2005 6:44:02 AM
Hi,
I have an application in which the VB6 code will call .Net component. Does
anybody know how to register the .net dll, I have to create an install kit.
Thanks in advance.
... more >>
Hosting Managed Controls in MFC
Posted by Wayne Gibson at 4/26/2005 2:35:02 AM
Hi,
Was wondering if somebody could help.
I recently saw an article on MSDN
http://msdn.microsoft.com/msdnmag/issues/03/03/WindowsForms/default.aspx
which talked about using Controls created in managed .NET int VC7. The
examples appears to work!!
I am now trying to get this to work withi... more >>
Outlook AddIn in C# Not Releasing!
Posted by TC at 4/26/2005 2:30:45 AM
Hello All,
I have a COM AddIn written in C# for Outlook and it is not releasing the
host Outlook application.
I set all of my application-related variables to null, I have the IDispose
interface implemented in both my Outlook class as well as the Connect class.
I have decremented the cou... more >>
OCX loads in C++ (MFC) but not on C#
Posted by lpinho at 4/26/2005 1:32:06 AM
Hi All,
I'm developing a C# mdi application and we want to reuse some OCX that
are already used by my company for some years, these OCX's are used in
another application (a C++ MFC application) and are working fine.
For C# I'm using reflection in order to load the OCX (to be more
precise ... more >>
Event Casting Not Working
Posted by TC at 4/26/2005 12:00:00 AM
Hello,
I am attempting to create an Outlook COM AddIn that works with Outlook 2000
and later. It appears that I must cast certain events in order to do so. I
found code similar to my example below:
((Outlook.ExplorerEvents)this.ActiveExplorer).Close+=new
Outlook.ExplorerEvents_C... more >>
Access Interop - List/Edit reports
Posted by STech at 4/25/2005 8:53:03 AM
How can I using interop (C# or VB.net)
1) Get a list of reports in an access database
2) Programatically change the "Control Source" of a report. ie. perform a
search and replace - eg. CustName becomes CustomerName.
I know how to get a list of tables (dao.TableDef) and queries (dao.QueryDef... more >>
Problem implementing a COM interface
Posted by Craig at 4/25/2005 7:14:10 AM
Hi
I am trying to implement a COM interface, defined in a Type Library, in a
VB.Net COM Class.
At this point it is a proof of concept project and I am trying to use the
minimum amount of code but I have to implement the interface
MyTypeLib.IInterface1.
In the implemented interface is the ... more >>
Trouble with GetWindowText API in managed C++
Posted by Phil Greg at 4/24/2005 10:51:03 AM
Hi all,
I can't get the GetWindowText API to work right... here is what I have:
namespace Win32Api
{
[DllImport("User32.dll")]
Int32 GetWindowText(Int32 hWnd, StringBuilder* lpString, Int32 nMaxCount);
}
class::function(Int32 returnHwnd)
{
StringBuilder* windowTextBuilder = new St... more >>
Loop through selected items in C#???
Posted by TC at 4/23/2005 4:03:18 PM
Hey All,
Does anyone know how to do the following in C#? I've tried using the
"GetType().ToString()" method and it only returns "System._COMObject".
' The objOutlookItem is of type object because the selection object
' may contain multiple types of items (i.e. AppointmentItem, Mail... more >>
C Sharp/.Net equiv for CoMarshalInterface
Posted by Bill at 4/23/2005 12:00:00 AM
I have been using CoMarshalInterface and its reverse in C++ to convert a COM
interface
pointer to a string that I could pass to an ActiveX control, and also to
pass an interface back
from the control to my C++ program. (The reason is to do with limitations
of ActiveX
control access under the ... more >>
Reading an Excel date formatted cell
Posted by wmotter at 4/22/2005 2:05:32 PM
I am reading an Excel worksheet using the Excel interop library into a
C# program with the intent of putting the value into a SQL database.
The value the app receives is in the internal Excel numberic format
that represents the date. I can not find any documentation that tells
me how I can conv... more >>
GetNativeVariantForObject
Posted by Robert Tarantino at 4/22/2005 12:16:05 PM
Hi, I have C# class that I am trying to convert a string array to a com
variant using the GetNativeVariantforObject method using the following code:
using System;
using System.Windows.Forms;
using System.Security;
using System.Security.Principal;
using System.Web;
using System.Web.Security... more >>
HOW TO: Catch Inbox Items When They Arrive
Posted by Grigs at 4/22/2005 8:36:04 AM
Hello,
I have created an Outlook Add-in that works great from the sample here:
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q302/9/01.asp&NoWebContent=1
Now what I want to do is catch some sort of GotEMail or InboxChanged event.
Basica... more >>
Calling C# COM from C (not C++)
Posted by Amil at 4/21/2005 9:51:41 AM
I have a managed C# COM object that I currently use fine with an ASP web
page. I want to call it from a legacy piece of C code. Does anyone have a
REAL example of how to call CoInitialize, CoCreateInstance, etc from C (not
C++)? Any info on how to generate .h files from c# would be great. Tha... more >>
Who frees the memory?
Posted by Adarsh Bhat at 4/21/2005 3:07:05 AM
I'm a p/invoke newbie, so please forgive my ignorance if I say anything dumb.
I have a C++ function that returns a char*.
char* foo()
{
char* buffer = new char[6];
strcpy(buffer, "hello");
return buffer;
}
As I want to call it from C#, my C# code looks like:
[DllImport ...]
p... more >>
Return a NET array to javascript (IE)
Posted by Roberto T. at 4/20/2005 11:53:05 AM
Hello,
I would like to return a .NET array of strings to Javascript, but it fails !
I tried this
[return:MarshalAs(UnmanagedType.SafeArray, SafeArraySubType=VarEnum.VT_BSTR)]
public string[] MyArray()
{
string[] values = { "123456789" };
return values;
}
I also tried this
[ret... more >>
C# Com Server Instancing Help
Posted by Bob Lazarchik at 4/20/2005 11:36:31 AM
Hello:
I am trying to learn how to implement a COM server in C#. I have a simple
server written and it works fine from a Delphi client ( which is what I
need ). However, I can't find the attribute to set on the C# server to set
it to single instancing. It appears the default behavior is ... more >>
Namespace with managed C++ DLL and C# usage
Posted by mrtopom NO[at]SPAM yahoo.com at 4/20/2005 8:49:03 AM
Hi,
Just a simple question :
I have a managed C++ dll;
I want to use it in a C# application.
So I added : #using MyAssembly.SubAssembly; (which is the assembly in
the DLL)
But when I want to use my class : MyAssembly.SubAssembly.Klass, I need
to put all the namespace and the class name ... more >>
Outlook 2000, C# .Net & the Quit Event -- ApplicationEvents_Event_Quit
Posted by T-Man at 4/19/2005 2:21:27 PM
Hey All,
I'm trying the following and it is failing with an error about unable to
complete the casting operation:
this.OutlookApplication=(Outlook.ApplicationClass)OutlookInstanceApp;
this.OutlookApplication.ApplicationEvents_Event_Quit+=new
Outlook.ApplicationEvents_QuitEventHand... more >>
Does a MSVBVM60.dll PIA Exist? (VBA.dll)
Posted by Brian R. at 4/19/2005 8:39:01 AM
Our system has a component that imports the MSVBVM60.dll typelib to make use
of a VBA Collection object. We are attempting to make interop assemblies for
all components and sign them and make them PIAs. I have seen random postings
that a PIA does not exist for the MSVBVM60.dll, but wanted to... more >>
writing to and reading from physical address
Posted by Pieter at 4/19/2005 5:34:04 AM
I'm trying to read from and write to a physical address, something like:
byte COM2 = 0x2F8;
byte[] buffer = new byte[] {2};
WriteToAddress(COM2 + 4, buffer);
....
byte[] input = ReadFromAddress(COM2 + 6);
....
I have to develop some code to read and write from the COM port, but I'm
unab... more >>
QueryInterface fails on pointer passed through CCW
Posted by David St. Hilaire at 4/18/2005 2:49:51 PM
Hi,
I have an application that is trying to retrieve a COM object from a remote
instance of itself. The app is written in unmanaged C++ and uses COM. The
remote communication goes through managed code via COM interop so that it
can use .NET remoting. So here is what happens:
1. COM c... more >>
How to use a COM object that requires MTA from within a (STA) windows forms app?
Posted by Scott Smith at 4/18/2005 12:00:00 AM
Hi,
I'm working on my first non-trivial windows app in C#/.NET (I've done stuff
previously in C++/MFC and C/SDK before that).
This app utilizes the Microsoft Virtual Server COM API object. The MVS COM
API documentation states: "Programs using the Virtual Server COM interface
should initi... more >>
Virtual Class in C#
Posted by sai sai via DotNetMonster.com at 4/18/2005 12:00:00 AM
hai,
What is meant by virtual Class in C#.
--
Message posted via http://www.dotnetmonster.com... more >>
Tracing SQL Server
Posted by sai sai via DotNetMonster.com at 4/18/2005 12:00:00 AM
hai,
How to trace errors in SQl Server StoredProcedure.
Thanks For help anybody,
Sai
--
Message posted via http://www.dotnetmonster.com... more >>
Register for Windows Messages sent to a Specific Application
Posted by Glenn at 4/17/2005 9:57:01 AM
Hello all,
I would like my application to receive messages that are sent to other
applications (not owned by myself). For example, is it possible to intercept
a WM_PAINT message sent to a different application? If so, any
guidance/example code would be greatly appreciated.
Thanks!... more >>
.NET DLL call from VB6 but no intellisense
Posted by JohnMSyrasoft at 4/15/2005 6:26:04 AM
Hi. It's my first try using a .NET DLL from a VB6 client. I've managed to
build the test DLL with the Configuration setting "Register for COM Interop"
selected. I see the DLL listed in VB6 References.
I can also instantiate the DLL in VB6 but I don't get any intellisense.
Oddly, it works... more >>
How to reload a frame in a WebBrowser-Control
Posted by Andreas Hoffmann at 4/14/2005 11:41:31 PM
Hi,
I used the WebBrowser-Control to display some special websites containing
frames.
How can I force the WebBrowser to refresh/reload a particular frame, but not
the whole page?
Thanks in advance for every answer.
Andreas
... more >>
Odd .NET as a COM Server problem
Posted by Nick Wilton at 4/14/2005 6:31:55 PM
Hi guys,
I have been following the .NET as a COM server tutorial at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/vcwlkcominteroppart2cservertutorial.asp
The example fails with the .CoCreateInstance method returning a value
of -858993460 to the hr value.
... more >>
COM Interop in Service?
Posted by Stefan at 4/14/2005 4:23:08 PM
Hi All
I am creating a Windows Service application that uses some COM objects
and I noticed that there is a problem with creating instances of COM
objects. I have basically something like this:
try
{
MSXML.DOMDocument xml = new MSXML.DOMDocumentClass();
}
catch (System.Exception e)
{... more >>
COM dll built with .NET 2003 won't machine on machine w/out .NET framework
Posted by ezelasky NO[at]SPAM hotmail.com at 4/14/2005 2:33:54 PM
This has got to be some small dependancy...I built an ATL com dll on
windows XP w/ .NET 2003 and it won't register on a machine w/out the
..NET framework. Any ideas???? Thanks, Elizabeth
... more >>
late binding with powerpoint - please help!
Posted by clausbayer NO[at]SPAM gmx.de at 4/14/2005 9:30:16 AM
Hello,
i try to use late binding for office automation with powerpoint and
c#.
I found some examples for word which work fine:
Type comType;
object comObject;
comType = Type.GetTypeFromProgID("Word.Application");
comObject = Activator.CreateInstance(comType);
object o = comType.Invok... more >>
|