Click here to Skip to main content
15,881,757 members
Home / Discussions / C#
   

C#

 
GeneralRe: retrive user rights from sql table Pin
Jassim Rahma13-Jan-10 7:43
Jassim Rahma13-Jan-10 7:43 
QuestionC# - listen to add/remove function from event Pin
bonzaiholding29-Dec-09 22:15
bonzaiholding29-Dec-09 22:15 
AnswerRe: C# - listen to add/remove function from event Pin
DaveyM6929-Dec-09 23:17
professionalDaveyM6929-Dec-09 23:17 
AnswerRe: C# - listen to add/remove function from event Pin
Afjal khan30-Dec-09 0:19
Afjal khan30-Dec-09 0:19 
QuestionC# VS 2005 Plotting real time data with Drawing 2D Pin
raj of jss29-Dec-09 21:33
raj of jss29-Dec-09 21:33 
AnswerRe: C# VS 2005 Plotting real time data with Drawing 2D Pin
Luc Pattyn30-Dec-09 0:49
sitebuilderLuc Pattyn30-Dec-09 0:49 
QuestionC# Delegates in vc++ Pin
Anu_Bala29-Dec-09 21:32
Anu_Bala29-Dec-09 21:32 
AnswerRe: C# Delegates in vc++ Pin
teejayem30-Dec-09 5:26
teejayem30-Dec-09 5:26 
that is because your callback needs to accept a System.String datatype instead of CString. If you need to marshal String^ to Cstring just do the following.

static void OnCallClick(String ^msg)
{
     CString nativeString = msg;
}



And guess what! You may have noticed that you don't have to marshal System.String into a CString in your code. That is because of a little trick in cstringt.h

#if defined(__cplusplus_cli)

	template <class SystemString>
	CStringT( SystemString^ pString ) :
		CThisSimpleString( StringTraits::GetDefaultManager() )
	{
		cli::pin_ptr<const System::Char> pChar = PtrToStringChars( pString );
		const wchar_t *psz = pChar;
		*this = psz;
	}


this function handles the marshaling for you Smile | :)

Don't be overcome by evil, but overcome evil with good

QuestionRegistration of an assembly. Pin
SRKSHOME29-Dec-09 20:38
SRKSHOME29-Dec-09 20:38 
AnswerRe: Registration of an assembly. Pin
Md. Marufuzzaman29-Dec-09 21:09
professionalMd. Marufuzzaman29-Dec-09 21:09 
GeneralRe: Registration of an assembly. Pin
SRKSHOME29-Dec-09 21:48
SRKSHOME29-Dec-09 21:48 
GeneralRe: Registration of an assembly. Pin
Md. Marufuzzaman30-Dec-09 1:19
professionalMd. Marufuzzaman30-Dec-09 1:19 
Questionbreaking a string to substrings Pin
myinstincts29-Dec-09 19:21
myinstincts29-Dec-09 19:21 
AnswerRe: breaking a string to substrings Pin
myinstincts29-Dec-09 19:27
myinstincts29-Dec-09 19:27 
GeneralRe: breaking a string to substrings [modified] Pin
petercrab29-Dec-09 20:10
petercrab29-Dec-09 20:10 
GeneralRe: breaking a string to substrings Pin
coolestCoder29-Dec-09 22:16
coolestCoder29-Dec-09 22:16 
AnswerRe: breaking a string to substrings Pin
Md. Marufuzzaman29-Dec-09 20:42
professionalMd. Marufuzzaman29-Dec-09 20:42 
QuestionRichTextBox in WPF raised InvalidComObjectException in release build application Pin
Jingcheng29-Dec-09 17:52
Jingcheng29-Dec-09 17:52 
QuestionControlPaint.DrawBorder Pin
Saksida Bojan29-Dec-09 11:00
Saksida Bojan29-Dec-09 11:00 
AnswerRe: ControlPaint.DrawBorder Pin
Ravi Bhavnani29-Dec-09 14:53
professionalRavi Bhavnani29-Dec-09 14:53 
GeneralRe: ControlPaint.DrawBorder Pin
Saksida Bojan29-Dec-09 19:26
Saksida Bojan29-Dec-09 19:26 
QuestionHow to mark / build C# / WPF component STA Pin
Jingcheng29-Dec-09 10:15
Jingcheng29-Dec-09 10:15 
QuestionFill HTML-Forms, wait for respons and get answere with C# Pin
diialer29-Dec-09 9:51
diialer29-Dec-09 9:51 
AnswerRe: Fill HTML-Forms, wait for respons and get answere with C# Pin
#realJSOP29-Dec-09 10:07
mve#realJSOP29-Dec-09 10:07 
GeneralRe: Fill HTML-Forms, wait for respons and get answere with C# Pin
diialer29-Dec-09 10:13
diialer29-Dec-09 10:13 

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.