.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
sivanagamahesh
Post New Web Links

Call back mechanism in C# with C++ DLL

Posted By:      Posted Date: August 29, 2010    Points: 0   Category :.NET Framework
 
Hi , i have created an Delegate for a call back mechanism in C# it looks like this.   C# public delegate void LogProc(StructureA objAppcontext,[MarshalAs(UnmanagedType.I4)] int level,[MarshalAs(UnmanagedType.LPWStr)] string thisFile,[MarshalAs(UnmanagedType.I4)] int thisLine, [MarshalAs(UnmanagedType.LPWStr)] StringBuilder logMessage);   this C# delegate is passed to the C++ DLL by another method which is marshalled   C++ DLL static void LogProc (StructureA * context, const int level, const WCHAR * thisFile, const int thisLine, const WCHAR* logMessage)   when the call back function is called it invokes my C# method ie. LogProc, but still when it goes back to C++ DLL i am getting the following Error Message   Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call.  This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.   Can anybody help me out on this issue


View Complete Post


More Related Resource Links

Should a call back method always be used when working with smtp?

  
I read about a call back method that was used with some code for an smtp client.  Should callback methods always be used to verify delivery and get status codes when working with smtp relays and clients? 

Call Back error

  

Hi

We have upgraded a site from sharepoint 2007 to sharepoint 2010. Under Content and structure,when we click on a specific subsite we are getting an error "there was an error in callback". We tried changing the IIS timeout but that didnt fix the issue. We found some workflows are associated with the document libraries in that site. so we activated the feature " sharepoint 2007 workflows " but still getting the issue. Content types are also used in those libraries.


Webservice whose webmethod has to call a window's service and get back the results

  

I have a question which might be a beginner's question in .Net.

I have a webservice whose webmethod has to call a window's service and get
back the results.


What is the best way to implement this scenario.

I am adding reference to this windows service as an exe and i could not figure out a
way call its methods from webservice.

Please help me with a speedy reply

 Thanks in advance

Charpman

call JavaScript - jQuery code from ASP.NET Server-Side

  
jQuery got so close to me lately that I can see myself adding the scripts to my project almost unconsciously. The thing is, jQuery is very useful for me, in almost all situations and it has been a do or die enhancement for all my project since I first put my hands on it.

Of course while using it, you encounter few situations which need a bit of research to solve, mostly when you are trying to combine it with some other technologies like: UpdatePanels and ASP.NET Ajax. For instance there are many situations when I would like to run some jQuery magic based on some decision that I make on the server side.

Using jQuery to directly call ASP.NET AJAX page methods

  
Here I am looking to explain how to call page methods using jQuery. Using jQuery to directly call ASP.NET AJAX page methods

call JavaScript - jQuery code from ASP.NET Server-Side

  
jQuery got so close to me lately that I can see myself adding the scripts to my project almost unconsciously. The thing is, jQuery is very useful for me, in almost all situations and it has been a do or die enhancement for all my project since I first put my hands on it.

Of course while using it, you encounter few situations which need a bit of research to solve, mostly when you are trying to combine it with some other technologies like: UpdatePanels and ASP.NET Ajax. For instance there are many situations when I would like to run some jQuery magic based on some decision that I make on the server side

How to call an .exe file in .net

  
Sometimes a developer has to call an EXE from another EXE. While calling EXE there can be a requirement to pass parameter.

Post back puzzle

  

Hi, I have a website where the user makes a selection from a combo box and it then fills a couple text boxes with text based upon the selection. I'm sure as you know it could take a second for the text to appear in the text box due to the post back. I know there is no way to make it instantanious, so what I would like to do it fill the text box with somthing like "Loading Info..." so the user does not type in it while the information is loading.

If you would like to see what I mean please go to this page: www.epiclinks.com/create.aspx and mess around with the combo boxes and You'll see what I mean.

What I would like to do is have it do a post back to write "Loading Info..." and then do another post back to fill it in based upon their selection. How would I do this?

I'm up for anything, so if you have a better solution than that please let me know.

Thanks.


Security negotiation failed because the remote party did not send back a reply in a timely manner. T

  

 


Dear All i have created one simple service

like this

namespace WcfService2
{
        public class Service1 : IService1
    {
        public string ShowEmpName(string strFirstName, string strLastName)
        {
            return strFirstName + strLastName;
        }
    }
}




after executing in .net command promt i got 2 files

service.cs & output.config


after that i create one class file like this


namespace WcfService2
{
    public class clientcs
    {

        static void Main(string[] args)
        {
            Service1Client client = new Service1Client();
            string strResult = client.ShowEmpName("Pradeep", "Deokar");

Code Cleanup: 9 Useful Tactics for Paying Back Technical Debt

  

Now that you've identified technical debt in your code base, let's turn our attention to some specific tactics that will help you pay back that debt.

David Laribee

MSDN Magazine January 2010


Code Cleanup: Using Agile Techniques to Pay Back Technical Debt

  

Every codebase contains some measure of technical debt - code that is maddeningly hard to test and maintain. We outline some ideas for identifying and dealing with the high-interest debt in your code.

David Laribee

MSDN Magazine December 2009


Editor's Note: A Look Back As We Move Forward

  

Here's a look at a year's worth of coverage and changes at MSDN Magazine in response to reader requests.

Howard Dierking

MSDN Magazine January 2009


Talk Back: Voice Response Workflows with Speech Server 2007

  

Speech Server 2007 lets you create sophisticated voice-response applications with Microsoft .NET Framework and Visual Studio tool integration. Here's how.

Michael Dunn

MSDN Magazine April 2008


Editor's Note: Back to the Future

  

As we head into the cold winter months, we've got great content to keep you warm! You might wonder why I started this Editor's Note with such a tired intro, but we have a reason. We're covering a lot of fresh, exciting new material this month, and we didn't want to upstage the good news.

MSDN Magazine January 2006


Call MOM: Instrument and Monitor Your ASP.NET Apps Using WMI and MOM 2005

  

The current version of Windows Management Instrumentation (WMI) satisfies many current and future manageability requirements. In this article Michael Jurek demonstrates how WMI provides important system management capabilities and develops a WMI-aware monitoring solution you can use to instrument your ASP.NET applications. He then introduces the capabilities of MOM 2005 that allow you to monitor these instrumented applications.

Michael Jurek

MSDN Magazine September 2005


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend