Click here to Skip to main content
15,915,172 members
Home / Discussions / C#
   

C#

 
JokeRe: plz can some1 name a gud buk?? Pin
Seishin#11-Feb-07 22:59
Seishin#11-Feb-07 22:59 
AnswerRe: plz can some1 name a gud buk?? Pin
Christian Graus11-Feb-07 23:39
protectorChristian Graus11-Feb-07 23:39 
AnswerRe: plz can some1 name a gud buk?? Pin
Colin Angus Mackay12-Feb-07 0:43
Colin Angus Mackay12-Feb-07 0:43 
AnswerRe: plz can some1 name a gud buk?? Pin
Pete O'Hanlon12-Feb-07 1:14
mvePete O'Hanlon12-Feb-07 1:14 
AnswerRe: plz can some1 name a gud buk?? Pin
Sandeep Akhare12-Feb-07 2:20
Sandeep Akhare12-Feb-07 2:20 
Jokehooked on phonics Pin
Dan Neely12-Feb-07 3:23
Dan Neely12-Feb-07 3:23 
AnswerRe: plz can some1 name a gud buk?? Pin
virendra patel12-Feb-07 16:18
virendra patel12-Feb-07 16:18 
QuestionCalling C++ DLL from C# program Pin
francois_t11-Feb-07 21:19
francois_t11-Feb-07 21:19 
I'm trying to call a C++ dll from my C# (VS2005) application and keep on getting the same exception:
"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

Here's the code:

[C++]
typedef void * SessionHandle;

swint16 sw_createsession(const char * ConfigName,SessionHandle * hSes,void *userdef,const char *inipath);

I tried this, but it does not work:

[C#]
Wrapper code:
[DllImport("MyDLL.dll")]
public static extern short sw_createsession(string configName, [In][Out] ref IntPtr hSession, IntPtr configFunction, string iniPath);

Function call:
configName and iniPath is declared as strings and _hSession and userdef is declared as IntPtr's and initialized to IntPtr.Zero

Code:
short result = SwitchAPIWrapper.sw_createsession(configName, ref _hSession,ref userdef,iniPath);


Hope this makes sense. If anyone can help me with this one, it would be great. Thanx!
AnswerRe: Calling C++ DLL from C# program Pin
Chris Patrick11-Feb-07 22:13
Chris Patrick11-Feb-07 22:13 
AnswerRe: Calling C++ DLL from C# program Pin
francois_t12-Feb-07 19:13
francois_t12-Feb-07 19:13 
GeneralRe: Calling C++ DLL from C# program Pin
ChrisKiki29-Apr-08 22:04
ChrisKiki29-Apr-08 22:04 
Questioncaching Pin
Rama krishna.M11-Feb-07 21:06
Rama krishna.M11-Feb-07 21:06 
AnswerRe: caching Pin
Christian Graus11-Feb-07 22:15
protectorChristian Graus11-Feb-07 22:15 
QuestionHow to exit C#.Net Application? Pin
Sri harini11-Feb-07 21:00
Sri harini11-Feb-07 21:00 
AnswerRe: How to exit C#.Net Application? Pin
sam#11-Feb-07 22:39
sam#11-Feb-07 22:39 
GeneralRe: How to exit C#.Net Application? Pin
Sri harini11-Feb-07 22:47
Sri harini11-Feb-07 22:47 
GeneralRe: How to exit C#.Net Application? Pin
sam#11-Feb-07 22:56
sam#11-Feb-07 22:56 
AnswerRe: How to exit C#.Net Application? Pin
Seishin#11-Feb-07 23:01
Seishin#11-Feb-07 23:01 
Questionhow to insert value in combobox from an array Pin
monuSaini11-Feb-07 20:45
monuSaini11-Feb-07 20:45 
AnswerRe: how to insert value in combobox from an array Pin
gauthee11-Feb-07 22:01
gauthee11-Feb-07 22:01 
AnswerRe: how to insert value in combobox from an array Pin
sam#11-Feb-07 22:44
sam#11-Feb-07 22:44 
GeneralRe: how to insert value in combobox from an array Pin
monuSaini13-Feb-07 5:35
monuSaini13-Feb-07 5:35 
QuestionLocalization problem with Resource files Pin
Ashvin Gunga11-Feb-07 20:13
Ashvin Gunga11-Feb-07 20:13 
AnswerRe: Localization problem with Resource files Pin
sam#11-Feb-07 22:49
sam#11-Feb-07 22:49 
GeneralRe: Localization problem with Resource files Pin
Ashvin Gunga11-Feb-07 22:55
Ashvin Gunga11-Feb-07 22:55 

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.