Main Page | Report this Page
.NET DotNet Forum Index  »  Visual C++ Forum  »  Use unmanaged code in VS2008...
Page 1 of 1    

Use unmanaged code in VS2008...

Author Message
Rui Oliveira...
Posted: Mon Sep 14, 2009 5:33 am
Guest
Hi,

I have a managed application that uses an unmanaged dll code. And this works
perfect together when used in VStudio2005.

Unmanaged code have been developed in C++ in VS2003.

Now I upgrade managed application to VStudio 2008, and I have several
problems. In debug and after reset iis (iisreset) the application works well,
but a few time later hangs when try to call a unmanaged function.

What could be? There is some flag configuration in VStudio2008 to use
unmanaged code?

Thanks & Regards,
Rui
 
Brian Muth...
Posted: Mon Sep 14, 2009 12:35 pm
Guest
You need to describe this problem better.

Does the managed application compiled in VS2008 call the unmanaged code
developed in VS2003 directly? If so, what has IIS got to do with this
problem? Do you use PInvoke to call the unmanaged code? If so, what
parameters are being passed? Is it only when calling a particular remote
function that the application hangs?

Brian
 
Rui Oliveira...
Posted: Mon Sep 14, 2009 1:12 pm
Guest
Hi Brian,

Yes, managed application compiled in VS2008 call the unmanaged code
developed in VS2003 directly.

I add the unmanaged dll in managed application references and call functions
directly using wrapper automatically created by VStudio2008.

I can call several times the unmanaged function without any problem, but a
few time later, when call an unmanaged function the application hangs.

Apparently, the application hangs when I try to use application after don’t
use it for a while. Make sense?

Regards,
Rui


"Brian Muth" wrote:

Quote:
You need to describe this problem better.

Does the managed application compiled in VS2008 call the unmanaged code
developed in VS2003 directly? If so, what has IIS got to do with this
problem? Do you use PInvoke to call the unmanaged code? If so, what
parameters are being passed? Is it only when calling a particular remote
function that the application hangs?

Brian


 
Brian Muth...
Posted: Mon Sep 14, 2009 2:07 pm
Guest
Quote:
Apparently, the application hangs when I try to use application after don’t
use it for a while. Make sense?

Nope, not to me. Applications don't "grow old".

You will need to roll up your sleeves and debug it. It's also helpful if you
characterize what you mean by "hang". Find out what it is doing immediately
beforehand.
 
Rui Oliveira...
Posted: Tue Sep 15, 2009 2:53 am
Guest
Hi,
I made some changes in my unmanaged code, and it looks better.
I added IsInvokeAllowed method to my unmanaged code. Overrided
COleControl::IsInvokeAllowed() to return TRUE.
Since yesterday that do not hangs. We will see in the following days if
keeps stable.
Thanks & Regards,
Rui


"Brian Muth" wrote:

Quote:
Apparently, the application hangs when I try to use application after don’t
use it for a while. Make sense?

Nope, not to me. Applications don't "grow old".

You will need to roll up your sleeves and debug it. It's also helpful if you
characterize what you mean by "hang". Find out what it is doing immediately
beforehand.

 
Allen...
Posted: Wed Sep 23, 2009 9:37 pm
Guest
Rui,

You said "There is some flag configuration in VStudio2008 to use "
Quote:
unmanaged code? But I think it said something like "use old syntax". If
that the case, you can do this:
Make a new project with 2008. you have to name all the files the same as

the old project from 2003 or 2005. Now copy and paste each file form the
old version to the new version. If you need more details, do not hesitate
to contact me again.

--
Thanks
Allen
"Rui Oliveira" <RuiOliveira at (no spam) discussions.microsoft.com> wrote in message
news:73FDE35F-8EC7-4BBA-B6D4-25B6D48785E5 at (no spam) microsoft.com...
Quote:
Hi,

I have a managed application that uses an unmanaged dll code. And this
works
perfect together when used in VStudio2005.

Unmanaged code have been developed in C++ in VS2003.

Now I upgrade managed application to VStudio 2008, and I have several
problems. In debug and after reset iis (iisreset) the application works
well,
but a few time later hangs when try to call a unmanaged function.

What could be? There is some flag configuration in VStudio2008 to use
unmanaged code?

Thanks & Regards,
Rui
 
 
Page 1 of 1    
All times are GMT - 5 Hours
The time now is Sat Nov 28, 2009 11:42 am