all groups > dotnet interop > july 2004 > threads for july 8 - 14, 2004
Filter by week: 1 2 3 4 5
How to Get .Net dll's ClassId on VC++6 before CoCreateInstance ?
Posted by Maverick at 7/14/2004 8:46:02 PM
In VC++, I have to hardcoded the .net dll's ClassId if i want to create the com instance. How can i get the .net COM's classID without having to create the instance first ?
---------------------------------------
#import "Sample.tlb"
using namespace Sample;
//******NOTE******
const IID CLSI... more >>
Need verification on RefreshCache method
Posted by Henry at 7/14/2004 7:00:48 PM
I feel rather confuse with the RefreshCache method. Let say I call the
method using the following code,
DirectoryEntry entry = new DirectoryEntry();
entry.Path = path;
entry.Username = userName;
entry.Password = password;
entry.AuthenticationType = AuthenticationType.None;
entry.RefreshCa... more >>
Marshalling riddle
Posted by joerg NO[at]SPAM krause.net at 7/14/2004 10:28:18 AM
I've an interface with the following method:
void Show(
[In, MarshalAs(UnmanagedType.I4)]
int fShow);
void UIActivate(
[In, MarshalAs(UnmanagedType.I4)]
int fUIActivate);
When I call these methods, using this cocde in C#:
interopDocumentView.Show(-1);
interopDocumentView... more >>
Win32 HANDLE and StreamReader????
Posted by Shawn Anderson at 7/13/2004 11:58:55 PM
Anyone know how I can get a Win32 HANDLE from a StreamReader or
StreamWriter? I want to work with some I/O using Win32 APIs, but I would
like to attach the I/O to a .NET Stream class.
Any suggestions?
Thanks
Shawn
... more >>
Problem Saving attachments from Outlook to files
Posted by erniej at 7/13/2004 11:55:01 PM
I am experiencing what appears to be a security problem when attempting to save file attachments from MailItems in the default inbox of Outlook (have tried both 2000 and 2002 SP-1). the messages have been filtered to only save .txt attachments and I use the following code to attempt the save (myP... more >>
What are the problems when using CoRegisterClassObject/RegisterTypeForComClients in .NET?
Posted by Leon Finker at 7/13/2004 11:44:36 PM
Hi,
Are there any problems with using CoRegisterClassObject/ROT in .NET/CLR to
expose an object as IDispatch for communication from/to unmanaged world? It
is registered from MTAThread. The DllImport is as follows:
[DllImport ("ole32.dll")]
static extern uint CoRegisterClassObject (ref Guid ... more >>
OLE Container for managed code
Posted by Bob Rundle at 7/13/2004 7:49:58 AM
I've read the KB articles that indicate that there is no OLE container for
managed code. It doesn't seem to me that this is rocket science, so I have
to think that someone has written one out there.
If not, then I will write one myself.
What I am trying to do is to implement Excel in-place-... more >>
Pass a C++ COM to another C++ COM from a C# application
Posted by stevenxwang NO[at]SPAM hotmail.com at 7/13/2004 6:35:54 AM
Hello,
I have a C# application which creates two C++ COMs, and then pass
one to another. the code snippet as follows:
COM1 and COM2 are two COMs implemented in ATL.
in C#:
COM1.CCOM1Class com1 = new COM1.CCOM1Class ();
COM2.CCOM2Class com2 = new COM2.CCOM2Class ();
.... ...
(1) com1.... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
reading in C++ a binary serialized object from .net
Posted by bidou NO[at]SPAM antisocial.com at 7/13/2004 2:11:17 AM
Hello World,
Using (unmanaged) C++ only, I'd like to be able to read and interpret
a binary stream coming from a .net object standard serialization. For
example, let's assume I have a .net client which serializes some "POD"
objects (structs with public fields) using the standard .net
serializ... more >>
NtOpenSection - how to use in .NET??
Posted by The Grim Reaper at 7/12/2004 8:56:28 PM
Hi all,
This is a repost from some other groups - I've been recommended to ask here.
I need to use/upgrade the undocumented API's for NTDLL.dll - namely
NtOpenSection, NtMapViewOfSection, NtUnmapViewOfSection, CloseHandle
and CopyMemory. Code listing 1 shows the existing VB6 code, which works
... more >>
.NET classlib to COM-dll
Posted by Matthias Pieroth at 7/12/2004 8:05:12 PM
Hi NG,
I have a c#-classlibrary that I registered as COM-Object. A TLB is created
by this approach. But what I really need is a c#-dll that I can use as
COM-dll. We have a VC++ 6.0 Application that loads COM-dlls as PlugIns. But
this app can't use Typelibs. Therefore I need the c#-dll that I c... more >>
CoInitialise has not been called? Attempt to use OleSetClipboard.....
Posted by Robin Tucker at 7/12/2004 3:30:48 PM
I need to use OleSetClipboard in my VB.NET application. Unfortunately, when
I do the result returned is -2147221008 (CoInitialise has not been called).
As I am using OleSetClipboard from a thread I've created, I was under the
impression that .NET automatically called CoInitialise the first time ... more >>
Delegate Callback with parameter
Posted by b_mulyawan NO[at]SPAM yahoo.com at 7/12/2004 3:25:23 PM
Hi,
We try callback C# method from C++ DLL using delegate, using delegate
without argument works fine for me however the
CallBackFunctionWithParameter which call delegate with parameter crash
the application after being called .
Any suggestion will help and really appreaciated
Thanks
... more >>
InvokeDispMethod fails intermittently
Posted by RichB at 7/12/2004 2:57:38 PM
Hello,
I've developed an object that late binds to COM objects using
Activator.CreateInstance and <Type>.InvokeMethod.
The object is held within a ASP.NET application which is used heavily, thus
requiring the late binding to be activated regularly. Unfortunately, on
more than once occasion... more >>
SHGetSpecialFolderPath
Posted by KTW at 7/12/2004 2:18:01 PM
I am trying to get the BIT_BUCKET (recycle bin) folder from
SHGetSpecialFolderPath, but it always returns empty.
<code>
[System.Runtime.InteropServices.DllImport("Shell32.dll")]
private static extern bool SHGetSpecialFolderPath(IntPtr hwndOwner,
StringBuilder lpszPath, int nFolder, bool fCr... more >>
ADODB and .NET problem
Posted by Usha Vas at 7/12/2004 1:32:01 PM
Hi,
I am using ADODB with our .NET application and it has been working fine. I recently upgraded another server from W2K to 2003 and during the installation, it has asked to upgrade to the 1.1.4322 version of the .NET framework. After the installation, I installed the adodb PIA in the GAC and tr... more >>
Missing Methods in the COM Interop class
Posted by rajesh.sivakumar at 7/11/2004 10:13:54 AM
I was using a third party COM componenet for my application. Now since we
are porting our application to .Net, I am created a RCW using tlbImp.exe for
the com dll. When trying to use the methods of the COM wrapper dll in .Net,
some of the methods that were originally present in the COM dll are no... more >>
ObjectPooling Problem
Posted by Ladis at 7/11/2004 4:01:02 AM
Dear All,
I am trying to add ObjectPooling in my program...
<ObjectPooling(MinPoolSize := 2, MaxPoolSize := 5, ConnectionTimeOut := 20000)>
<Transaction(TransactionOption.Required)>
Public Class Class1
.........
End Class
But my compiler is saying "Attribute Specifier is not in a comple... more >>
Invalid Assembly Exception
Posted by Sabi at 7/11/2004 3:36:02 AM
Hi,
I have developed an application which uses several COM components developed in Visual Basic 6.0. Now I have developed a .NET COM Component in VB.NET. When I try to access the newly created .NET component in my previous COM component. It is throwing an exception "Invalid Assembly".
Can any on... more >>
Multiple events received
Posted by stevenxwang NO[at]SPAM hotmail.com at 7/10/2004 12:08:13 PM
Hello,
I have a C++ com server and C# application. C# application creates
the Com and asks it to do some job. After the COM finishes the task,
the COM will raise an event. C# event handler will do the following
processing. so far so good, but if C# application asks the same COM
instance to do... more >>
passing a struct from C++ com to C#
Posted by stevenxwang NO[at]SPAM hotmail.com at 7/9/2004 10:47:21 AM
Hello,
I have tried and failed to pass a struct from a C++ COM to a C#
application. Is anybody have any idea or point to some documentation?
Thanks in advance.
Steven Wang... more >>
Set DllImportAttribute at run-time?
Posted by Christopher Wells at 7/9/2004 9:56:47 AM
I have a class that has methods like:
[DllImport("wfdb.dll")]
private static extern int setsampfreq(double freq);
The wfdb.dll file isn't in the current directory nor on the path ... so I
want to qualify it with the path name, for example:
[DllImport(@"c:\foo\wfdb.dll")]
Ho... more >>
.NET + ActiveX control firing many events = continuous memory leak
Posted by gary NO[at]SPAM xyris.com at 7/8/2004 4:48:16 PM
Hi,
First my conclusion (I hope someone can tell me
I'm wrong) followed by a problem description.
CONCLUSION:
When an activex control is used in any .NET application
and the control uses events to continuously pass data
to the .NET application the result is that memory is
allocated b... more >>
Need to convert a 'Delegate' to a 'void *'
Posted by Steve Hiemstra at 7/8/2004 3:37:30 PM
I have a 3rd-party DLL (unmanaged C++) with a method in it that wants a
'void *' to a callback method. I am not privy to the source code (just have
the DLL).
I am writing a C# app that uses this method. Unfortunately, even though I
have created a 'delegate' for the callback method I cannot f... more >>
Calling unmanaged functions in a LIB file
Posted by Jeronimo Bertran at 7/8/2004 11:48:55 AM
Hi,
I have a LIB file that contains several functions written in C. How can I
use this functions from C# in managed code?
Thanks,
Jeronimo... more >>
Returning Array of classes to vbscript from c# via com interop
Posted by john.harkin NO[at]SPAM singularity.co.uk at 7/8/2004 1:34:17 AM
using System;
using System.IO;
using Microsoft.CSharp;
using System.CodeDom.Compiler;
using System.Reflection;
namespace CodeCreationAndCompiling
{
public class Class1
{
public VerySimple [] ReturnArrayClass()
{
VerySimple a1 =new VerySimple();
VerySimple b =... more >>
|