I'm trying to plan a separate mechanism for extending an existing COM add-in
architecture so that at run time a separate code branch can be taken if a
desired COM object is managed rather than unmanaged.
I know that mscoree.dll is listed for managed dlls, but is there any other
way to determine
On Wed, 3 Dec 2003 15:51:28 -0600, Martin H. Henderson
<[EMAIL PROTECTED]> wrote:
>Ok, in an effort to discover WTF... I added a couple of void Callback
>functions to my c++ dll and I can get one of the void call backs to actually
>work in the c# application. However the wrong void callback is b
At 02:53 PM 12/3/2003, Fabian Schmied wrote (in part)
>> A related issue -- are you implementing "copy on write" semantics [snip]
>
>Unfortunately, I haven't implemented copy-on-write semantics in any project
>so far, although I think it is a very powerful concept. However, I remember
>there is a
It was the calling convention that had the application acting bizzarre.
After decorating the c++ callbacks with __stdcall the void callbacks worked
as expected. Changing the c# delegate to use all IntPtr for the c++ char*
callback worked as well. Now I am just down to figuring out how to
correctl
Ok, in an effort to discover WTF... I added a couple of void Callback
functions to my c++ dll and I can get one of the void call backs to actually
work in the c# application. However the wrong void callback is being
called. What gives? Are the function pointers getting touched/changed by
the GC
> This interop stuff is not as easy as they claim it to be.
No one said it's trivial. And you're trying to use one of the more
abstruse cases -- invocation of managed delegates from unmanaged code.
You still need to step through the assembly, to see exactly what is
happening. The unmanaged C++
What you're probably looking for is
EnvDTE.Project.AddFromTemplate(templateProjectFile, targetUrl);
Where targetUrl is http://server/ProjectVDir/ProjectFile.csproj
-Original Message-
From: Moderated discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Stren
I get no exceptions, the callback is simply never called. FYI, this works
fine from a c++ app so the DLL and the callback mechanism are fine. I just
can't get it to work with c#. This interop stuff is not as easy as they
claim it to be.
// c++ dll exported prototype
void fnCPPFunction( LPFN_CA
> >Now, if I implement ISerializable, I can (have to) write the special
> >deserialization constructor, in which I can also initialize the counter
> >correctly. The problem is: now every class inheriting from the base class
> >has to follow the ISerializable contract, it is not possible for a
deriv
At 03:09 AM 12/3/2003, Fabian Schmied wrote
>I have a base class, ReferenceCountedObject [1], which provides means for
>deterministic disposal of objects being reference counted. Basically, it
>contains a member variable as a reference counter. This counter is
>initialized with 1 (indicating that t
Wow, that must be the most verbose possible rewording of "shove the data
back along the wire like any normal client-server app. TCP/IP does a pretty
decent job of buffering, fragmenting, and reassembling data."
More seriously, Andrew, I'm curious for your take on Levente's original
claim that h
Hi Martin,
The function pointer should also have a stdcall 'annotation'.
The WINAPI define from windows.h can be use for this.
declare your function pointer like this
typedef WINAPI bool (*LPFN_CALLBACK)( const char* sz1, char psz2[], unsigned
long*
pulsz2Length );
Not really sure about the p
> It sounds like you should be able to get by with just implementing
> IDeserializationCallback in the base class (and just sticking to
> [Serializable] and *not* implementing ISerializable). Your implementation
> of OnDeserialization would then just initialize the refcount field as
needed
> to fi
1) Make sure you handle the calling convention correctly. As far as I
know, .Net only supports using the __stdcall calling convention. So
make sure that LPFN_CALLBACK is declared using __stdcall. Otherwise, if
your C++ code is compiled with a different default calling convention,
then when the u
I have a c++ dll that exports a function that takes a function pointer (
callback ) as a parameter. This function ( callback ) takes 2 char*
variables as parameters. How do I prototype the c# delegate to successfully
have the delegate function called from within the c++ dll? I am getting
into th
I think ADSI is your best bet, using the System.DirectoryServices classes,
assuimg you are in a Win2K AD setup or equivalent. You only need an
unprivileged member of the "domain users" group to query against AD (port
389 cleartext or 636 if you have a certificate structure); compare that to
using
I agree with Jade's assessment. The
UnhandledExceptionEventArgs.IsTerminating property more or less
describes the .NET strategy. From the docs:
"Note This property returns true when an exception is received in, but
not handled by, an application's main thread. This property also returns
true i
It sounds like you should be able to get by with just implementing
IDeserializationCallback in the base class (and just sticking to
[Serializable] and *not* implementing ISerializable). Your implementation
of OnDeserialization would then just initialize the refcount field as needed
to fix it up.
I also had this problem
It's funny, but I stopped getting this error with the release version
I don't know why
-Original Message-
From: Moderated discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Rob H
Sent: Wednesday, December 03, 2003 5:45 PM
To: [EMAIL PROTECTED
Since the installer is considered a component, for some reason you are not
required to escape the '\' character in strings. So if by accident you
typed processInstaller.Username = "mydomian\username" (this compiles in a
service project installer component), this would generate a similar error
you
Help... I've created the sample .Net windows service using C# that posts to
the EventLog. The project (including installer) builds just fine but
everytime I try to do the install and 'Invalid user or password' error
occurs. I have NEVER been prompted for these credentials as suggested by
the samp
Hi folks. We are in the process of trying out some of the extensibility
features of VS.NET 2K2, particularly along the line of wizards. I've found
a few resources on the net, and have had a decent amount of success
programmatically creating a solution and the two requisite library assembly
projec
I have a base class, ReferenceCountedObject [1], which provides means for
deterministic disposal of objects being reference counted. Basically, it
contains a member variable as a reference counter. This counter is
initialized with 1 (indicating that there is one reference to the object
after constr
23 matches
Mail list logo