Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

call c++ dll file from ASP.net

call c++ dll asp .net

Best Answer WingedPanther73, 07 October 2014 - 06:25 AM

The fact that it's ASP.NET instead of C#.NET shouldn't matter. It's still C# code. My first thought is that there's something in your C++ dll that isn't working properly with the change in your code.

 

If you change your C++ dll to dummy functions (always returning the same value, no logic), do you still get the same error?

Go to the full post


This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1 LeoTeo

LeoTeo

    CC Lurker

  • Just Joined
  • Pip
  • 2 posts

Posted 07 October 2014 - 04:43 AM

Hello everyone, 

 

Does anyone know how to call c++ dll file in ASP.net? I wanna call a C++ dll file from ASP.net (C#). I had found a lot of examples on internet for call C++ dll file from C# and successfully created one sample and its run very well in C# , but the same code was failed in ASP.net with exception code: 

Unhandled exception at 0x773E283B (ntdll.dll) in WebDev.WebServer40.EXE: 0xC0000374: A heap has been corrupted (parameters: 0x773FCDC8).

 

I will be very appreciated with your help!!!!



#2 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts

Posted 07 October 2014 - 06:25 AM   Best Answer

The fact that it's ASP.NET instead of C#.NET shouldn't matter. It's still C# code. My first thought is that there's something in your C++ dll that isn't working properly with the change in your code.

 

If you change your C++ dll to dummy functions (always returning the same value, no logic), do you still get the same error?


Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/


#3 LeoTeo

LeoTeo

    CC Lurker

  • Just Joined
  • Pip
  • 2 posts

Posted 07 October 2014 - 07:14 PM

Since I used " strncpy_s " that is used to convert const char* to char* then memory problem is appeared, when I changed to use "strcpy" The problem was resolved!!! 

 

Thanks for your very quick response!!