Click here to Skip to main content
15,891,739 members
Home / Discussions / C#
   

C#

 
GeneralRe: Embedding a control in IE Pin
asdasdqasdasd7-Mar-06 5:32
asdasdqasdasd7-Mar-06 5:32 
GeneralRe: Embedding a control in IE Pin
Judah Gabriel Himango7-Mar-06 5:36
sponsorJudah Gabriel Himango7-Mar-06 5:36 
GeneralRe: Embedding a control in IE Pin
asdasdqasdasd7-Mar-06 5:44
asdasdqasdasd7-Mar-06 5:44 
QuestionIldasm wont take /dll option Pin
RB@Emphasys7-Mar-06 5:11
RB@Emphasys7-Mar-06 5:11 
AnswerRe: Ildasm wont take /dll option Pin
Judah Gabriel Himango7-Mar-06 5:20
sponsorJudah Gabriel Himango7-Mar-06 5:20 
GeneralRe: Ildasm wont take /dll option Pin
RB@Emphasys7-Mar-06 5:22
RB@Emphasys7-Mar-06 5:22 
QuestionToolBar In Windows Explorer Pin
rakesh_nits7-Mar-06 4:36
rakesh_nits7-Mar-06 4:36 
QuestionInvoking native dlls in C# Pin
madhusri7-Mar-06 4:07
madhusri7-Mar-06 4:07 
Hi I have faced one problem on calling the native dll's functions from C# .Net coding.Actually i wrote
one dll to control the Digital Multimeter in a remote programming mode through GPIB interface.
Initially i have imported the win32 dll provided with GPIB driver in my coding and tried to send the
data to the Digital Multimeter, Whenever i send the data, it throws this Exception
" System.AccessViolationException: Attempted to read or write protected memory. This is often an
indication that other memory is corrupt." , but i will send the data from VC++ application,its
working fine. Is there any specific settings needs to do? Please help me to solve this problem.
For your reference i have pasted the header file function ,VC++ coding as well as C# coding here.


Header file function
----------------------------
extern long int _cdecl ieee488_send (long int,char *,unsigned long,long int *);
#define send(addr,s,status) ieee488_send(addr,(char *) (s),0xFFFF,(long int *) status)

VC++
----------
send(temp,info,&status);
info is character pointer
Status - int

C# -- I have tried in the folowing ways
------------------------------------------------------

1. [DllImport("IIEEE_32M")]
public extern static int send(int address,string strCommand , ref int status);

send(inGpibAddress, Command, ref inStatus);

2. [DllImport("IIEEE_32M")]
public extern static int send(int address,string strCommand , out int status);

send(inGpibAddress, Command, out inStatus);

3. [DllImport("IIEEE_32M")]
public extern static int send(int address,[MarshalAs(UnmanagedType.LPStr)] string
strCommand, out int status);

send(inGpibAddress, Command, out inStatus);

4. [DllImport("IIEEE_32M")]
public extern static int send(int address,[MarshalAs(UnmanagedType.LPStr)] string
strCommand, intptr status);

send(inGpibAddress, Command, out intptr inStatus);

Thanks in Advance

Thanks and Regards
Madhu
AnswerRe: Invoking native dlls in C# Pin
mikanu7-Mar-06 4:20
mikanu7-Mar-06 4:20 
AnswerRe: Invoking native dlls in C# Pin
Judah Gabriel Himango7-Mar-06 5:26
sponsorJudah Gabriel Himango7-Mar-06 5:26 
AnswerRe: Invoking native dlls in C# Pin
Eric Dahlvang7-Mar-06 10:23
Eric Dahlvang7-Mar-06 10:23 
QuestionDataGridView single cell data binding Pin
angusmax7-Mar-06 3:35
angusmax7-Mar-06 3:35 
AnswerRe: DataGridView single cell data binding Pin
Rey99997-Mar-06 4:35
Rey99997-Mar-06 4:35 
GeneralRe: DataGridView single cell data binding Pin
angusmax7-Mar-06 21:38
angusmax7-Mar-06 21:38 
GeneralRe: DataGridView single cell data binding Pin
Rey99997-Mar-06 23:54
Rey99997-Mar-06 23:54 
QuestionClob into oracle Pin
Lash207-Mar-06 2:43
Lash207-Mar-06 2:43 
Questionsplash screen Pin
Vineet Rajan7-Mar-06 2:36
Vineet Rajan7-Mar-06 2:36 
AnswerRe: splash screen Pin
Rey99997-Mar-06 3:02
Rey99997-Mar-06 3:02 
QuestionCurrent Date and Time Pin
Brendan Vogt7-Mar-06 1:47
Brendan Vogt7-Mar-06 1:47 
AnswerRe: Current Date and Time Pin
Guffa7-Mar-06 1:53
Guffa7-Mar-06 1:53 
QuestionRe: Current Date and Time Pin
Brendan Vogt7-Mar-06 1:59
Brendan Vogt7-Mar-06 1:59 
AnswerRe: Current Date and Time Pin
CWIZO7-Mar-06 2:48
CWIZO7-Mar-06 2:48 
QuestionControl for Main Button Window Pin
jahangir70007-Mar-06 0:01
jahangir70007-Mar-06 0:01 
AnswerRe: Control for Main Button Window Pin
Steve Hansen7-Mar-06 0:44
Steve Hansen7-Mar-06 0:44 
GeneralRe: Control for Main Button Window Pin
jahangir70009-Mar-06 20:09
jahangir70009-Mar-06 20:09 

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.