Hi to you all,
we got a ServicedComponent .Net in COM+. The COM+ application is a server
application (out of process calls).
This component is a singleton object using the shared property manager to
keep data in memory.
What we want to be able to do is passing a function pointer (or an
interfac
I am trying to implement a callback from server to client. But somehow
the code is not getting executed at the client end..
Server Code
===
using System;
using System.Runtime;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tc
regards
Axel
-Original Message-
From: Mattias Sjögren [mailto:[EMAIL PROTECTED]]
Sent: Dienstag, 23. April 2002 21:34
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] Callback? Possibble from C#?
Tomas,
Try something like this
typedef int (__stdcall *TheCallbackType) (int);
DECLA
Tomas,
Try something like this
typedef int (__stdcall *TheCallbackType) (int);
DECLARE_INTERFACE_(umIDataSink, IUnknown)
{
STDMETHOD(SetCallback) (THIS_ TheCallbackType Callback) PURE;
};
and on the managed side
delegate int TheCallBackType(int i);
But why are you using a function
I wish I could help. My COM knowledge is non-existent. Good luck!
Chris
-Original Message-
From: Thomas Tomiczek [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 23, 2002 9:33 AM
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] Callback? Possibble from C#?
Chris,
Thanks for the help
. April 2002 15:06
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] Callback? Possibble from C#?
Yes, it is possible (and quite easy too...)
Create the delegate callback to be as close to the expected function,
and then put that delegate into the [DllImport] for the unmanaged code.
Then, when you call it
PROTECTED]]
Sent: Dienstag, 23. April 2002 15:06
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] Callback? Possibble from C#?
Yes, it is possible (and quite easy too...)
Create the delegate callback to be as close to the expected function,
and then put that delegate into the [DllImport] for the unmanaged
IntPtr.Zero, false, COPY_FILE_RESTARTABLE);
-Original Message-
From: Thomas Tomiczek [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 23, 2002 8:37 AM
To: [EMAIL PROTECTED]
Subject: [DOTNET] Callback? Possibble from C#?
Hello,
I have an API (C style, DLL based) that requires me to register a
callback. The DLL has a function where as one parameter it either gets
a pointer to the function to call or NULL.
Can I somehow pass a delegate in there? Any samples around?
Regards
Thomas Tomiczek
THONA Consulting Ltd.