all groups > dotnet interop > april 2004 > threads for april 8 - 14, 2004
Filter by week: 1 2 3 4 5
Exposing MC++ objects to COM
Posted by matteo tesser at 4/14/2004 10:41:05 PM
Hi,
I'm trying to use managed c++ (VS2003) and I want to expose my classes also
as COM Objects
Here is a simple example. I compile the following code and than use regasm
to register the assembly and create the type library. Then I try to
instanciate the object with VBA adding the TLB referenc... more >>
IDataObject Marshalling
Posted by montu17 NO[at]SPAM yahoo.com at 4/14/2004 10:21:28 PM
Resending:
Hi,
I am writing a .Net wrapper for the MS object picker, but I am
running into a marshalling problem.
I am having trouble retrieving data returned after selecting users and
clicking OK. When I call the dataObj.GetData (...) it returns a handle
inside STGMEDIUM that is invalid... more >>
Multiple WithEvents references causes crash
Posted by Trevor F. at 4/14/2004 9:30:36 PM
I am having problems getting events to to work right using
COM Interop. I am developing a class library in C# which
is exposed to COM and called by a VBA application. Several
of the classes in the class library raise events and i'm
having no problem recieving these events in my VBA code
(u... more >>
hosting windows forms control in Powerpoint 2003
Posted by Dave Casper at 4/14/2004 4:42:36 PM
I have a custom Windows Forms control created with .NET, which runs fine in
the ActiveX control container. But since it's not a native ActiveX control,
it does not appear among the list of controls that can be hosted in
PowerPoint. Is there a way I can put my control on a PowerPoint slide, like... more >>
unmanaged structs in managed code
Posted by MZK at 4/14/2004 4:41:03 PM
I hope this is the right place to ask..
I have a VC++ 6 application that reads data from a legacy database. This database consists of 512 byte records, with the first 2 bytes determining the record type (eg 01 = record type 1, 999 = record type 99 etc). Each record type is structured differently... more >>
Com + Interface Inheritence
Posted by James Hancock at 4/14/2004 3:15:19 PM
I'm using a bunch of Ole Interfaces. Most of them are derrived from
OleWindow (IOleInPlaceSiteEx and IOleInPlaceSite are two)
So I figured, lets' do this:
interface IOleWindow {
...methods etc.
}
interface IOleInPlaceSiteEx : IOleWindow {
...methods etc. (not IOleWindow methods... more >>
Shell extension demo / turotial?
Posted by Jan Aagaard at 4/14/2004 11:41:44 AM
Hi,
I'm trying to create a Windows Explorer window in C#. I've been looking
around and have found a lot of pieces that should make it possible for me,
by searching on keywords like ishellview, createviewwindow and
ishellbrowser. But I haven't found a complete working demo.
Doesn't anynow wh... more >>
Marshalling error with System.Drawing.Color <==> OLE_COLOR parameter
Posted by Peter Bromley at 4/14/2004 11:01:53 AM
Hi,
There appears to be a problem with marshalling a specific usage of a
System.Drawing.Color reference parameter from an unmanaged caller.
I have a .NET control exposing an interface as (managed C++):
public __gc __interface IManagedUIElement
{
void ElemBackColor([Out] System::... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
AxInterop assembly works; Interop assembly doesn't???
Posted by gary NO[at]SPAM xyris.com at 4/14/2004 9:16:50 AM
Hope someone can advise me.
I have an ActiveX control that works fine when dropped
on a form and accessed via the AxInterop generated assembly.
My problem is when I simply add a reference and use the control
via the automatically generated interop.XXXX assembly. ie:
XXX.XXXClass XXX1 = n... more >>
NamedMutex with SECURITY_ATTRIBUTES
Posted by Michael at 4/14/2004 7:20:21 AM
I created a unmanaged memory map file classes in C# and
everything works fine until I use it in my service, which
got Access Denied, which I figured it would because it
didn't have any SECURITY_ATTRIBUTES. I couldn't find a
way to add a SECURITY_ATTRIBUTES to the Mutex class
in .NET so I ... more >>
Calling 3rd party ActiveX control -> type mismatch problem
Posted by NoXuS at 4/13/2004 3:32:54 PM
Hello all,
I'm trying to call a third party HexEditor ActiveX control
(http://www.softerra.com/products/hexeditor.php) from within C#.
I can set all the necessary properties from C# but when I want to execute
the SetData method I always run into problems.
I've created a byte array that I wa... more >>
Problem with Microsoft fax on XP with C# and tiff files
Posted by Mike Grace at 4/13/2004 3:07:26 PM
Hi,
I am trying to send a fax in C# using the XP fax com extended api.
If I specify the body of my message as a multi page .tiff file, it get the
following error:
"System.Runtime.InteropServices.COMWException(0x80070483): Operation
failed."
I cannot find any record of this error code a... more >>
Equivalent of App.path
Posted by Harish at 4/13/2004 10:51:02 AM
What is the equivalent of app.path?? I have a .NET DLL and it uses an INI file to get application related information. In Vb6, this INI file is stored along with the DLL directory(ex: D:\myapp\myapp.ini). I have strong named the DLL and put it in the GAC. So if I take GetExecutingAssembly().location... more >>
Reflection: Determining a Method's Attributes from within the Method
Posted by Good Enchiladas at 4/13/2004 4:42:51 AM
Is it possible to determine a method's own attributes from within the method
without hardcoding the name of the method as a constant within the method?
Please tell me if it is possible and how it is done.
Thank you,
Kelly
... more >>
Is this .NET Problem?
Posted by Ramesh K at 4/12/2004 4:25:08 PM
Hi All,
During Attach to a process like DLLHOST ,DLLHOST has FILE references to
the system dlls like " odbc32.dll etc..(One can observer this in process
explorer tool of Sysinternals.com by selecting the "View Handles" from the
View menu)
But during the Detach process same handles are no... more >>
marshal array of structure into a com component
Posted by Michael at 4/12/2004 4:06:02 PM
Hi
two questions,
1. how to debug trace into the com componet developed using vc++ 6? I had the enable unmanaged debugging set to true in c# project
2. what's the correct way to pass an array of structure into a com method.
below is what I have so far and it is not working
Any help is apprea... more >>
IComThreadingInfo; check apartment type
Posted by Dan Schullman at 4/12/2004 11:53:49 AM
I'm using P/Invoke from a multi-threaded .NET application to invoke my
multi-threaded Win32 DLL that eventually utilizes some COM objects, and want
to check that I understand the type of COM apartments being used by the
threads in myWin32 DLL. The IComThreadingInfo looks like it will give me
wha... more >>
problem with web browser control - not firing events.
Posted by ej1001 at 4/12/2004 10:31:08 AM
Hello
I'm using a webbrowser control to get the source of the html page which has different
iframes. I'm using the click events to get to a certain html page frame and then parse it to
create an xml file
Here is the problem. The setup project I create when installed on a machine having only .net... more >>
Modifying EntryPoint in DllImportAttribute at runtime
Posted by Raja at 4/12/2004 8:16:03 AM
I have a C dll that has several functions with following following signature
void func_Struct1(Struct1* ptr
void func_Struct2(Struct2* ptr
......................................
.......................................
void func_Structn(Structn* ptr
I want to P/Invoke these functions. First I... more >>
Subject: Remoting Server and COM calls (slow COM calls)
Posted by Cole Shelton at 4/11/2004 11:36:34 PM
Hi all,
I have a remoting server (console app at the moment) which hosts a
SingleCall object. This object makes several calls to a COM (3rd party)
object to retrieve data. I have noticed that the calls are about 10 times
slower when the object is remoted vs. in-process. I have read through ... more >>
Marshalling structs with fixed length arrays
Posted by vgatto NO[at]SPAM pummel.org at 4/11/2004 4:46:35 PM
I have a C++ struct like this:
struct TESTSTRUCT
{
DWORD dwTest;
WCHAR wszTest[ 256 ];
};
used in an interface like this:
virtual HRESULT Test(TESTSTRUCT *test) = 0;
The C# COM server interface is defined as:
void Test(ref TESTSTRUCT test);
and the struct is defined as:... more >>
empty password with CallingLogonUser() fails
Posted by d oz at 4/10/2004 7:43:34 PM
Trying to run a program for a different user account from C#-service under
WinXP. The user has no password assigned and therefore CallingLogonUser() as
well as CreateProcessWithLogonW() fails.
If I assign a password to that user, everything works fine. I tried calling
above functions with pass... more >>
MarshalAs for Properties?
Posted by James Hancock at 4/10/2004 4:38:15 PM
I have an interface that I'm mapping to .net
one of the properties on the interface is:
[DispId(HTMLConsts.DISPID_IHTMLDOCUMENT2_DESIGNMODE)]
string DesignMode{get; set;}
I get a ComException error with this. Presumably because it's supposed to be
a Bstr.
When I'm doing Method... more >>
Outlook Programming
Posted by Prasad Peesapati at 4/10/2004 12:11:02 AM
Hi
I was going through this below link to program the Outlook folders.
http://www.dotnetjunkies.com/Article/2E1EEEAF-C78A-4A38-A830-AC204B12DF83.dci
However, I was not able to create the object "msoutl9". There is no code completion help coming when i place a dot after the msoutl9 . What nam... more >>
Problems Implimenting HTMLDocumentEvents2
Posted by James Hancock at 4/9/2004 5:35:04 PM
I'm replacing the MSHTML behemoth PIA with direct links. I've got
everything working nicely except my implimentation of HTMLDocumentEvents2.
This is how I tell the class to use HTMLDocumentEvents2.
Guid guid = typeof(HTMLDocumentEvents2).GUID;
// // m_HtmlDoc is the HTML doc; in ... more >>
Throw 'ol Gill a bone
Posted by DotNetJunkies User at 4/9/2004 1:53:01 PM
I am calling a VB6 dll from a vb.net windows application that returns an array of strings. My issue is it seems to truncate after a NULL character. For Example VB 6 is returning a string with the HEX value of 4E 31 00 00 01 00 20 20 20 20 20 00 00 00 20 20 20 31 32 30 But when it gets back to Vb... more >>
Pointer to the pointer to an array ?
Posted by Michael Senf at 4/9/2004 11:45:42 AM
Hi,
I'm trying to get a RAPI function (CeFindAllFiles) to work in my C# app. I
do get the number
of files found, but I can't get the array of structs that contains the file
names.
I think my problem is with the pointer to the array of structs. The
documentation reads:
"Pointer to the poin... more >>
'Debug.WriteLine' causes 'NullReferenceException'
Posted by Eugene Lerner at 4/9/2004 11:21:06 AM
I implemented an old fashioned way of registering a window using 'RegisterClass' and 'CreateWindow' APIs. 'WindowProc' looks like this â€
protected virtual IntPtr InternalWindowProc( IntPtr hWnd, uint uintMsg, UIntPtr wParam, IntPtr lParam
IntPtr iptrReturn = IntPtr.Zero
switch( uin... more >>
Is this Possible
Posted by dearpolycarp NO[at]SPAM hotmail.com at 4/9/2004 8:23:30 AM
We allow users to add custom meta to our app in the form of key/value
pairs, both key and value are strings. And they access this user meta
data in thier scripts ( VBScript or JScript(, our app is a .NET app
(see http://www.mygenerationsoftware.com if this seems confusing). I
want to allow them... more >>
Creatable Interfaces???
Posted by wayne.bradney NO[at]SPAM usa.net at 4/8/2004 3:09:05 PM
I'm trying to get my head around an interop issue. I have a legacy COM
DLL that I've wrapped using TLBIMP. This DLL exposes a standard
CoClass (let's call it Widget), and in the resulting interop assembly
I see the following
.class public auto ansi import WidgetClass
extends [mscor... more >>
Deploy Assembly in GAC
Posted by swlodarc NO[at]SPAM sct.com at 4/8/2004 4:28:25 AM
There are several ways to deploy an assembly into the global assembly
cache:
1) Use an installer designed to work with the global assembly cache.
This
is the preferred option for installing assemblies into the global
assembly
cache.
2) Use a developer tool called the Global Assembly Cac... more >>
|