Click here to Skip to main content
15,894,460 members
Home / Discussions / C#
   

C#

 
GeneralRe: save and open issues! please help! Pin
Hessam Jalali6-Aug-07 8:17
Hessam Jalali6-Aug-07 8:17 
AnswerRe: save and open issues! please help! Pin
Spyder_Snyper6-Aug-07 8:17
Spyder_Snyper6-Aug-07 8:17 
Questionhow to capture signature using digitizers Pin
salman_syed_016-Aug-07 7:18
salman_syed_016-Aug-07 7:18 
AnswerRe: how to capture signature using digitizers Pin
Luc Pattyn6-Aug-07 7:41
sitebuilderLuc Pattyn6-Aug-07 7:41 
QuestionForm.Size Width to be less than 123 px.! Pin
methhoo6-Aug-07 6:55
methhoo6-Aug-07 6:55 
AnswerRe: Form.Size Width to be less than 123 px.! Pin
Luc Pattyn6-Aug-07 7:12
sitebuilderLuc Pattyn6-Aug-07 7:12 
AnswerRe: Form.Size Width to be less than 123 px.! Pin
PhilDanger6-Aug-07 7:15
PhilDanger6-Aug-07 7:15 
Questioncalling unmanaged c++ dll from c# Pin
djdjoko6-Aug-07 6:50
djdjoko6-Aug-07 6:50 
Hi,
I have following problem. I am trying to use in c# a simple DLL created in C++ unmanaged code. When I call the function 'square' the debugger enters C++ but gives me following message. I dont know what I am doing wrong. Any ideas? Thanks

A call to PInvoke function 'OptimizerCS!OptimizerCS.LEVMAR::square' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.

//////////C#<br />
namespace OptimizerCS<br />
<br />
{<br />
    public class LEVMAR<br />
    {<br />
      [DllImport("OptimizerCPP.dll", EntryPoint="square",ExactSpelling=false,CallingConvention=CallingConvention.Cdecl)]//, EntryPoint = "test", SetLastError = true)]<br />
<br />
       public static extern int square(int a);<br />
<br />
       void main()<br />
       {<br />
       int a = 3;<br />
       int b = square(a);<br />
       }<br />
    }<br />
}<br />
/////////OptimizerCPP.h<br />
namespace OptimizerCPP {<br />
   public class OptimizerCPPLEVMAR<br />
	{<br />
		private :<br />
			OptimizerCPPLEVMAR()<br />
			{<br />
			};<br />
		public:<br />
			DllExport int  __stdcall square(int a);<br />
<br />
		};<br />
};<br />
<br />
/////////OptimizerCPP.cpp<br />
#include "stdafx.h"<br />
#include "OptimizerCPP.h"<br />
using namespace OptimizerCPP;<br />
<br />
DllExport int __stdcall OptimizerCPPLEVMAR::square(int a)<br />
{<br />
 return a*a;<br />
}

AnswerRe: calling unmanaged c++ dll from c# Pin
Luc Pattyn6-Aug-07 7:14
sitebuilderLuc Pattyn6-Aug-07 7:14 
AnswerRe: calling unmanaged c++ dll from c# Pin
djdjoko6-Aug-07 22:02
djdjoko6-Aug-07 22:02 
GeneralRe: calling unmanaged c++ dll from c# Pin
djdjoko6-Aug-07 22:03
djdjoko6-Aug-07 22:03 
QuestionObject Serialization with an ArrayList Pin
Spyder_Snyper6-Aug-07 6:25
Spyder_Snyper6-Aug-07 6:25 
AnswerRe: Object Serialization with an ArrayList Pin
Hessam Jalali6-Aug-07 8:38
Hessam Jalali6-Aug-07 8:38 
GeneralRe: Object Serialization with an ArrayList Pin
Spyder_Snyper6-Aug-07 8:57
Spyder_Snyper6-Aug-07 8:57 
GeneralRe: Object Serialization with an ArrayList Pin
Hessam Jalali6-Aug-07 9:20
Hessam Jalali6-Aug-07 9:20 
GeneralRe: Object Serialization with an ArrayList Pin
Spyder_Snyper6-Aug-07 9:23
Spyder_Snyper6-Aug-07 9:23 
GeneralRe: Object Serialization with an ArrayList Pin
Hessam Jalali6-Aug-07 9:34
Hessam Jalali6-Aug-07 9:34 
GeneralRe: Object Serialization with an ArrayList Pin
Spyder_Snyper6-Aug-07 9:43
Spyder_Snyper6-Aug-07 9:43 
GeneralRe: Object Serialization with an ArrayList Pin
Hessam Jalali6-Aug-07 9:49
Hessam Jalali6-Aug-07 9:49 
GeneralRe: Object Serialization with an ArrayList [modified] Pin
Spyder_Snyper6-Aug-07 10:36
Spyder_Snyper6-Aug-07 10:36 
GeneralRe: Object Serialization with an ArrayList Pin
cyn86-Aug-07 20:17
cyn86-Aug-07 20:17 
GeneralRe: Object Serialization with an ArrayList Pin
Hessam Jalali6-Aug-07 21:25
Hessam Jalali6-Aug-07 21:25 
GeneralRe: Object Serialization with an ArrayList Pin
Spyder_Snyper7-Aug-07 4:39
Spyder_Snyper7-Aug-07 4:39 
GeneralRe: Object Serialization with an ArrayList Pin
Hessam Jalali7-Aug-07 6:43
Hessam Jalali7-Aug-07 6:43 
QuestionCannot generate SSPI context error Pin
xbiplav6-Aug-07 5:17
xbiplav6-Aug-07 5:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.